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

Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Link to Talk
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
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]);
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
.container {
display: flex;
}
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
// 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;
}
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
.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;
}
}
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
.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;
}
}
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
.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 ) ) );
    }
}
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
// _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';
  }
}
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
.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;
}
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
$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 );
    }
}
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
Bridging the Design to Development Gap with CSS Algorithms (Algorithms of CSS v2.0 @ WordCamp US)
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)
1 of 104

Recommended

The Algorithms of CSS @ CSSConf EU 2018 by
The Algorithms of CSS @ CSSConf EU 2018The Algorithms of CSS @ CSSConf EU 2018
The Algorithms of CSS @ CSSConf EU 2018Lara Schenck
12.2K views73 slides
Artdm170 Week10 Arrays Math by
Artdm170 Week10 Arrays MathArtdm170 Week10 Arrays Math
Artdm170 Week10 Arrays MathGilbert Guerrero
288 views15 slides
Introduction to R by
Introduction to RIntroduction to R
Introduction to RSander Kieft
496 views26 slides
ggtimeseries-->ggplot2 extensions by
ggtimeseries-->ggplot2 extensions ggtimeseries-->ggplot2 extensions
ggtimeseries-->ggplot2 extensions Dr. Volkan OBAN
250 views6 slides
A Survey Of R Graphics by
A Survey Of R GraphicsA Survey Of R Graphics
A Survey Of R GraphicsDataspora
8.5K views50 slides
Plot3D Package and Example in R.-Data visualizat,on by
Plot3D Package and Example in R.-Data visualizat,onPlot3D Package and Example in R.-Data visualizat,on
Plot3D Package and Example in R.-Data visualizat,onDr. Volkan OBAN
497 views16 slides

More Related Content

What's hot

Pandas Cheat Sheet by
Pandas Cheat SheetPandas Cheat Sheet
Pandas Cheat SheetACASH1011
13.4K views2 slides
Om (Cont.) by
Om (Cont.)Om (Cont.)
Om (Cont.)Taku Fukushima
1.3K views29 slides
imager package in R and examples.. by
imager package in R and examples..imager package in R and examples..
imager package in R and examples..Dr. Volkan OBAN
767 views16 slides
Currying in Swift by
Currying in SwiftCurrying in Swift
Currying in SwiftMaxim Zaks
486 views16 slides
Grestest2 by
Grestest2Grestest2
Grestest2Ankit Dubey
8 views1 slide
Cryptocurrency ecosystem(together society) by
Cryptocurrency ecosystem(together society)Cryptocurrency ecosystem(together society)
Cryptocurrency ecosystem(together society)jihong yang
37 views1 slide

What's hot(19)

Pandas Cheat Sheet by ACASH1011
Pandas Cheat SheetPandas Cheat Sheet
Pandas Cheat Sheet
ACASH101113.4K views
imager package in R and examples.. by Dr. Volkan OBAN
imager package in R and examples..imager package in R and examples..
imager package in R and examples..
Dr. Volkan OBAN767 views
Currying in Swift by Maxim Zaks
Currying in SwiftCurrying in Swift
Currying in Swift
Maxim Zaks486 views
Cryptocurrency ecosystem(together society) by jihong yang
Cryptocurrency ecosystem(together society)Cryptocurrency ecosystem(together society)
Cryptocurrency ecosystem(together society)
jihong yang37 views
Program to sort the n names in an alphabetical order by Samsil Arefin
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
Samsil Arefin184 views
Advanced Data Visualization Examples with R-Part II by Dr. Volkan OBAN
Advanced Data Visualization Examples with R-Part IIAdvanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part II
Dr. Volkan OBAN669 views
Pytorch and Machine Learning for the Math Impaired by Tyrel Denison
Pytorch and Machine Learning for the Math ImpairedPytorch and Machine Learning for the Math Impaired
Pytorch and Machine Learning for the Math Impaired
Tyrel Denison141 views
Sql server ___________session_20(ddl triggers) by Ehtisham Ali
Sql server  ___________session_20(ddl triggers)Sql server  ___________session_20(ddl triggers)
Sql server ___________session_20(ddl triggers)
Ehtisham Ali329 views
Ernst kuilder (Nelen & Schuurmans) - De waterkaart van Nederland: technisch g... by Frederik Gevers Deynoot
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...
R scatter plots by Abhik Seal
R scatter plotsR scatter plots
R scatter plots
Abhik Seal754 views
Advanced Data Visualization in R- Somes Examples. by Dr. Volkan OBAN
Advanced Data Visualization in R- Somes Examples.Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.
Dr. Volkan OBAN442 views

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

CSS Algorithms v3.4 @ CSSCamp Barcelona by
CSS Algorithms  v3.4 @ CSSCamp BarcelonaCSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms v3.4 @ CSSCamp BarcelonaLara Schenck
333 views175 slides
Is html5-ready-workshop-110727181512-phpapp02 by
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02PL dream
343 views151 slides
Is HTML5 Ready? (workshop) by
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Remy Sharp
1.4K views151 slides
CSS Algorithms - v3.6.1 @ Strange Loop by
CSS Algorithms - v3.6.1 @ Strange LoopCSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange LoopLara Schenck
2.2K views213 slides
Html5 For Jjugccc2009fall by
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fallShumpei Shiraishi
1.9K views37 slides
Javascript variables and datatypes by
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypesVarun C M
3.5K views36 slides

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

CSS Algorithms v3.4 @ CSSCamp Barcelona by Lara Schenck
CSS Algorithms  v3.4 @ CSSCamp BarcelonaCSS Algorithms  v3.4 @ CSSCamp Barcelona
CSS Algorithms v3.4 @ CSSCamp Barcelona
Lara Schenck333 views
Is html5-ready-workshop-110727181512-phpapp02 by PL dream
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02
PL dream343 views
Is HTML5 Ready? (workshop) by Remy Sharp
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
Remy Sharp1.4K views
CSS Algorithms - v3.6.1 @ Strange Loop by Lara Schenck
CSS Algorithms - v3.6.1 @ Strange LoopCSS Algorithms - v3.6.1 @ Strange Loop
CSS Algorithms - v3.6.1 @ Strange Loop
Lara Schenck2.2K views
Javascript variables and datatypes by Varun C M
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
Varun C M3.5K views
Simple flat ui css accordion by Samsury Blog
Simple flat ui css accordionSimple flat ui css accordion
Simple flat ui css accordion
Samsury Blog415 views
Html5 and web technology update by Doug Domeny
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology update
Doug Domeny1.7K views
jQuery: Tips, tricks and hints for better development and Performance by Jonas De Smet
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
Jonas De Smet3.5K views
Implementing Awesome: An HTML5/CSS3 Workshop by Shoshi Roberts
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop
Shoshi Roberts3.5K views
The Ring programming language version 1.9 book - Part 54 of 210 by Mahmoud Samir Fayed
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 by Mahmoud Samir Fayed
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 by Dmitry Buzdin
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
Dmitry Buzdin3.5K views
Twig, the flexible, fast, and secure template language for PHP by Fabien Potencier
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
Fabien Potencier22.7K views
Enhance Web Performance by Adam Lu
Enhance Web PerformanceEnhance Web Performance
Enhance Web Performance
Adam Lu803 views
Blog skins396734 by pantangmrny
Blog skins396734Blog skins396734
Blog skins396734
pantangmrny180 views

Recently uploaded

Top 10 Strategic Technologies in 2024: AI and Automation by
Top 10 Strategic Technologies in 2024: AI and AutomationTop 10 Strategic Technologies in 2024: AI and Automation
Top 10 Strategic Technologies in 2024: AI and AutomationAutomationEdge Technologies
14 views14 slides
[2023] Putting the R! in R&D.pdf by
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdfEleanor McHugh
38 views127 slides
Tunable Laser (1).pptx by
Tunable Laser (1).pptxTunable Laser (1).pptx
Tunable Laser (1).pptxHajira Mahmood
23 views37 slides
Melek BEN MAHMOUD.pdf by
Melek BEN MAHMOUD.pdfMelek BEN MAHMOUD.pdf
Melek BEN MAHMOUD.pdfMelekBenMahmoud
14 views1 slide
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...NUS-ISS
28 views70 slides
RADIUS-Omnichannel Interaction System by
RADIUS-Omnichannel Interaction SystemRADIUS-Omnichannel Interaction System
RADIUS-Omnichannel Interaction SystemRADIUS
15 views21 slides

Recently uploaded(20)

[2023] Putting the R! in R&D.pdf by Eleanor McHugh
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf
Eleanor McHugh38 views
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by NUS-ISS
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
NUS-ISS28 views
RADIUS-Omnichannel Interaction System by RADIUS
RADIUS-Omnichannel Interaction SystemRADIUS-Omnichannel Interaction System
RADIUS-Omnichannel Interaction System
RADIUS15 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta15 views
Future of Learning - Yap Aye Wee.pdf by NUS-ISS
Future of Learning - Yap Aye Wee.pdfFuture of Learning - Yap Aye Wee.pdf
Future of Learning - Yap Aye Wee.pdf
NUS-ISS41 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman27 views
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica... by NUS-ISS
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
NUS-ISS16 views
Perth MeetUp November 2023 by Michael Price
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023
Michael Price15 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Transcript: The Details of Description Techniques tips and tangents on altern... by BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada130 views
The Importance of Cybersecurity for Digital Transformation by NUS-ISS
The Importance of Cybersecurity for Digital TransformationThe Importance of Cybersecurity for Digital Transformation
The Importance of Cybersecurity for Digital Transformation
NUS-ISS27 views
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum... by NUS-ISS
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...
NUS-ISS34 views
Combining Orchestration and Choreography for a Clean Architecture by ThomasHeinrichs1
Combining Orchestration and Choreography for a Clean ArchitectureCombining Orchestration and Choreography for a Clean Architecture
Combining Orchestration and Choreography for a Clean Architecture
ThomasHeinrichs169 views
DALI Basics Course 2023 by Ivory Egg
DALI Basics Course  2023DALI Basics Course  2023
DALI Basics Course 2023
Ivory Egg14 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi120 views

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

  • 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]);
  • 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; }
  • 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; } }
  • 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; } }
  • 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 ) ) );     } }
  • 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';   } }
  • 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; }
  • 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 );     } }
  • 102. The Way We Talk About CSS by Rachel Andrew
  • 103. The Way We Talk About CSS by Rachel Andrew