SlideShare una empresa de Scribd logo
1 de 175
Descargar para leer sin conexión
What is A Programming Language? By Will Chrichton
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]);
.container {
    display: flex;
}
.container {
    display: flex;
}
.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;
}
.pmc-a-glue-parent {
    position: relative;
}
.pmc-a-glue {
    // Fallback is top left for everything.
    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 );
}
.pmc-a-glue--r-0 {
    --a-glue-right: 0;
}
.relative-parent {
    position: relative;
}
.child
    position: absolute;
    right: 0;
    bottom: 0;
}
    
.space-content > * + * {
    margin-top: 1rem;
}
.a-space-children-horizontal {
    display: flex;
    flex-wrap: wrap;
}
.a-space-children-horizontal > * + * {
    margin-left: $spacer-050; // Fallback.
    margin-left: var( --a-space-children-spacer );
}
@supports( column-gap: 1rem ) {
    .a-space-children-horizontal {
        column-gap: var( --a-space-children-spacer );
    }
    
    .a-space-children-horizontal > * {
        margin-bottom: unset;
    
.a-story-arc-item-border-decoration {
    --a-story-arc-item-border-decoration-dot-offset: 1rem;
    --a-story-arc-item-border-decoration-before-transform: translate(-50%, 50% );
    &::before {
    content: '';
        position: absolute;
        top: 0;
        left: 0;
        transform: var( --a-story-arc-item-border-decoration-before-transform );
        width: rem(10);
        height: rem(10);
        background-color: map-get( $semantic-color-list, brand-red );
        border-radius: 50%;
        box-shadow: 0px 0px 0px 3px map-get( $semantic-color-list, brand-red-light
        0px 0px 0px 6px map-get( $semantic-color-list, brand-red-lightest );
    
describe( 'a-space-children-vertical', () => {
    const parent = document.querySelector( '.a-space-children-vertical' );
    const parentBox = parent.getBoundingClientRect();
    
    it( 'does not apply a space above the first item', () => {
        let kidBox = parent.children[0].getBoundingClientRect();
    
        return assertEquals( parentBox.top, kidBox.top );
    });
    
    it( 'spaces children', () => {
        let kid1Box = parent.children[0].getBoundingClientRect();
        let kid2Box = parent.children[1].getBoundingClientRect();
        let parentStyles = window.getComputedStyle( parent );
        let spaceBetweenKids = parseInt( parentStyles.getPropertyValue( '--a-space-children-space
    
        return assertEquals( kid1Box.bottom, ( kid2Box.top - spaceBetweenKids ) );
    });
    
    it( 'does not apply a space below the last item', () => {
        let kidBox = children[ children.length - 1 ];
    
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.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp Barcelona

Más contenido relacionado

La actualidad más candente

C Prog. - Structures
C Prog. - StructuresC Prog. - Structures
C Prog. - Structures
vinay arora
 
C Prog - Strings
C Prog - StringsC Prog - Strings
C Prog - Strings
vinay arora
 
C Prog. - Strings (Updated)
C Prog. - Strings (Updated)C Prog. - Strings (Updated)
C Prog. - Strings (Updated)
vinay arora
 
Maple Code for Steepest Descent
Maple Code for Steepest DescentMaple Code for Steepest Descent
Maple Code for Steepest Descent
Jeremy Lane
 

La actualidad más candente (20)

Error Handling in Scala
Error Handling in ScalaError Handling in Scala
Error Handling in Scala
 
XKE Typeclass
XKE TypeclassXKE Typeclass
XKE Typeclass
 
Metnum
MetnumMetnum
Metnum
 
Print input-presentation
Print input-presentationPrint input-presentation
Print input-presentation
 
2 BytesC++ course_2014_c8_ strings
2 BytesC++ course_2014_c8_ strings 2 BytesC++ course_2014_c8_ strings
2 BytesC++ course_2014_c8_ strings
 
LAB PROGRAMS SARASWATHI RAMALINGAM
LAB PROGRAMS SARASWATHI RAMALINGAMLAB PROGRAMS SARASWATHI RAMALINGAM
LAB PROGRAMS SARASWATHI RAMALINGAM
 
week-21x
week-21xweek-21x
week-21x
 
Double linked list
Double linked listDouble linked list
Double linked list
 
C Prog. - Structures
C Prog. - StructuresC Prog. - Structures
C Prog. - Structures
 
Dvst
DvstDvst
Dvst
 
Double linked list
Double linked listDouble linked list
Double linked list
 
C Prog - Strings
C Prog - StringsC Prog - Strings
C Prog - Strings
 
ADA FILE
ADA FILEADA FILE
ADA FILE
 
C Prog. - Strings (Updated)
C Prog. - Strings (Updated)C Prog. - Strings (Updated)
C Prog. - Strings (Updated)
 
String
StringString
String
 
Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3
 
Maple Code for Steepest Descent
Maple Code for Steepest DescentMaple Code for Steepest Descent
Maple Code for Steepest Descent
 
Blocks+gcd入門
Blocks+gcd入門Blocks+gcd入門
Blocks+gcd入門
 
DotNetNuke World CSS3
DotNetNuke World CSS3DotNetNuke World CSS3
DotNetNuke World CSS3
 
week-20x
week-20xweek-20x
week-20x
 

Similar a CSS Algorithms v3.4 @ CSSCamp Barcelona

mobl - model-driven engineering lecture
mobl - model-driven engineering lecturemobl - model-driven engineering lecture
mobl - model-driven engineering lecture
zefhemel
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
Dmitry Buzdin
 
Patrick Kettner - Creating magic with houdini
Patrick Kettner - Creating magic with houdiniPatrick Kettner - Creating magic with houdini
Patrick Kettner - Creating magic with houdini
OdessaJS Conf
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
Sway Wang
 
Crazy things done on PHP
Crazy things done on PHPCrazy things done on PHP
Crazy things done on PHP
Taras Kalapun
 
mobl presentation @ IHomer
mobl presentation @ IHomermobl presentation @ IHomer
mobl presentation @ IHomer
zefhemel
 

Similar a CSS Algorithms v3.4 @ CSSCamp Barcelona (20)

The Algorithms of CSS @ CSSConf EU 2018
The Algorithms of CSS @ CSSConf EU 2018The Algorithms of CSS @ CSSConf EU 2018
The Algorithms of CSS @ CSSConf EU 2018
 
SDC - Einführung in Scala
SDC - Einführung in ScalaSDC - Einführung in Scala
SDC - Einführung in Scala
 
여자개발자모임터 6주년 개발 세미나 - Scala Language
여자개발자모임터 6주년 개발 세미나 - Scala Language여자개발자모임터 6주년 개발 세미나 - Scala Language
여자개발자모임터 6주년 개발 세미나 - Scala Language
 
mobl - model-driven engineering lecture
mobl - model-driven engineering lecturemobl - model-driven engineering lecture
mobl - model-driven engineering lecture
 
Scala 2 + 2 > 4
Scala 2 + 2 > 4Scala 2 + 2 > 4
Scala 2 + 2 > 4
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
ddd+scala
ddd+scaladdd+scala
ddd+scala
 
Patrick Kettner - Creating magic with houdini
Patrick Kettner - Creating magic with houdiniPatrick Kettner - Creating magic with houdini
Patrick Kettner - Creating magic with houdini
 
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
 
Rails-like JavaScript Using CoffeeScript, Backbone.js and Jasmine
Rails-like JavaScript Using CoffeeScript, Backbone.js and JasmineRails-like JavaScript Using CoffeeScript, Backbone.js and Jasmine
Rails-like JavaScript Using CoffeeScript, Backbone.js and Jasmine
 
Simple flat ui css accordion
Simple flat ui css accordionSimple flat ui css accordion
Simple flat ui css accordion
 
Theme verdadeiro
Theme verdadeiroTheme verdadeiro
Theme verdadeiro
 
Crazy things done on PHP
Crazy things done on PHPCrazy things done on PHP
Crazy things done on PHP
 
CSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange LoopCSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
 
JavaScript Unit Testing with Jasmine
JavaScript Unit Testing with JasmineJavaScript Unit Testing with Jasmine
JavaScript Unit Testing with Jasmine
 
mobl presentation @ IHomer
mobl presentation @ IHomermobl presentation @ IHomer
mobl presentation @ IHomer
 
JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011
 
JavaScript @ CTK
JavaScript @ CTKJavaScript @ CTK
JavaScript @ CTK
 
Introduction to Groovy
Introduction to GroovyIntroduction to Groovy
Introduction to Groovy
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

CSS Algorithms v3.4 @ CSSCamp Barcelona

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. What is A Programming Language? By Will Chrichton
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54. 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]);
  • 55.
  • 56.
  • 58.
  • 59.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68. .clearfix::before, .clearfix::after {     content: "";     display: table; } .clearfix::after {     clear: both; }
  • 69. .relative-parent {     position: relative; } .child-stuck-to-bottom-right-of-closest-relative-parent {     position: absolute;     right: 0;     bottom: 0; }     
  • 70. .spaced-content > * + * {     margin-top: 1rem; }
  • 71. h1 {     font-size: calc( 2rem + 3vw ); } // Stops growing at 800px @media( min-width: 800px ) {     h1 {         font-size: calc( 2rem + ( 800px * ( 3 / 100 ) ) );     } }
  • 72. .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; }
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84. .pmc-a-glue-parent {     position: relative; } .pmc-a-glue {     // Fallback is top left for everything.     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 ); } .pmc-a-glue--r-0 {     --a-glue-right: 0; } .relative-parent {     position: relative; } .child     position: absolute;     right: 0;     bottom: 0; }     
  • 85.
  • 86. .space-content > * + * {     margin-top: 1rem; } .a-space-children-horizontal {     display: flex;     flex-wrap: wrap; } .a-space-children-horizontal > * + * {     margin-left: $spacer-050; // Fallback.     margin-left: var( --a-space-children-spacer ); } @supports( column-gap: 1rem ) {     .a-space-children-horizontal {         column-gap: var( --a-space-children-spacer );     }          .a-space-children-horizontal > * {         margin-bottom: unset;     
  • 87.
  • 88.
  • 89. .a-story-arc-item-border-decoration {     --a-story-arc-item-border-decoration-dot-offset: 1rem;     --a-story-arc-item-border-decoration-before-transform: translate(-50%, 50% );     &::before {     content: '';         position: absolute;         top: 0;         left: 0;         transform: var( --a-story-arc-item-border-decoration-before-transform );         width: rem(10);         height: rem(10);         background-color: map-get( $semantic-color-list, brand-red );         border-radius: 50%;         box-shadow: 0px 0px 0px 3px map-get( $semantic-color-list, brand-red-light         0px 0px 0px 6px map-get( $semantic-color-list, brand-red-lightest );     
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101.
  • 102.
  • 103.
  • 104.
  • 105.
  • 106.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 112.
  • 113.
  • 114.
  • 115.
  • 116.
  • 117.
  • 118.
  • 119.
  • 120.
  • 121.
  • 122.
  • 123.
  • 124. describe( 'a-space-children-vertical', () => {     const parent = document.querySelector( '.a-space-children-vertical' );     const parentBox = parent.getBoundingClientRect();          it( 'does not apply a space above the first item', () => {         let kidBox = parent.children[0].getBoundingClientRect();              return assertEquals( parentBox.top, kidBox.top );     });          it( 'spaces children', () => {         let kid1Box = parent.children[0].getBoundingClientRect();         let kid2Box = parent.children[1].getBoundingClientRect();         let parentStyles = window.getComputedStyle( parent );         let spaceBetweenKids = parseInt( parentStyles.getPropertyValue( '--a-space-children-space              return assertEquals( kid1Box.bottom, ( kid2Box.top - spaceBetweenKids ) );     });          it( 'does not apply a space below the last item', () => {         let kidBox = children[ children.length - 1 ];     
  • 125.
  • 126.
  • 127.
  • 128.
  • 129.
  • 130.
  • 131.
  • 132.
  • 133.
  • 134.
  • 135.
  • 136.
  • 137.
  • 138.
  • 139.
  • 140.
  • 141.
  • 142.
  • 143.
  • 144.
  • 145.
  • 146.
  • 147.
  • 148.
  • 149.
  • 150.
  • 151.
  • 152. 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