CSS Algorithms - v3.6.1 @ Strange Loop

CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
What is A Programming Language? By Will Chrichton
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
Link to the Tweet.
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
Wikipedia
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
WolframMathWorld
WolframMathWorld
WolframMathWorld
WolframMathWorld
input:checked + input:not(:checked) + input:not(:checked) + * {
    /* Style fourth cell to prompt human to change state */
}
if ( cellOne == 1 && cellTwo == 0 && cellThree == 0 ) {
    cellFour = 1;
}
Rule 110 in CSS/HTML/Human
CSS Algorithms - v3.6.1 @ Strange Loop
Accidentally Turing Complete by Andreas Zwinkau
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
.square {
    width: 100px;
    height: 100px;
    background-color: blue;
}
<div class="square"></div>
<div class="square"></div>
.square--bigger {
    width: 150px;
    height: 150px;
}
.square--smaller {
    width: 50px;
    height: 50px;
}
<div class="square square--bigger"></div>
<div class="square square--smaller"></div>
.square {
    width: 100px;
    height: 100px;
    background-color: blue;
}
<div class="square"></div>.square {
    width: 100px;
    height: 100px;
    background-color: blue;
}
<div class="box"></div>.square {
    --square-size: 100px;
    width: var( --square-size );
    height: var( --square-size );
    background-color: blue;
}
<div class="square"></div>
.square--smaller {
    --square-size: 50px;
}
.square--bigger {
    --square-size: 150px;
}
<div class="square"></div>
<div class="square square--bigger"></div>
<div class="square square--smaller"></div>
.square {
    --square-size: 100px;
    width: var( --square-size );
    height: var( --square-size );
    background-color: blue;
}
CSS Algorithms - v3.6.1 @ Strange Loop
.square {
    ...
}
<div class="square"></div>
.square--smaller {
    --square-size: 50px;
}
.square--bigger {
    --square-size: 150px;
}
<div class="square square--bigger"></div>
<div class="square
square--smaller
square--rounded"></div>
<div class="square square--smaller"></div>
.square--rounded {
    border-radius: 50%;
}
CSS Algorithms - v3.6.1 @ Strange Loop
.square--rounded {
    border-radius: 50%;
}
.square {
    ...
}
<div class="square"></div>
<div class="square
square--rounded

square--bigger
square--yellow"></div>
.square--yellow {
    background-color: yellow;
}
.square--bigger {
    --square-size: 150px;
}
.square {
    --square-size: 100px;
    --square-bg-color: blue;
    ...
    background-color: var( --square-bg-color );
}
.square--yellow {
    --square-bg-color: yellow;
}
<div class="square"></div>
<div class="square
square--rounded
square--yellow"></div>
.square--rounded { ... }
.square--bigger { ... }
CSS Algorithms - v3.6.1 @ Strange Loop
<div class="square"></div>.square {
    --square-size: 100px;
    --square-bg-color: blue;
    width: var( --square-size );
    height: var( --square-size );
    background-color: var( --square-bg-color );
}
<div class="shape"></div>.shape {
    --shape-height: 100px;
    --shape-width: 100px;
    --shape-bg-color: blue;
    width: var( --shape-width );
    height: var( --shape-height );
    background-color: var( --shape-bg-color );
}
.shape { ... }
.shape--smaller {
    --shape-height: 50px;
    --shape-width: 50px;
}
.shape--bigger {
    --shape-height: 150px;
    --shape-width: 150px;
}
<div class="shape shape--bigger"></div>
<div class="shape shape--smaller"></div>
<div class="shape
shape--rounded

shape--bigger
shape--yellow"></div>
.shape--yellow { ... }
.shape--rounded { ... }
<div class="shape"></div>
<div class="shape shape--big-square"></div>
<div class="shape shape--small-square"></div
<div class="shape
shape--rounded

shape--big-square
shape--yellow"></div>
.shape { ... }
.shape--small-square {
    --shape-height: 50px;
    --shape-width: 50px;
}
.shape--big-square {
    --shape-height: 150px;
    --shape-width: 150px;
}
.shape--yellow { ... }
.shape--rounded { ... }
<div class="shape"></div>
.shape--small-square { ... }
<div class="shape shape--big-square"></div>
<div class="shape shape--small-square"></div
.shape--rectangle {
    --shape-height: 50px;
    --shape-width: 100px;
}
<div class="shape shape--rectangle"></div>
<div class="shape
shape--rounded

shape--big-square
shape--yellow"></div>
.shape--yellow { ... }
.shape--rounded { ... }
.shape { ... }
.shape--big-square { ... }
<div class="shape"></div>
.shape--rounded {
    border-radius: 50%;
}
<div class="shape shape--big-square"></div>
<div class="shape shape--small-square"></div
<div class="shape
shape--rounded

shape--big-square
shape--yellow"></div>
<div class="shape shape--rectangle"></div>
<div class="shape"></div>
.shape--small-square { ... }
.shape--rectangle { ... }
.shape--yellow { ... }
.shape { ... }
.shape--big-square { ... }
<div class="shape shape--big-square"></div>
<div class="shape shape--small-square"></div
<div class="shape
shape--rectangle
shape--rounded"></div>
<div class="shape
shape--circle

shape--big-square
shape--yellow"></div>
.shape--rounded {
    border-radius: 20px;
}
.shape--circle {
    border-radius: 50%;
}
.shape--rectangle { ... }
<div class="shape"></div>
.shape--small-square { ... }
.shape--yellow { ... }
.shape { ... }
.shape--big-square { ... }
Sign Up For Our Newsletter
<div class="shape shape--big-square"></div>
<div class="shape shape--small-square"></div
.shape { ... }
.shape--small-square { ... }
.shape--big-square { ... }
.shape--yellow { ... }
.shape--circle { ... }
.shape--rounded { ... }
<div class="shape
shape--rounded-rectangle"></div>
<div class="shape
shape--circle

shape--big-square
shape--yellow"></div>
<div class="shape"></div>
.shape--has-text {
--shape-height: initial;
    --shape-width: initial;
}
.shape__text {
    color: white;
    font-size: 16px;
}
<button class="shape shape--has-text">
    <a href="" class="shape__text"></a>
</button>
Sign Up For Our Newsletter 📝 Sign Up For Our Newsletter
<div class="shape shape--big-square"></div>
<div class="shape shape--small-square"></div
.shape { ... }
.shape--small-square { ... }
.shape--big-square { ... }
.shape--yellow { ... }
.shape--circle { ... }
.shape--rounded-rectangle { ... }
<div class="shape
shape--rounded-rectangle"></div>
<div class="shape
shape--circle

shape--big-square
shape--yellow"></div>
<div class="shape"></div>
.shape--has-text {
--shape-height: initial;
    --shape-width: initial;
}
.shape__text {
    color: white;
    font-size: 16px;
}
<button class="shape shape--has-text">
    <a href="" class="shape__text"></a>
</button>
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
Robert C. Martin in The Future of Programming
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
.square {
    width: 100px;
    height: 100px;
    background-color: blue;
}
<div class="square"></div>
<div class="shape"></div>.shape {
    --shape-height: 100px;
    --shape-width: 100px;
    --shape-bg-color: blue;
    width: var( --shape-width );
    height: var( --shape-height );
    background-color: var( --shape-bg-color );
}
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
function sort(array) {
for (let i = 0; i < array.length; i++) {
for (let ii = 0; ii < array.length; ii++) {
if (array[ii] > array[ii+1]) {
let temp = array[ii];
array[ii] = array[ii+1];
array[ii+1] = temp;
}
}
}
return array;
}
var sorted = sort([4, 2, 1, 3]);
function sort(array) {
for (let i = 0; i < array.length; i++) {
for (let ii = 0; ii < array.length; ii++) {
if (array[ii] > array[ii+1]) {
let temp = array[ii];
array[ii] = array[ii+1];
array[ii+1] = temp;
}
}
}
return array;
}
var sorted = sort([4, 2, 1, 3]);
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
.container {
    display: flex;
}
.container {
    display: flex;
    flex-wrap: wrap;
}
fn get_flex_line(&mut self, container_size: Au) -> Option<FlexLine> {
    ...
    for item in items {
        let kid = children.get(item.index);
        item.init_sizes(kid, container_size, self.main_mode);
        let outer_main_size = item.outer_main_size(kid, self.main_mode);
        if total_line_size + outer_main_size > container_size &&
            end != start &&
            self.is_wrappable
        {
            break;
        }
    }
    ...
}
// Flex in Servo
// https://github.com/servo/servo/blob/master/components/layout/flex.rs
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
.container {
    display: flex;
    flex-wrap: wrap;
}
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
.clearfix::before,
.clearfix::after {
    content: "";
    display: table;
}
.clearfix::after {
    clear: both;
}
.relative-parent {
    position: relative;
}
.child-stuck-to-bottom-right-of-closest-relative-parent {
    position: absolute;
    right: 0;
    bottom: 0;
}
    
.spaced-content > * + * {
    margin-top: 1rem;
}
h1 {
    font-size: calc( 2rem + 3vw );
}
// Stops growing at 800px
@media( min-width: 800px ) {
    h1 {
        font-size: calc( 2rem + ( 800px * ( 3 / 100 ) ) );
    }
}
.grid {
    display: grid;
    grid-template-columns: repeat( var( --grid-cols, 1 ), 1fr );
}
.grid-cols3 {
    --grid-cols: 3;
}
.grid-cols4 {
    --grid-cols: 4;
}
.grid-item-span2 {
    grid-column: span 2;
}
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
.lrv-a-glue-parent {
    position: relative;
}
.lrv-a-glue {
    // Fallback is top left for IE11.
    top: 0;
    left: 0;
    position: absolute;
    z-index: $z-index-middle-bottom;
    top: var( --a-glue-top, initial );
    bottom: var( --a-glue-bottom, initial );
    right: var( --a-glue-right, initial );
    left: var( --a-glue-left, initial );
}
.lrv-a-glue--r-0 {
    --a-glue-right: 0;
}
.relative-parent {
    position: relative;
}
.child-stuck-to-bottom… {
    position: absolute;
    right: 0;
    bottom: 0;
}
    
CSS Algorithms - v3.6.1 @ Strange Loop
.space-content > * + * {
    margin-top: 1rem;
}
.lrv-a-space-children-horizontal > * + * {
    margin-left: $spacer-050; // Fallback.
    margin-left: var( --a-space-children-spacer );
}
@supports( column-gap: 1rem ) {
    .lrv-a-space-children-horizontal {
        column-gap: var( --a-space-children-spacer );
    }
    
    .lrv-a-space-children-horizontal > * {
        margin-left: unset;
}
}
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
div {
    counter-reset: fizzbuzz;
    counter-increment: fizzbuzz;
}
div::before {
    content: counter(fizzbuzz);
}
div:nth-child(3n)::before {
    content: 'Fizz';
}
div:nth-child(5n)::after {
    content: 'Buzz';
}
Full FizzBuzz in CSS/HTML CodePen
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
1 of 213

More Related Content

What's hot(20)

Similar to CSS Algorithms - v3.6.1 @ Strange Loop(20)

CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
Jonathan Snook1.5K views
Ruby is AwesomeRuby is Awesome
Ruby is Awesome
Astrails2.4K views
SVG overviewSVG overview
SVG overview
Satoshi Watanabe2K views
Emmet cheat-sheetEmmet cheat-sheet
Emmet cheat-sheet
Jean Pierre Portocarrero1.2K views
Introduction to CSS GridIntroduction to CSS Grid
Introduction to CSS Grid
Kara Luton128 views
Internet programming lab manualInternet programming lab manual
Internet programming lab manual
inteldualcore8.2K views
Vidéo approche en immobilierVidéo approche en immobilier
Vidéo approche en immobilier
hervepouliot1K views
HTML5 after the hype - JFokus2015HTML5 after the hype - JFokus2015
HTML5 after the hype - JFokus2015
Christian Heilmann4.6K views
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
Kevin DeRudder973 views
HirshHorn theme: how I created itHirshHorn theme: how I created it
HirshHorn theme: how I created it
Paul Bearne2.8K views
Web technology lab manualWeb technology lab manual
Web technology lab manual
neela madheswari10.9K views
1cst1cst
1cst
Griffinder VinHai1.8K views
JavaScript RefactoringJavaScript Refactoring
JavaScript Refactoring
Krzysztof Szafranek27.4K views

Recently uploaded(20)

Stone Masonry and Brick Masonry.pdfStone Masonry and Brick Masonry.pdf
Stone Masonry and Brick Masonry.pdf
Mohammed Abdullah Laskar17 views
Paper 3.pdfPaper 3.pdf
Paper 3.pdf
Javad Kadkhodapour6 views
cloud computing-virtualization.pptxcloud computing-virtualization.pptx
cloud computing-virtualization.pptx
RajaulKarim2072 views
performance uploading.pptxperformance uploading.pptx
performance uploading.pptx
SanthiS107 views
FLOW IN PIPES NOTES.pdfFLOW IN PIPES NOTES.pdf
FLOW IN PIPES NOTES.pdf
Dearest Arhelo82 views
Codes and Conventions.pptxCodes and Conventions.pptx
Codes and Conventions.pptx
IsabellaGraceAnkers5 views
SICTECH CORPORATE PRESENTATIONSICTECH CORPORATE PRESENTATION
SICTECH CORPORATE PRESENTATION
SiCtechInduction15 views
Object Oriented Programming with JAVAObject Oriented Programming with JAVA
Object Oriented Programming with JAVA
Demian Antony D'Mello49 views
String.pptxString.pptx
String.pptx
Ananthi Palanisamy45 views
What is Unit TestingWhat is Unit Testing
What is Unit Testing
Sadaaki Emura17 views
Sanitary Landfill- SWM.pptxSanitary Landfill- SWM.pptx
Sanitary Landfill- SWM.pptx
Vinod Nejkar5 views
IEC 61850 Technical Overview.pdfIEC 61850 Technical Overview.pdf
IEC 61850 Technical Overview.pdf
ssusereeea975 views
SNMPxSNMPx
SNMPx
Amatullahbutt10 views
What is Whirling Hygrometer.pdfWhat is Whirling Hygrometer.pdf
What is Whirling Hygrometer.pdf
IIT KHARAGPUR 10 views

CSS Algorithms - v3.6.1 @ Strange Loop

  • 10. What is A Programming Language? By Will Chrichton
  • 16. Link to the Tweet.
  • 59. input:checked + input:not(:checked) + input:not(:checked) + * {     /* Style fourth cell to prompt human to change state */ } if ( cellOne == 1 && cellTwo == 0 && cellThree == 0 ) {     cellFour = 1; }
  • 60. Rule 110 in CSS/HTML/Human
  • 62. Accidentally Turing Complete by Andreas Zwinkau
  • 72. .square {     width: 100px;     height: 100px;     background-color: blue; } <div class="square"></div>
  • 73. <div class="square"></div> .square--bigger {     width: 150px;     height: 150px; } .square--smaller {     width: 50px;     height: 50px; } <div class="square square--bigger"></div> <div class="square square--smaller"></div> .square {     width: 100px;     height: 100px;     background-color: blue; }
  • 74. <div class="square"></div>.square {     width: 100px;     height: 100px;     background-color: blue; }
  • 75. <div class="box"></div>.square {     --square-size: 100px;     width: var( --square-size );     height: var( --square-size );     background-color: blue; } <div class="square"></div>
  • 76. .square--smaller {     --square-size: 50px; } .square--bigger {     --square-size: 150px; } <div class="square"></div> <div class="square square--bigger"></div> <div class="square square--smaller"></div> .square {     --square-size: 100px;     width: var( --square-size );     height: var( --square-size );     background-color: blue; }
  • 78. .square {     ... } <div class="square"></div> .square--smaller {     --square-size: 50px; } .square--bigger {     --square-size: 150px; } <div class="square square--bigger"></div> <div class="square square--smaller square--rounded"></div> <div class="square square--smaller"></div> .square--rounded {     border-radius: 50%; }
  • 80. .square--rounded {     border-radius: 50%; } .square {     ... } <div class="square"></div> <div class="square square--rounded
 square--bigger square--yellow"></div> .square--yellow {     background-color: yellow; } .square--bigger {     --square-size: 150px; }
  • 81. .square {     --square-size: 100px;     --square-bg-color: blue;     ...     background-color: var( --square-bg-color ); } .square--yellow {     --square-bg-color: yellow; } <div class="square"></div> <div class="square square--rounded square--yellow"></div> .square--rounded { ... } .square--bigger { ... }
  • 83. <div class="square"></div>.square {     --square-size: 100px;     --square-bg-color: blue;     width: var( --square-size );     height: var( --square-size );     background-color: var( --square-bg-color ); }
  • 84. <div class="shape"></div>.shape {     --shape-height: 100px;     --shape-width: 100px;     --shape-bg-color: blue;     width: var( --shape-width );     height: var( --shape-height );     background-color: var( --shape-bg-color ); }
  • 85. .shape { ... } .shape--smaller {     --shape-height: 50px;     --shape-width: 50px; } .shape--bigger {     --shape-height: 150px;     --shape-width: 150px; } <div class="shape shape--bigger"></div> <div class="shape shape--smaller"></div> <div class="shape shape--rounded
 shape--bigger shape--yellow"></div> .shape--yellow { ... } .shape--rounded { ... } <div class="shape"></div>
  • 86. <div class="shape shape--big-square"></div> <div class="shape shape--small-square"></div <div class="shape shape--rounded
 shape--big-square shape--yellow"></div> .shape { ... } .shape--small-square {     --shape-height: 50px;     --shape-width: 50px; } .shape--big-square {     --shape-height: 150px;     --shape-width: 150px; } .shape--yellow { ... } .shape--rounded { ... } <div class="shape"></div>
  • 87. .shape--small-square { ... } <div class="shape shape--big-square"></div> <div class="shape shape--small-square"></div .shape--rectangle {     --shape-height: 50px;     --shape-width: 100px; } <div class="shape shape--rectangle"></div> <div class="shape shape--rounded
 shape--big-square shape--yellow"></div> .shape--yellow { ... } .shape--rounded { ... } .shape { ... } .shape--big-square { ... } <div class="shape"></div>
  • 88. .shape--rounded {     border-radius: 50%; } <div class="shape shape--big-square"></div> <div class="shape shape--small-square"></div <div class="shape shape--rounded
 shape--big-square shape--yellow"></div> <div class="shape shape--rectangle"></div> <div class="shape"></div> .shape--small-square { ... } .shape--rectangle { ... } .shape--yellow { ... } .shape { ... } .shape--big-square { ... }
  • 89. <div class="shape shape--big-square"></div> <div class="shape shape--small-square"></div <div class="shape shape--rectangle shape--rounded"></div> <div class="shape shape--circle
 shape--big-square shape--yellow"></div> .shape--rounded {     border-radius: 20px; } .shape--circle {     border-radius: 50%; } .shape--rectangle { ... } <div class="shape"></div> .shape--small-square { ... } .shape--yellow { ... } .shape { ... } .shape--big-square { ... }
  • 90. Sign Up For Our Newsletter
  • 91. <div class="shape shape--big-square"></div> <div class="shape shape--small-square"></div .shape { ... } .shape--small-square { ... } .shape--big-square { ... } .shape--yellow { ... } .shape--circle { ... } .shape--rounded { ... } <div class="shape shape--rounded-rectangle"></div> <div class="shape shape--circle
 shape--big-square shape--yellow"></div> <div class="shape"></div> .shape--has-text { --shape-height: initial;     --shape-width: initial; } .shape__text {     color: white;     font-size: 16px; } <button class="shape shape--has-text">     <a href="" class="shape__text"></a> </button>
  • 92. Sign Up For Our Newsletter 📝 Sign Up For Our Newsletter
  • 93. <div class="shape shape--big-square"></div> <div class="shape shape--small-square"></div .shape { ... } .shape--small-square { ... } .shape--big-square { ... } .shape--yellow { ... } .shape--circle { ... } .shape--rounded-rectangle { ... } <div class="shape shape--rounded-rectangle"></div> <div class="shape shape--circle
 shape--big-square shape--yellow"></div> <div class="shape"></div> .shape--has-text { --shape-height: initial;     --shape-width: initial; } .shape__text {     color: white;     font-size: 16px; } <button class="shape shape--has-text">     <a href="" class="shape__text"></a> </button>
  • 99. Robert C. Martin in The Future of Programming
  • 103. .square {     width: 100px;     height: 100px;     background-color: blue; } <div class="square"></div>
  • 104. <div class="shape"></div>.shape {     --shape-height: 100px;     --shape-width: 100px;     --shape-bg-color: blue;     width: var( --shape-width );     height: var( --shape-height );     background-color: var( --shape-bg-color ); }
  • 122. function sort(array) { for (let i = 0; i < array.length; i++) { for (let ii = 0; ii < array.length; ii++) { if (array[ii] > array[ii+1]) { let temp = array[ii]; array[ii] = array[ii+1]; array[ii+1] = temp; } } } return array; } var sorted = sort([4, 2, 1, 3]);
  • 123. function sort(array) { for (let i = 0; i < array.length; i++) { for (let ii = 0; ii < array.length; ii++) { if (array[ii] > array[ii+1]) { let temp = array[ii]; array[ii] = array[ii+1]; array[ii+1] = temp; } } } return array; } var sorted = sort([4, 2, 1, 3]);
  • 128. fn get_flex_line(&mut self, container_size: Au) -> Option<FlexLine> {     ...     for item in items {         let kid = children.get(item.index);         item.init_sizes(kid, container_size, self.main_mode);         let outer_main_size = item.outer_main_size(kid, self.main_mode);         if total_line_size + outer_main_size > container_size &&             end != start &&             self.is_wrappable         {             break;         }     }     ... } // Flex in Servo // https://github.com/servo/servo/blob/master/components/layout/flex.rs
  • 139. .clearfix::before, .clearfix::after {     content: "";     display: table; } .clearfix::after {     clear: both; }
  • 140. .relative-parent {     position: relative; } .child-stuck-to-bottom-right-of-closest-relative-parent {     position: absolute;     right: 0;     bottom: 0; }     
  • 141. .spaced-content > * + * {     margin-top: 1rem; }
  • 142. h1 {     font-size: calc( 2rem + 3vw ); } // Stops growing at 800px @media( min-width: 800px ) {     h1 {         font-size: calc( 2rem + ( 800px * ( 3 / 100 ) ) );     } }
  • 143. .grid {     display: grid;     grid-template-columns: repeat( var( --grid-cols, 1 ), 1fr ); } .grid-cols3 {     --grid-cols: 3; } .grid-cols4 {     --grid-cols: 4; } .grid-item-span2 {     grid-column: span 2; }
  • 158. .lrv-a-glue-parent {     position: relative; } .lrv-a-glue {     // Fallback is top left for IE11.     top: 0;     left: 0;     position: absolute;     z-index: $z-index-middle-bottom;     top: var( --a-glue-top, initial );     bottom: var( --a-glue-bottom, initial );     right: var( --a-glue-right, initial );     left: var( --a-glue-left, initial ); } .lrv-a-glue--r-0 {     --a-glue-right: 0; } .relative-parent {     position: relative; } .child-stuck-to-bottom… {     position: absolute;     right: 0;     bottom: 0; }     
  • 160. .space-content > * + * {     margin-top: 1rem; } .lrv-a-space-children-horizontal > * + * {     margin-left: $spacer-050; // Fallback.     margin-left: var( --a-space-children-spacer ); } @supports( column-gap: 1rem ) {     .lrv-a-space-children-horizontal {         column-gap: var( --a-space-children-spacer );     }          .lrv-a-space-children-horizontal > * {         margin-left: unset; } }
  • 187. div {     counter-reset: fizzbuzz;     counter-increment: fizzbuzz; } div::before {     content: counter(fizzbuzz); } div:nth-child(3n)::before {     content: 'Fizz'; } div:nth-child(5n)::after {     content: 'Buzz'; } Full FizzBuzz in CSS/HTML CodePen