SlideShare uma empresa Scribd logo
1 de 104
Baixar para ler offline
Link to Talk
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;
}
const sorted = sort([4, 2, 1, 3]);
.container {
display: flex;
}
// Flex wrap, maybe
// https://github.com/servo/servo/blob/master/components/layout/flex.rs
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 self.is_wrappable && total_line_size + outer_main_size > container_s
break;
}
margin_count += item.auto_margin_count(kid, self.main_mode);
total_line_size += outer_main_size;
end += 1;
}
.hero {
  --height: 80vh;
--ratio: 1.42;
  display: grid;
  grid-template-rows: minmax(20px, 0.5fr) max-content minmax(100px, 1fr);
  grid-template-columns: 100vw;
  justify-items: center;
  height: var(--height);
  
  &__images {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: var(--height);
    min-width: 100%;
    width: calc( var(--height) * var(--ratio) );
  }
&__content {
z-index: 1;
grid-area: 2 / 1 / 2 / 1;
}
}
.hero {
  --height: 80vh;
--ratio: 1.42;
  display: grid;
  grid-template-rows: minmax(20px, 0.5fr) max-content minmax(100px, 1fr);
  grid-template-columns: 100vw;
  justify-items: center;
  height: var(--height);
  
  &__images {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: var(--height);
    min-width: 100%;
    width: calc( var(--height) * var(--ratio) );
  }
&__content {
z-index: 1;
grid-area: 2 / 1 / 2 / 1;
}
}
.hero {
  --height: 80vh;
--ratio: 1.42;
  display: grid;
  grid-template-rows: minmax(20px, 0.5fr) max-content minmax(100px, 1fr);
  grid-template-columns: 100vw;
  justify-items: center;
  height: var(--height);
  
  &__images {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: var(--height);
    min-width: 100%;
    width: calc( var(--height) * var(--ratio) );
  }
&__content {
z-index: 1;
grid-area: 2 / 1 / 2 / 1;
}
}
.clearfix::before,
.clearfix::after {
    content: "";
    display: table;
}
.clearfix::after {
    clear: both;
}
.outer-thing {
    position: relative;
}
.sticky-thing {
    position: absolute;
    bottom: 100%;
    left: 0;
}
.image-container {
    // position: relative;
    // padding-bottom: calc( (2 / 3) * 100% );
}
.image-container > img {
    // position: absolute;
    // width: 100%;
    // height: 100%;
    // object-fit: cover;
}
    
.image-container {
    position: relative;
    // padding-bottom: calc( (2 / 3) * 100% );
}
.image-container > img {
    position: absolute;
    width: 100%;
    height: 100%;
    // object-fit: cover;
}
.image-container {
    position: relative;
    padding-bottom: calc( (2 / 3) * 100% );
}
.image-container > img {
    position: absolute;
    width: 100%;
    height: 100%;
    // object-fit: cover;
}
    
.image-container {
    position: relative;
    padding-bottom: calc( (2 / 3) * 100% );
}
.image-container > img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
    
.arrow-up {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 15px solid red;
}
h1 {
    font-size: calc( 2rem + 3vw );
}
@media( min-width: 800px ) {
    h1 {
        font-size: calc( 2rem + ( 800px * ( 3 / 100 ) ) );
    }
}
// _mixins.scss
@mixin fluid-type( $base-font-size, $growth-factor, $stop-growing-at ) {
    --growth-factor: calc( #{$growth-factor} * 1vw );
    
    @media( min-width: $stop-growing-at ) {
        --growth-factor: calc( #{$stop-growing-at} * ( (#{$growth-factor} / 100) ) );
    }
    
    font-size: $base-font-size; // Fallback.
    font-size: calc( #{$base-font-size} + var(--growth-factor) );
}
// _typography.scss
.fluid-type-large {
    @include fluid-type( 1rem, 3, 800px );
}
https://codepen.io/laras126/pen/JeVRbo
div {
  counter-increment: fizzbuzz;
  
  &:after {
    content: counter(fizzbuzz);
  }
  
  &:nth-child(3n):before {
    content: 'Fizz';
  }
  
  &:nth-child(3n):after {
    content: '';
  }
  
  &:nth-child(5n):after {
    content: 'Buzz';
  }
}
.l-features {
    margin-bottom: rem-calc(20);
    @include supports-grid {
        display: grid;
        grid-template-columns: 1fr;
        grid-row-gap: rem-calc(20);
        grid-column-gap: rem-calc(30);
        @include breakpoint( desktop ) {
            grid-template-columns: 2fr minmax( #{rem-calc(150)}, 1fr );
        }
    }
}
.l-features__header {
    grid-column: 1 / -1;
}
$o_story_river_config = [
    'class' => 'o-story--two-col o-story--river u-padding-tb-20',
    'image_class' => 'u-bg-dots u-bg-dots--river',
    'title_class' => 'c-title--medium@tablet-min',
    'dek_class' => 'c-dek--medium@tablet-min',
];
PMC::render_template(
    sprintf( ‘%s/tmpl/inc/objects/o-story.php', IW_TEMPLATE_DIR ),
    [
        'article' => $post,
        'data' => $o_story_river_config,
    ],
    true
);
// In an npm package.
.u-glue-parent {
    position: relative;
}
.u-glue {
    --u-glue__transform: initial;    
    position: absolute;
}
[data-glue*="top"] {
    top: 0;
}
[data-glue*="right"] {
    right: 0;
}
[data-glue*="bottom"] {
    bottom: 0;  
https://codepen.io/laras126/pen/vVXrMz
<figure class="u-glue-parent o-block">
    <figcaption class="u-glue c-tag" data-glue="top right">Caption</figcaption>
    <img src="https://picsum.photos/350/200" alt="" />
</figure>
// In a project.
.c-tag {
    background-color: coral;
    padding: 0.5rem;
    color: white;
    border: 2px solid navy;
    
    --u-glue__transform: translate( 50%, 50% );
} https://codepen.io/laras126/pen/vVXrMz
// In PMC Core Patterns npm package.
@mixin pmc-u-crop( $width, $height ) {
    position: relative;
    padding-bottom: calc( ( #{$height} / #{$width} ) * 100% );
    img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
$ratios: (
    (16, 9),
    (3, 2),
    (1, 1)
);
@each $ratio in $ratios {   
    $w: nth( $ratio, 1 );
    $h: nth( $ratio, 2 );
    
    .pmc-u-crop-#{$w}x#{$h} {
        @include pmc-u-crop( $width: $w, $height:$h );
    }
}
The Way We Talk About CSS by Rachel Andrew
The Way We Talk About CSS by Rachel Andrew
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)

Mais conteúdo relacionado

Mais procurados

Pandas Cheat Sheet
Pandas Cheat SheetPandas Cheat Sheet
Pandas Cheat SheetACASH1011
 
imager package in R and examples..
imager package in R and examples..imager package in R and examples..
imager package in R and examples..Dr. Volkan OBAN
 
Currying in Swift
Currying in SwiftCurrying in Swift
Currying in SwiftMaxim Zaks
 
Cryptocurrency ecosystem(together society)
Cryptocurrency ecosystem(together society)Cryptocurrency ecosystem(together society)
Cryptocurrency ecosystem(together society)jihong yang
 
Program to sort the n names in an alphabetical order
Program to sort the n names in an alphabetical orderProgram to sort the n names in an alphabetical order
Program to sort the n names in an alphabetical orderSamsil Arefin
 
Advanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part IIAdvanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part IIDr. Volkan OBAN
 
Pytorch and Machine Learning for the Math Impaired
Pytorch and Machine Learning for the Math ImpairedPytorch and Machine Learning for the Math Impaired
Pytorch and Machine Learning for the Math ImpairedTyrel Denison
 
Sql server ___________session_20(ddl triggers)
Sql server  ___________session_20(ddl triggers)Sql server  ___________session_20(ddl triggers)
Sql server ___________session_20(ddl triggers)Ehtisham Ali
 
Ernst kuilder (Nelen & Schuurmans) - De waterkaart van Nederland: technisch g...
Ernst kuilder (Nelen & Schuurmans) - De waterkaart van Nederland: technisch g...Ernst kuilder (Nelen & Schuurmans) - De waterkaart van Nederland: technisch g...
Ernst kuilder (Nelen & Schuurmans) - De waterkaart van Nederland: technisch g...Frederik Gevers Deynoot
 
R scatter plots
R scatter plotsR scatter plots
R scatter plotsAbhik Seal
 
Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Dr. Volkan OBAN
 

Mais procurados (19)

Pandas Cheat Sheet
Pandas Cheat SheetPandas Cheat Sheet
Pandas Cheat Sheet
 
Om (Cont.)
Om (Cont.)Om (Cont.)
Om (Cont.)
 
imager package in R and examples..
imager package in R and examples..imager package in R and examples..
imager package in R and examples..
 
Currying in Swift
Currying in SwiftCurrying in Swift
Currying in Swift
 
Grestest2
Grestest2Grestest2
Grestest2
 
Cryptocurrency ecosystem(together society)
Cryptocurrency ecosystem(together society)Cryptocurrency ecosystem(together society)
Cryptocurrency ecosystem(together society)
 
ProgrammingwithGOLang
ProgrammingwithGOLangProgrammingwithGOLang
ProgrammingwithGOLang
 
Program to sort the n names in an alphabetical order
Program to sort the n names in an alphabetical orderProgram to sort the n names in an alphabetical order
Program to sort the n names in an alphabetical order
 
NCCU: Statistics in the Criminal Justice System, R basics and Simulation - Pr...
NCCU: Statistics in the Criminal Justice System, R basics and Simulation - Pr...NCCU: Statistics in the Criminal Justice System, R basics and Simulation - Pr...
NCCU: Statistics in the Criminal Justice System, R basics and Simulation - Pr...
 
Advanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part IIAdvanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part II
 
Pytorch and Machine Learning for the Math Impaired
Pytorch and Machine Learning for the Math ImpairedPytorch and Machine Learning for the Math Impaired
Pytorch and Machine Learning for the Math Impaired
 
Introduction to Processing
Introduction to ProcessingIntroduction to Processing
Introduction to Processing
 
Sql server ___________session_20(ddl triggers)
Sql server  ___________session_20(ddl triggers)Sql server  ___________session_20(ddl triggers)
Sql server ___________session_20(ddl triggers)
 
Ernst kuilder (Nelen & Schuurmans) - De waterkaart van Nederland: technisch g...
Ernst kuilder (Nelen & Schuurmans) - De waterkaart van Nederland: technisch g...Ernst kuilder (Nelen & Schuurmans) - De waterkaart van Nederland: technisch g...
Ernst kuilder (Nelen & Schuurmans) - De waterkaart van Nederland: technisch g...
 
Mosaic plot in R.
Mosaic plot in R.Mosaic plot in R.
Mosaic plot in R.
 
R scatter plots
R scatter plotsR scatter plots
R scatter plots
 
CLUSTERGRAM
CLUSTERGRAMCLUSTERGRAM
CLUSTERGRAM
 
Py lecture5 python plots
Py lecture5 python plotsPy lecture5 python plots
Py lecture5 python plots
 
Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.
 

Semelhante a Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)

CSS Algorithms v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp BarcelonaCSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms v3.4 @ CSSCamp BarcelonaLara Schenck
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Remy Sharp
 
Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02PL dream
 
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 LoopLara Schenck
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypesVarun C M
 
Simple flat ui css accordion
Simple flat ui css accordionSimple flat ui css accordion
Simple flat ui css accordionSamsury Blog
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the WorldJonathan Snook
 
Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology updateDoug Domeny
 
jQuery: Tips, tricks and hints for better development and Performance
jQuery: Tips, tricks and hints for better development and PerformancejQuery: Tips, tricks and hints for better development and Performance
jQuery: Tips, tricks and hints for better development and PerformanceJonas De Smet
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopShoshi Roberts
 
The Ring programming language version 1.9 book - Part 54 of 210
The Ring programming language version 1.9 book - Part 54 of 210The Ring programming language version 1.9 book - Part 54 of 210
The Ring programming language version 1.9 book - Part 54 of 210Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 44 of 181
The Ring programming language version 1.5.2 book - Part 44 of 181The Ring programming language version 1.5.2 book - Part 44 of 181
The Ring programming language version 1.5.2 book - Part 44 of 181Mahmoud Samir Fayed
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
Twig Brief, Tips&Tricks
Twig Brief, Tips&TricksTwig Brief, Tips&Tricks
Twig Brief, Tips&TricksAndrei Burian
 
Twig, the flexible, fast, and secure template language for PHP
Twig, the flexible, fast, and secure template language for PHPTwig, the flexible, fast, and secure template language for PHP
Twig, the flexible, fast, and secure template language for PHPFabien Potencier
 
Enhance Web Performance
Enhance Web PerformanceEnhance Web Performance
Enhance Web PerformanceAdam Lu
 
Blog skins396734
Blog skins396734Blog skins396734
Blog skins396734pantangmrny
 

Semelhante a Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US) (20)

CSS Algorithms v3.4 @ CSSCamp Barcelona
CSS Algorithms  v3.4 @ CSSCamp BarcelonaCSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms v3.4 @ CSSCamp Barcelona
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
 
Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02
 
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
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
 
JQuery Flot
JQuery FlotJQuery Flot
JQuery Flot
 
Simple flat ui css accordion
Simple flat ui css accordionSimple flat ui css accordion
Simple flat ui css accordion
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
 
Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology update
 
jQuery: Tips, tricks and hints for better development and Performance
jQuery: Tips, tricks and hints for better development and PerformancejQuery: Tips, tricks and hints for better development and Performance
jQuery: Tips, tricks and hints for better development and Performance
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop
 
The Ring programming language version 1.9 book - Part 54 of 210
The Ring programming language version 1.9 book - Part 54 of 210The Ring programming language version 1.9 book - Part 54 of 210
The Ring programming language version 1.9 book - Part 54 of 210
 
The Ring programming language version 1.5.2 book - Part 44 of 181
The Ring programming language version 1.5.2 book - Part 44 of 181The Ring programming language version 1.5.2 book - Part 44 of 181
The Ring programming language version 1.5.2 book - Part 44 of 181
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
Twig Brief, Tips&Tricks
Twig Brief, Tips&TricksTwig Brief, Tips&Tricks
Twig Brief, Tips&Tricks
 
Twig, the flexible, fast, and secure template language for PHP
Twig, the flexible, fast, and secure template language for PHPTwig, the flexible, fast, and secure template language for PHP
Twig, the flexible, fast, and secure template language for PHP
 
Enhance Web Performance
Enhance Web PerformanceEnhance Web Performance
Enhance Web Performance
 
Blog skins396734
Blog skins396734Blog skins396734
Blog skins396734
 
A proper introduction to Elm
A proper introduction to ElmA proper introduction to Elm
A proper introduction to Elm
 

Último

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
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.pdfsudhanshuwaghmare1
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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 WoodJuan lago vázquez
 
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...DianaGray10
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 

Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32. 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; } const sorted = sort([4, 2, 1, 3]);
  • 33.
  • 34.
  • 36.
  • 37. // Flex wrap, maybe // https://github.com/servo/servo/blob/master/components/layout/flex.rs 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 self.is_wrappable && total_line_size + outer_main_size > container_s break; } margin_count += item.auto_margin_count(kid, self.main_mode); total_line_size += outer_main_size; end += 1; }
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46. .hero {   --height: 80vh; --ratio: 1.42;   display: grid;   grid-template-rows: minmax(20px, 0.5fr) max-content minmax(100px, 1fr);   grid-template-columns: 100vw;   justify-items: center;   height: var(--height);      &__images {     display: flex;     flex-direction: column;     justify-content: flex-end;     height: var(--height);     min-width: 100%;     width: calc( var(--height) * var(--ratio) );   } &__content { z-index: 1; grid-area: 2 / 1 / 2 / 1; } }
  • 47. .hero {   --height: 80vh; --ratio: 1.42;   display: grid;   grid-template-rows: minmax(20px, 0.5fr) max-content minmax(100px, 1fr);   grid-template-columns: 100vw;   justify-items: center;   height: var(--height);      &__images {     display: flex;     flex-direction: column;     justify-content: flex-end;     height: var(--height);     min-width: 100%;     width: calc( var(--height) * var(--ratio) );   } &__content { z-index: 1; grid-area: 2 / 1 / 2 / 1; } }
  • 48.
  • 49.
  • 50.
  • 51.
  • 52. .hero {   --height: 80vh; --ratio: 1.42;   display: grid;   grid-template-rows: minmax(20px, 0.5fr) max-content minmax(100px, 1fr);   grid-template-columns: 100vw;   justify-items: center;   height: var(--height);      &__images {     display: flex;     flex-direction: column;     justify-content: flex-end;     height: var(--height);     min-width: 100%;     width: calc( var(--height) * var(--ratio) );   } &__content { z-index: 1; grid-area: 2 / 1 / 2 / 1; } }
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62. .clearfix::before, .clearfix::after {     content: "";     display: table; } .clearfix::after {     clear: both; }
  • 63. .outer-thing {     position: relative; } .sticky-thing {     position: absolute;     bottom: 100%;     left: 0; }
  • 64. .image-container {     // position: relative;     // padding-bottom: calc( (2 / 3) * 100% ); } .image-container > img {     // position: absolute;     // width: 100%;     // height: 100%;     // object-fit: cover; }     
  • 65. .image-container {     position: relative;     // padding-bottom: calc( (2 / 3) * 100% ); } .image-container > img {     position: absolute;     width: 100%;     height: 100%;     // object-fit: cover; }
  • 66. .image-container {     position: relative;     padding-bottom: calc( (2 / 3) * 100% ); } .image-container > img {     position: absolute;     width: 100%;     height: 100%;     // object-fit: cover; }     
  • 67. .image-container {     position: relative;     padding-bottom: calc( (2 / 3) * 100% ); } .image-container > img {     position: absolute;     width: 100%;     height: 100%;     object-fit: cover; }     
  • 68. .arrow-up {     width: 0;     height: 0;     border-left: 15px solid transparent;     border-right: 15px solid transparent;     border-bottom: 15px solid red; }
  • 69. h1 {     font-size: calc( 2rem + 3vw ); } @media( min-width: 800px ) {     h1 {         font-size: calc( 2rem + ( 800px * ( 3 / 100 ) ) );     } }
  • 70.
  • 71. // _mixins.scss @mixin fluid-type( $base-font-size, $growth-factor, $stop-growing-at ) {     --growth-factor: calc( #{$growth-factor} * 1vw );          @media( min-width: $stop-growing-at ) {         --growth-factor: calc( #{$stop-growing-at} * ( (#{$growth-factor} / 100) ) );     }          font-size: $base-font-size; // Fallback.     font-size: calc( #{$base-font-size} + var(--growth-factor) ); } // _typography.scss .fluid-type-large {     @include fluid-type( 1rem, 3, 800px ); } https://codepen.io/laras126/pen/JeVRbo
  • 72. div {   counter-increment: fizzbuzz;      &:after {     content: counter(fizzbuzz);   }      &:nth-child(3n):before {     content: 'Fizz';   }      &:nth-child(3n):after {     content: '';   }      &:nth-child(5n):after {     content: 'Buzz';   } }
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79. .l-features {     margin-bottom: rem-calc(20);     @include supports-grid {         display: grid;         grid-template-columns: 1fr;         grid-row-gap: rem-calc(20);         grid-column-gap: rem-calc(30);         @include breakpoint( desktop ) {             grid-template-columns: 2fr minmax( #{rem-calc(150)}, 1fr );         }     } } .l-features__header {     grid-column: 1 / -1; }
  • 80.
  • 81.
  • 82.
  • 83. $o_story_river_config = [     'class' => 'o-story--two-col o-story--river u-padding-tb-20',     'image_class' => 'u-bg-dots u-bg-dots--river',     'title_class' => 'c-title--medium@tablet-min',     'dek_class' => 'c-dek--medium@tablet-min', ]; PMC::render_template(     sprintf( ‘%s/tmpl/inc/objects/o-story.php', IW_TEMPLATE_DIR ),     [         'article' => $post,         'data' => $o_story_river_config,     ],     true );
  • 84. // In an npm package. .u-glue-parent {     position: relative; } .u-glue {     --u-glue__transform: initial;         position: absolute; } [data-glue*="top"] {     top: 0; } [data-glue*="right"] {     right: 0; } [data-glue*="bottom"] {     bottom: 0;   https://codepen.io/laras126/pen/vVXrMz
  • 85. <figure class="u-glue-parent o-block">     <figcaption class="u-glue c-tag" data-glue="top right">Caption</figcaption>     <img src="https://picsum.photos/350/200" alt="" /> </figure> // In a project. .c-tag {     background-color: coral;     padding: 0.5rem;     color: white;     border: 2px solid navy;          --u-glue__transform: translate( 50%, 50% ); } https://codepen.io/laras126/pen/vVXrMz
  • 86. // In PMC Core Patterns npm package. @mixin pmc-u-crop( $width, $height ) {     position: relative;     padding-bottom: calc( ( #{$height} / #{$width} ) * 100% );     img {         position: absolute;         width: 100%;         height: 100%;         object-fit: cover;     } }
  • 87. $ratios: (     (16, 9),     (3, 2),     (1, 1) ); @each $ratio in $ratios {        $w: nth( $ratio, 1 );     $h: nth( $ratio, 2 );          .pmc-u-crop-#{$w}x#{$h} {         @include pmc-u-crop( $width: $w, $height:$h );     } }
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101.
  • 102. The Way We Talk About CSS by Rachel Andrew
  • 103. The Way We Talk About CSS by Rachel Andrew