SlideShare a Scribd company logo
1 of 52
Download to read offline
Use atomic design WTF !
@loicgoyet
atoms molecules organisms templates pages
atom example
button
molecule example
buttoninput group
organisms example
Dr. Manhattan Home - About - Contact buttoninput group
template example
Dr. Manhattan Home - About - Contact buttoninput group
Col section heading
Lorem ipsum dolor sit
amet, consectetur
adipiscing elit. Donec ut
leo non erat vehicula
aliquam. Donec lorem
tellus, rhoncus ac orci
vel, pellentesque sodales
tellus. Aenean mollis
laoreet egestas. Aliquam
finibus sem pretium est
porta consectetur. Sed
tempor scelerisque elit
quis accumsan. Morbi
sagittis lorem feugiat
blandit lobortis. Vivamus
ut tempus ligula.
Nulla dictum tellus nec
fermentum varius. Fusce
magna ex, rutrum sit
amet scelerisque nec,
cursus sit amet elit.
Interdum et malesuada
page example
Dr. Manhattan Home - About - Contact search
Welcome
Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
Donec ut leo non erat vehicula
aliquam. Donec lorem tellus,
rhoncus ac orci vel, pellentesque
sodales tellus. Aenean mollis
laoreet egestas. Aliquam finibus
sem pretium est porta
consectetur. Sed tempor
scelerisque elit quis accumsan.
Morbi sagittis lorem feugiat
blandit lobortis. Vivamus ut
scalability & consistency
-Brad Frost
assembling rather than deconstructing, we’re
crafting a system right out of the gate instead of
cherry picking patterns after the fact.
button
button
padding x-axis: 1.2empadding y-axis: 0.8em
line-height: 1.2
font-size: 1.1em
border-width: 0.01em
background-color: rgb(220, 222, 224)
border-color: rgb(166, 170, 169)
button
padding x-axis: 1.2empadding y-axis: 0.8em
line-height: 1.2
font-size: 1.1em
border-width: 0.01em
background-color: rgb(220, 222, 224)
border-color: rgb(166, 170, 169)
button
tooltips
breadcrumbs
jumbotron
thumbnails
background-color: rgb(220, 222, 224)
button
tooltips
breadcrumbs
jumbotron
thumbnails
.bg-color—gray
<button class="bg-color--gray border-color--gray-dark color--gray-dark padding-y--08x padding-x—12x …”>
button
</button>
-previous article comment
“What about maintenability? Consistence? Markup and style decoupling? (…)
How do you enforce component reusing? Common styling rules?”
@Extends
<button class=“button”>button</button>
// scss
.button {
@extend %bg-color--gray;
@extend %border-color--gray-dark;
@extend %color--gray-dark;
@extend %padding-y--08x;
@extend %padding-x—12x;
}
// less
.button {
&:extend(.bg-color--gray);
&:extend(.border-color--gray-dark);
&:extend(.color--gray-dark);
&:extend(.padding-y--08x);
&:extend(.padding-x—12x);
}
<button class=“button”>button</button>
.bg-color--gray,
.button {
background-color: rgb(220, 222, 224);
}
.border-color--gray,
.button {
border—color: rgb(166, 170, 169);
}
…
@mixins
<button class=“button”>button</button>
@mixin bg-color($color) {
background-color: map-get($colors, $color);
}
.button {
@include bg-color(‘gray’);
}
<button class=“button”>button</button>
// scss
.button {
@include bg-color(‘gray’);
@include border-color(‘gray-dark’);
@include color(‘gray-dark’);
@include padding-y(0.8);
@include padding-x(1.2);
}
// less
.button {
.bg-color(‘gray’);
.border-color(‘gray-dark’);
.color(‘gray-dark’);
.padding-y(0.8);
.padding-x(1.2);
}
<button class=“button”>button</button>
.button {
background-color: rgb(220, 222, 224);
border—color: rgb(166, 170, 169);
}
.thumbnail {
background-color: rgb(220, 222, 224);
border—color: rgb(166, 170, 169);
}
@variables
<button class=“button”>button</button>
// scss
$button—padding-x: 0.8;
.button {
@include padding-x($button-padding-x);
…
}
// less
@button-padding-x: 0.8;
.button {
.padding-x(@button-padding-x);
…
}
// main.scss
$button—bg: green;
@import ‘bower_component/button/button.scss’;
// bower_component/button/button.scss
$button—bg: gray !default;
.button {
background-color: $button-bg;
…
}
// output.css
.button {
background-color: green;
}
// bower_component/button/button.scss
$button—box-shadow: false;
.button {
background-color: $button-bg;
@if $button—box-shadow {
box-shadow: $button—box-shadow;
}
}
$button-themes: (
'primary': (
'bg': blue,
'color': white,
),
'success': (
'bg': green,
'color': white,
),
) !default;
@each $theme, $properties in $button-themes {
.button--#{$theme} {
background-color: map-get($properties, 'bg');
color: map-get($properties, 'color');
}
}
// gulpfile.js
var inject = require('gulp-inject');
gulp.src('./main.scss')
.pipe(inject(gulp.src(‘./bower_component/button/button.scss’), {
relative: true,
name: ‘stylevendor’,
}))
.pipe(gulp.dest(‘./main.scss'));
// main.scss
/* stylevendors:scss */
@import ‘./bower_component/button/button.scss’; // written by gulp
/* endinject */
project partial import order
1. atoms
2. molecules
3. organisms
4. templates
5. pages
project partial import order
3. atoms
4. molecules
5. organisms
6. templates
7. pages
1. code helpers
2. declaration generator
architectures
• abstracts/
• base/
• vendors/
• components/
• layout/
• pages/
• themes/
main.scss
architectures
1. abstracts/
2. base/
3. vendors/
4. components/
5. layout/
6. pages/
7. themes/
➡ code helpers
➡ declaration helpers
➡ atoms
➡ molecules
➡ organisms
➡ templates
➡ pages
css good practices specificity
only classselectors (0 / 0 / 1 / 0)
Nesting Depth max : 2
css good practices specificity
// wrong
.block {
&.is-active {
.block__component {
…
}
}
}
css good practices specificity
// good
@mixin when-block-active {
.block.is-active & {
@content;
}
}
.block__component {
@include when-block-active {
…
}
}
css good practices semantic
no business-logic in selector - design hint for selector
Titre de l’actualité
If you are an infrequent traveler you may
need some tips to keep the wife happy
while you are jet setting around the globe.
Many individuals do...
Lire la suite
css good practices semantic
no business-logic in selector - design hint for selector
// wrong
.blog-item {
…
}
Titre de l’actualité
If you are an infrequent traveler you may
need some tips to keep the wife happy
while you are jet setting around the globe.
Many individuals do...
Lire la suite
css good practices semantic
no business-logic in selector - design hint for selector
// good
.thumbnail {
…
}
Titre de l’actualité
If you are an infrequent traveler you may
need some tips to keep the wife happy
while you are jet setting around the globe.
Many individuals do...
Lire la suite
css good practices declaration type
atoms molecules organisms templates pages
+++ paint
+++ layout
++ paint
++++ layout
+ paint
+++++ layout
++++ paint
++ layout
+++++ paint
+ layout
css good practices values
No Magic Numbers !
// wrong !
.grid {
@include clearfix;
margin-left: -10px;
margin-right: -10px;
}
…
.grid__col {
float: left;
padding-left: 10px;
padding-right: 10px;
}
css good practices values
No Magic Numbers !
$grid—gutter: 20px;
.grid {
@include clearfix;
margin-left: -$grid—gutter / 2;
margin-right: -$grid—gutter / 2;
}
…
.grid__col {
float: left;
padding-left: $grid—gutter / 2;
padding-right: $grid—gutter / 2;
}
css good practices values
No Magic Numbers !
$grid—gutter: 20px;
.grid {
@include clearfix;
margin-left: ceil(-$grid—gutter / 2);
margin-right: floor(-$grid—gutter / 2);
}
…
.grid__col {
float: left;
padding-left: ceil($grid—gutter / 2);
padding-right: floor($grid—gutter / 2);
}
@loicgoyet - @nantescss -

More Related Content

What's hot

Atomic design React Nova Presentation
Atomic design React Nova PresentationAtomic design React Nova Presentation
Atomic design React Nova PresentationSteve Zyglowicz
 
Creating Style Guides with Modularity in Mind
Creating Style Guides with Modularity in MindCreating Style Guides with Modularity in Mind
Creating Style Guides with Modularity in MindNadya Rodionenko
 
Brad frost: Atomic design (Webdagene 2014)
Brad frost: Atomic design (Webdagene 2014)Brad frost: Atomic design (Webdagene 2014)
Brad frost: Atomic design (Webdagene 2014)webdagene
 
Atomic Design
Atomic Design Atomic Design
Atomic Design Rey Mayson
 
Data science for infrastructure dev week 2022
Data science for infrastructure   dev week 2022Data science for infrastructure   dev week 2022
Data science for infrastructure dev week 2022ZainAsgar1
 
An introduction to Emulsify
An introduction to EmulsifyAn introduction to Emulsify
An introduction to Emulsifyvaluebound
 
Beyond Squishy: The Principles of Adaptive Design
Beyond Squishy: The Principles of Adaptive DesignBeyond Squishy: The Principles of Adaptive Design
Beyond Squishy: The Principles of Adaptive DesignBrad Frost
 
Voorhoede - Front-end architecture
Voorhoede - Front-end architectureVoorhoede - Front-end architecture
Voorhoede - Front-end architectureJasper Moelker
 
Documenting an Atomic Design System with Jekyll
Documenting an Atomic Design System with JekyllDocumenting an Atomic Design System with Jekyll
Documenting an Atomic Design System with JekyllTodd Moy
 
So…What Do I Make? (Dan Mall)
So…What Do I Make? (Dan Mall)So…What Do I Make? (Dan Mall)
So…What Do I Make? (Dan Mall)Future Insights
 
Adventures in Atomic Design
Adventures in Atomic DesignAdventures in Atomic Design
Adventures in Atomic DesignAndrew Jones
 
The Death of Lorem Ipsum & Pixel Perfect Content
The Death of Lorem Ipsum & Pixel Perfect ContentThe Death of Lorem Ipsum & Pixel Perfect Content
The Death of Lorem Ipsum & Pixel Perfect ContentDave Olsen
 
Styleguide-Driven Development: The New Web Development
Styleguide-Driven Development: The New Web DevelopmentStyleguide-Driven Development: The New Web Development
Styleguide-Driven Development: The New Web DevelopmentJohn Albin Wilkins
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010Brendan Sera-Shriar
 
SEO Before Yoast: WordCamp Rhode Island
SEO Before Yoast: WordCamp Rhode IslandSEO Before Yoast: WordCamp Rhode Island
SEO Before Yoast: WordCamp Rhode IslandKerch McConlogue
 
How to Make WordPress Your Friend
How to Make WordPress Your FriendHow to Make WordPress Your Friend
How to Make WordPress Your Friendkerchmcc
 
role=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessible
role=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessiblerole=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessible
role=drinks AMS Meetup: 5 Pro Tips for Making Your Email More AccessibleeROI
 
Stop reinventing the wheel: Build Responsive Websites Using Bootstrap
Stop reinventing the wheel: Build Responsive Websites Using BootstrapStop reinventing the wheel: Build Responsive Websites Using Bootstrap
Stop reinventing the wheel: Build Responsive Websites Using Bootstrapfreshlybakedpixels
 

What's hot (20)

Atomic design React Nova Presentation
Atomic design React Nova PresentationAtomic design React Nova Presentation
Atomic design React Nova Presentation
 
Creating Style Guides with Modularity in Mind
Creating Style Guides with Modularity in MindCreating Style Guides with Modularity in Mind
Creating Style Guides with Modularity in Mind
 
Brad frost: Atomic design (Webdagene 2014)
Brad frost: Atomic design (Webdagene 2014)Brad frost: Atomic design (Webdagene 2014)
Brad frost: Atomic design (Webdagene 2014)
 
Atomic Design
Atomic Design Atomic Design
Atomic Design
 
Data science for infrastructure dev week 2022
Data science for infrastructure   dev week 2022Data science for infrastructure   dev week 2022
Data science for infrastructure dev week 2022
 
An introduction to Emulsify
An introduction to EmulsifyAn introduction to Emulsify
An introduction to Emulsify
 
Beyond Squishy: The Principles of Adaptive Design
Beyond Squishy: The Principles of Adaptive DesignBeyond Squishy: The Principles of Adaptive Design
Beyond Squishy: The Principles of Adaptive Design
 
Voorhoede - Front-end architecture
Voorhoede - Front-end architectureVoorhoede - Front-end architecture
Voorhoede - Front-end architecture
 
Documenting an Atomic Design System with Jekyll
Documenting an Atomic Design System with JekyllDocumenting an Atomic Design System with Jekyll
Documenting an Atomic Design System with Jekyll
 
So…What Do I Make? (Dan Mall)
So…What Do I Make? (Dan Mall)So…What Do I Make? (Dan Mall)
So…What Do I Make? (Dan Mall)
 
Adventures in Atomic Design
Adventures in Atomic DesignAdventures in Atomic Design
Adventures in Atomic Design
 
The Death of Lorem Ipsum & Pixel Perfect Content
The Death of Lorem Ipsum & Pixel Perfect ContentThe Death of Lorem Ipsum & Pixel Perfect Content
The Death of Lorem Ipsum & Pixel Perfect Content
 
Styleguide-Driven Development: The New Web Development
Styleguide-Driven Development: The New Web DevelopmentStyleguide-Driven Development: The New Web Development
Styleguide-Driven Development: The New Web Development
 
HTML5 and Joomla! 2.5 Template
HTML5 and Joomla! 2.5 TemplateHTML5 and Joomla! 2.5 Template
HTML5 and Joomla! 2.5 Template
 
WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010
 
SEO Before Yoast: WordCamp Rhode Island
SEO Before Yoast: WordCamp Rhode IslandSEO Before Yoast: WordCamp Rhode Island
SEO Before Yoast: WordCamp Rhode Island
 
WordCamp Baltimore 2016
WordCamp Baltimore 2016WordCamp Baltimore 2016
WordCamp Baltimore 2016
 
How to Make WordPress Your Friend
How to Make WordPress Your FriendHow to Make WordPress Your Friend
How to Make WordPress Your Friend
 
role=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessible
role=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessiblerole=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessible
role=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessible
 
Stop reinventing the wheel: Build Responsive Websites Using Bootstrap
Stop reinventing the wheel: Build Responsive Websites Using BootstrapStop reinventing the wheel: Build Responsive Websites Using Bootstrap
Stop reinventing the wheel: Build Responsive Websites Using Bootstrap
 

Viewers also liked

Better. Faster. UXier. — AToMIC Design
Better. Faster. UXier. — AToMIC DesignBetter. Faster. UXier. — AToMIC Design
Better. Faster. UXier. — AToMIC Designjennifer gergen
 
To the Pattern Lab! Better Collaboration in Drupal Using Atomic Design Princi...
To the Pattern Lab! Better Collaboration in Drupal Using Atomic Design Princi...To the Pattern Lab! Better Collaboration in Drupal Using Atomic Design Princi...
To the Pattern Lab! Better Collaboration in Drupal Using Atomic Design Princi...Daniel Ferro
 
Building an Atomic Design System
Building an Atomic Design SystemBuilding an Atomic Design System
Building an Atomic Design SystemTim Wright
 
Фишки продвижения мобильных приложений от Netpeak
Фишки продвижения мобильных приложений от NetpeakФишки продвижения мобильных приложений от Netpeak
Фишки продвижения мобильных приложений от NetpeakNetpeak
 
Introducing Malta as a Notified AIF Regime
Introducing Malta as a Notified AIF RegimeIntroducing Malta as a Notified AIF Regime
Introducing Malta as a Notified AIF RegimeChris Casapinta
 
Whitepaper: Unified Communications Solution on Communication Enabled Business...
Whitepaper: Unified Communications Solution on Communication Enabled Business...Whitepaper: Unified Communications Solution on Communication Enabled Business...
Whitepaper: Unified Communications Solution on Communication Enabled Business...Happiest Minds Technologies
 
система обеспечения безопасности
система обеспечения безопасностисистема обеспечения безопасности
система обеспечения безопасностиjournalrubezh
 
Ставка на iBeacon. Новинки мобильной индустрии в реальной жизни
Ставка на iBeacon. Новинки мобильной индустрии в реальной жизниСтавка на iBeacon. Новинки мобильной индустрии в реальной жизни
Ставка на iBeacon. Новинки мобильной индустрии в реальной жизниCodeFest
 
Презентация iBeacon. Что такое iBeacon и как эту технологию применять?
Презентация iBeacon. Что такое iBeacon и как эту технологию применять?Презентация iBeacon. Что такое iBeacon и как эту технологию применять?
Презентация iBeacon. Что такое iBeacon и как эту технологию применять?Notissimus
 
Sonic r system
Sonic r systemSonic r system
Sonic r systemsmanager1
 
Yuri Trukhin - IE9 Launch
Yuri Trukhin - IE9 LaunchYuri Trukhin - IE9 Launch
Yuri Trukhin - IE9 Launchbeloslab
 
Iridium idea searcher_slice&reverse_water
Iridium idea searcher_slice&reverse_waterIridium idea searcher_slice&reverse_water
Iridium idea searcher_slice&reverse_waterIridium
 
Adj sample invest resentation
Adj sample invest resentationAdj sample invest resentation
Adj sample invest resentationivgeniya
 

Viewers also liked (20)

Better. Faster. UXier. — AToMIC Design
Better. Faster. UXier. — AToMIC DesignBetter. Faster. UXier. — AToMIC Design
Better. Faster. UXier. — AToMIC Design
 
Atomic Design - Dallas Digital Agency
Atomic Design - Dallas Digital AgencyAtomic Design - Dallas Digital Agency
Atomic Design - Dallas Digital Agency
 
To the Pattern Lab! Better Collaboration in Drupal Using Atomic Design Princi...
To the Pattern Lab! Better Collaboration in Drupal Using Atomic Design Princi...To the Pattern Lab! Better Collaboration in Drupal Using Atomic Design Princi...
To the Pattern Lab! Better Collaboration in Drupal Using Atomic Design Princi...
 
Atomic design
Atomic designAtomic design
Atomic design
 
Building an Atomic Design System
Building an Atomic Design SystemBuilding an Atomic Design System
Building an Atomic Design System
 
Atomic design
Atomic designAtomic design
Atomic design
 
Фишки продвижения мобильных приложений от Netpeak
Фишки продвижения мобильных приложений от NetpeakФишки продвижения мобильных приложений от Netpeak
Фишки продвижения мобильных приложений от Netpeak
 
Happiest Minds Brand Journey
Happiest Minds  Brand JourneyHappiest Minds  Brand Journey
Happiest Minds Brand Journey
 
Introducing Malta as a Notified AIF Regime
Introducing Malta as a Notified AIF RegimeIntroducing Malta as a Notified AIF Regime
Introducing Malta as a Notified AIF Regime
 
Whitepaper: Unified Communications Solution on Communication Enabled Business...
Whitepaper: Unified Communications Solution on Communication Enabled Business...Whitepaper: Unified Communications Solution on Communication Enabled Business...
Whitepaper: Unified Communications Solution on Communication Enabled Business...
 
система обеспечения безопасности
система обеспечения безопасностисистема обеспечения безопасности
система обеспечения безопасности
 
Ставка на iBeacon. Новинки мобильной индустрии в реальной жизни
Ставка на iBeacon. Новинки мобильной индустрии в реальной жизниСтавка на iBeacon. Новинки мобильной индустрии в реальной жизни
Ставка на iBeacon. Новинки мобильной индустрии в реальной жизни
 
Showcode eventer pitch
Showcode eventer   pitchShowcode eventer   pitch
Showcode eventer pitch
 
Презентация iBeacon. Что такое iBeacon и как эту технологию применять?
Презентация iBeacon. Что такое iBeacon и как эту технологию применять?Презентация iBeacon. Что такое iBeacon и как эту технологию применять?
Презентация iBeacon. Что такое iBeacon и как эту технологию применять?
 
LifeHackDay 2015: MOOCology
LifeHackDay 2015: MOOCologyLifeHackDay 2015: MOOCology
LifeHackDay 2015: MOOCology
 
Sonic r system
Sonic r systemSonic r system
Sonic r system
 
Yuri Trukhin - IE9 Launch
Yuri Trukhin - IE9 LaunchYuri Trukhin - IE9 Launch
Yuri Trukhin - IE9 Launch
 
Zebra day
Zebra dayZebra day
Zebra day
 
Iridium idea searcher_slice&reverse_water
Iridium idea searcher_slice&reverse_waterIridium idea searcher_slice&reverse_water
Iridium idea searcher_slice&reverse_water
 
Adj sample invest resentation
Adj sample invest resentationAdj sample invest resentation
Adj sample invest resentation
 

Similar to Use atomic design ftw

Class 4 handout two column layout w mobile web design
Class 4 handout two column layout w mobile web designClass 4 handout two column layout w mobile web design
Class 4 handout two column layout w mobile web designErin M. Kidwell
 
YUI Grids slides by Nate Koechley
YUI Grids slides by Nate KoechleyYUI Grids slides by Nate Koechley
YUI Grids slides by Nate Koechleyguest96840e
 
Nate koechley the yui css foundation
Nate koechley the yui css foundationNate koechley the yui css foundation
Nate koechley the yui css foundationNiles Tang
 
HTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.pptHTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.pptraghavanp4
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Todd Zaki Warfel
 
YGLF 2015 - Boom Performance | Eran Zinman (daPulse)
YGLF 2015 -  Boom Performance | Eran Zinman (daPulse)YGLF 2015 -  Boom Performance | Eran Zinman (daPulse)
YGLF 2015 - Boom Performance | Eran Zinman (daPulse)Eran Zinman
 
BOOM Performance
BOOM PerformanceBOOM Performance
BOOM Performancedapulse
 
What I brought back from Austin
What I brought back from AustinWhat I brought back from Austin
What I brought back from AustinLisa Adkins
 
Building a Single Page Application using Ember.js ... for fun and profit
Building a Single Page Application using Ember.js ... for fun and profitBuilding a Single Page Application using Ember.js ... for fun and profit
Building a Single Page Application using Ember.js ... for fun and profitBen Limmer
 
session_01_react_.pptx
session_01_react_.pptxsession_01_react_.pptx
session_01_react_.pptxAyaBenkabbour1
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucksTim Wright
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Tatsuhiko Miyagawa
 
The Backside of the Class (CSS Day 2015)
The Backside of the Class (CSS Day 2015)The Backside of the Class (CSS Day 2015)
The Backside of the Class (CSS Day 2015)Stephen Hay
 
DG Group - Active Or Passive Website
DG Group - Active Or Passive WebsiteDG Group - Active Or Passive Website
DG Group - Active Or Passive WebsiteFranco De Bonis
 
IBM Lotus Notes Domino XPages and XPages for Mobile
IBM Lotus Notes Domino XPages and XPages for MobileIBM Lotus Notes Domino XPages and XPages for Mobile
IBM Lotus Notes Domino XPages and XPages for MobileChris Toohey
 

Similar to Use atomic design ftw (20)

Class 4 handout two column layout w mobile web design
Class 4 handout two column layout w mobile web designClass 4 handout two column layout w mobile web design
Class 4 handout two column layout w mobile web design
 
YUI Grids slides by Nate Koechley
YUI Grids slides by Nate KoechleyYUI Grids slides by Nate Koechley
YUI Grids slides by Nate Koechley
 
Nate koechley the yui css foundation
Nate koechley the yui css foundationNate koechley the yui css foundation
Nate koechley the yui css foundation
 
HTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.pptHTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.ppt
 
css.ppt
css.pptcss.ppt
css.ppt
 
css.ppt
css.pptcss.ppt
css.ppt
 
Juggling
JugglingJuggling
Juggling
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
 
YGLF 2015 - Boom Performance | Eran Zinman (daPulse)
YGLF 2015 -  Boom Performance | Eran Zinman (daPulse)YGLF 2015 -  Boom Performance | Eran Zinman (daPulse)
YGLF 2015 - Boom Performance | Eran Zinman (daPulse)
 
BOOM Performance
BOOM PerformanceBOOM Performance
BOOM Performance
 
Basic html tags
Basic html tagsBasic html tags
Basic html tags
 
What I brought back from Austin
What I brought back from AustinWhat I brought back from Austin
What I brought back from Austin
 
Building a Single Page Application using Ember.js ... for fun and profit
Building a Single Page Application using Ember.js ... for fun and profitBuilding a Single Page Application using Ember.js ... for fun and profit
Building a Single Page Application using Ember.js ... for fun and profit
 
session_01_react_.pptx
session_01_react_.pptxsession_01_react_.pptx
session_01_react_.pptx
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8
 
The Backside of the Class (CSS Day 2015)
The Backside of the Class (CSS Day 2015)The Backside of the Class (CSS Day 2015)
The Backside of the Class (CSS Day 2015)
 
DG Group - Active Or Passive Website
DG Group - Active Or Passive WebsiteDG Group - Active Or Passive Website
DG Group - Active Or Passive Website
 
IBM Lotus Notes Domino XPages and XPages for Mobile
IBM Lotus Notes Domino XPages and XPages for MobileIBM Lotus Notes Domino XPages and XPages for Mobile
IBM Lotus Notes Domino XPages and XPages for Mobile
 
Using a CSS Framework
Using a CSS FrameworkUsing a CSS Framework
Using a CSS Framework
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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
 
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
 
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
 
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 educationjfdjdjcjdnsjd
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Recently uploaded (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Use atomic design ftw

  • 1. Use atomic design WTF ! @loicgoyet
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. atoms molecules organisms templates pages
  • 9. organisms example Dr. Manhattan Home - About - Contact buttoninput group
  • 10. template example Dr. Manhattan Home - About - Contact buttoninput group Col section heading Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ut leo non erat vehicula aliquam. Donec lorem tellus, rhoncus ac orci vel, pellentesque sodales tellus. Aenean mollis laoreet egestas. Aliquam finibus sem pretium est porta consectetur. Sed tempor scelerisque elit quis accumsan. Morbi sagittis lorem feugiat blandit lobortis. Vivamus ut tempus ligula. Nulla dictum tellus nec fermentum varius. Fusce magna ex, rutrum sit amet scelerisque nec, cursus sit amet elit. Interdum et malesuada
  • 11. page example Dr. Manhattan Home - About - Contact search Welcome Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ut leo non erat vehicula aliquam. Donec lorem tellus, rhoncus ac orci vel, pellentesque sodales tellus. Aenean mollis laoreet egestas. Aliquam finibus sem pretium est porta consectetur. Sed tempor scelerisque elit quis accumsan. Morbi sagittis lorem feugiat blandit lobortis. Vivamus ut
  • 12. scalability & consistency -Brad Frost assembling rather than deconstructing, we’re crafting a system right out of the gate instead of cherry picking patterns after the fact.
  • 14. button padding x-axis: 1.2empadding y-axis: 0.8em line-height: 1.2 font-size: 1.1em border-width: 0.01em background-color: rgb(220, 222, 224) border-color: rgb(166, 170, 169)
  • 15. button padding x-axis: 1.2empadding y-axis: 0.8em line-height: 1.2 font-size: 1.1em border-width: 0.01em background-color: rgb(220, 222, 224) border-color: rgb(166, 170, 169)
  • 18.
  • 19. <button class="bg-color--gray border-color--gray-dark color--gray-dark padding-y--08x padding-x—12x …”> button </button> -previous article comment “What about maintenability? Consistence? Markup and style decoupling? (…) How do you enforce component reusing? Common styling rules?”
  • 21. <button class=“button”>button</button> // scss .button { @extend %bg-color--gray; @extend %border-color--gray-dark; @extend %color--gray-dark; @extend %padding-y--08x; @extend %padding-x—12x; } // less .button { &:extend(.bg-color--gray); &:extend(.border-color--gray-dark); &:extend(.color--gray-dark); &:extend(.padding-y--08x); &:extend(.padding-x—12x); }
  • 22. <button class=“button”>button</button> .bg-color--gray, .button { background-color: rgb(220, 222, 224); } .border-color--gray, .button { border—color: rgb(166, 170, 169); } …
  • 23.
  • 25. <button class=“button”>button</button> @mixin bg-color($color) { background-color: map-get($colors, $color); } .button { @include bg-color(‘gray’); }
  • 26. <button class=“button”>button</button> // scss .button { @include bg-color(‘gray’); @include border-color(‘gray-dark’); @include color(‘gray-dark’); @include padding-y(0.8); @include padding-x(1.2); } // less .button { .bg-color(‘gray’); .border-color(‘gray-dark’); .color(‘gray-dark’); .padding-y(0.8); .padding-x(1.2); }
  • 27. <button class=“button”>button</button> .button { background-color: rgb(220, 222, 224); border—color: rgb(166, 170, 169); } .thumbnail { background-color: rgb(220, 222, 224); border—color: rgb(166, 170, 169); }
  • 29. <button class=“button”>button</button> // scss $button—padding-x: 0.8; .button { @include padding-x($button-padding-x); … } // less @button-padding-x: 0.8; .button { .padding-x(@button-padding-x); … }
  • 30. // main.scss $button—bg: green; @import ‘bower_component/button/button.scss’; // bower_component/button/button.scss $button—bg: gray !default; .button { background-color: $button-bg; … } // output.css .button { background-color: green; }
  • 31. // bower_component/button/button.scss $button—box-shadow: false; .button { background-color: $button-bg; @if $button—box-shadow { box-shadow: $button—box-shadow; } }
  • 32. $button-themes: ( 'primary': ( 'bg': blue, 'color': white, ), 'success': ( 'bg': green, 'color': white, ), ) !default; @each $theme, $properties in $button-themes { .button--#{$theme} { background-color: map-get($properties, 'bg'); color: map-get($properties, 'color'); } }
  • 33.
  • 34.
  • 35.
  • 36. // gulpfile.js var inject = require('gulp-inject'); gulp.src('./main.scss') .pipe(inject(gulp.src(‘./bower_component/button/button.scss’), { relative: true, name: ‘stylevendor’, })) .pipe(gulp.dest(‘./main.scss')); // main.scss /* stylevendors:scss */ @import ‘./bower_component/button/button.scss’; // written by gulp /* endinject */
  • 37. project partial import order 1. atoms 2. molecules 3. organisms 4. templates 5. pages
  • 38. project partial import order 3. atoms 4. molecules 5. organisms 6. templates 7. pages 1. code helpers 2. declaration generator
  • 39. architectures • abstracts/ • base/ • vendors/ • components/ • layout/ • pages/ • themes/ main.scss
  • 40. architectures 1. abstracts/ 2. base/ 3. vendors/ 4. components/ 5. layout/ 6. pages/ 7. themes/ ➡ code helpers ➡ declaration helpers ➡ atoms ➡ molecules ➡ organisms ➡ templates ➡ pages
  • 41. css good practices specificity only classselectors (0 / 0 / 1 / 0) Nesting Depth max : 2
  • 42. css good practices specificity // wrong .block { &.is-active { .block__component { … } } }
  • 43. css good practices specificity // good @mixin when-block-active { .block.is-active & { @content; } } .block__component { @include when-block-active { … } }
  • 44. css good practices semantic no business-logic in selector - design hint for selector Titre de l’actualité If you are an infrequent traveler you may need some tips to keep the wife happy while you are jet setting around the globe. Many individuals do... Lire la suite
  • 45. css good practices semantic no business-logic in selector - design hint for selector // wrong .blog-item { … } Titre de l’actualité If you are an infrequent traveler you may need some tips to keep the wife happy while you are jet setting around the globe. Many individuals do... Lire la suite
  • 46. css good practices semantic no business-logic in selector - design hint for selector // good .thumbnail { … } Titre de l’actualité If you are an infrequent traveler you may need some tips to keep the wife happy while you are jet setting around the globe. Many individuals do... Lire la suite
  • 47. css good practices declaration type atoms molecules organisms templates pages +++ paint +++ layout ++ paint ++++ layout + paint +++++ layout ++++ paint ++ layout +++++ paint + layout
  • 48. css good practices values No Magic Numbers ! // wrong ! .grid { @include clearfix; margin-left: -10px; margin-right: -10px; } … .grid__col { float: left; padding-left: 10px; padding-right: 10px; }
  • 49. css good practices values No Magic Numbers ! $grid—gutter: 20px; .grid { @include clearfix; margin-left: -$grid—gutter / 2; margin-right: -$grid—gutter / 2; } … .grid__col { float: left; padding-left: $grid—gutter / 2; padding-right: $grid—gutter / 2; }
  • 50. css good practices values No Magic Numbers ! $grid—gutter: 20px; .grid { @include clearfix; margin-left: ceil(-$grid—gutter / 2); margin-right: floor(-$grid—gutter / 2); } … .grid__col { float: left; padding-left: ceil($grid—gutter / 2); padding-right: floor($grid—gutter / 2); }
  • 51.