SlideShare a Scribd company logo
1 of 38
Download to read offline
THE ATOMIC STORYBOOK

ITCSS DUSTUP
BOLDLY GOING WHERE DESIGN HAS 

LIKELY GONE BEFORE:
SECTION 1:
HOW WE GOT HERE
WEBPAGES USED TO BE:
▸ Static presentation layer
▸ Single focus — each page was fairly
self-contained
▸ A full page refresh (server roundtrip)
▸ Easy to code: HTML/CSS/JS/PHP
▸ Easy to understand
THESE GAVE WAY TO APPS:
▸ AJAX (async loading was the
missing ingredient)
▸ Fragments, not full pages were
being updated, often with JSON
data hydration
▸ Hyperactive focus => Did I need all
the data, or just this one thing?
▸ The attention span phenomenon: 

“OH LOOK SQUIRREL!”
WITH BIGGER EXPECTATIONS…
▸ Waterfall was in decline
▸ The rise of Agile!
A. Kanban
B. Scrum
▸ Shorter development cycles
▸ “Smaller is better!”
CAME SHORTER DEADLINES
YEAH, WE’RE
GONNA NEED TO
PLAY A LITTLE
CATCH UP…
Bill Lumbergh
DESIGN FALLS BEHIND
▸ Have to be methodical:
A. Information architecture
B. User experience
C. Basic styling
▸ Prefer to design the whole

thing at once
▸ Risk of style creep
DEVELOPMENT FALLS BEHIND
▸ Agile workflows demand discrete pieces of functionality
▸ Design dependencies:
A. Usability, complex workflows
B. Requirements — what are those?
▸ Exploration — “Does this 3 level foldout menu work

better here…or here…how about here?”
SECTION 2:
ATOMIC DESIGN & ME
I KNOW!
WE’LL DESIGN IN CODE!
Hare-brained designer (me)
IN WHICH I AM COMPLETELY OVER MY HEAD
ATOMIC DESIGN IS METHODOLOGY FOR CREATING
DESIGN SYSTEMS. THERE ARE FIVE DISTINCT LEVELS 

IN ATOMIC DESIGN:
Brad Frost — @brad_frost
HTTP://BRADFROST.COM/BLOG/POST/ATOMIC-WEB-DESIGN/
Atoms > Molecules > Organisms > Templates > Pages
HTTP://BRADFROST.COM/BLOG/POST/ATOMIC-WEB-DESIGN/#ATOMS
ATOMS: THE SMALLEST BUILDING BLOCKS
▸ Single HTML tags:
A. Form label
B. Input
C. Paragraph
D. Header
E. Link
HTTP://BRADFROST.COM/BLOG/POST/ATOMIC-WEB-DESIGN/#MOLECULES
MOLECULES: GROUPS OF ATOMS BONDED TOGETHER
▸ Possible combinations:
A. Form label & input
B. Search box
C. Button bar (tabs)
D. Text block (header, sub-header, timestamp, paragraph)
HTTP://BRADFROST.COM/BLOG/POST/ATOMIC-WEB-DESIGN/#ORGANISMS
ORGANISMS: MOLECULES FORMING DISTINCT UI COMPONENTS
▸ Possible combinations:
A. Header
B. Navigation bar + flyout menus
C. Main body text + aside
D. Footer
HTTP://BRADFROST.COM/BLOG/POST/ATOMIC-WEB-DESIGN/#TEMPLATES
TEMPLATES: BLOCKED REPRESENTATIONS OF FULL PAGES
▸ Useful for information architecture and content design
▸ Help customers visualize the layout
▸ Help customers adjust content “shape”
HTTP://BRADFROST.COM/BLOG/POST/ATOMIC-WEB-DESIGN/#PAGES
PAGES: SPECIFIC TEMPLATE INSTANCES
▸ Built from multiple atoms, molecules, organisms
▸ Allow designers to build smaller, discrete things
GREAT!
HOW DO WE GET THERE?
PATTERN LAB
▸ Simple way for designers to build UI
components in code
▸ Single source of truth for visual design
▸ PHP or Node + Gulp
▸ Minimal templating in Mustache
▸ JSON includes for realistic data models
▸ Easily exported as a static site
HTTP://PATTERNLAB.IO/
THAT’S LUNCH, RIGHT?
JUST ONE SMALL DETAIL…
WE USE REACT, SO SOMEONE HAS TO
REFACTOR THOSE PATTERNS INTO JSX…
YEAH…
EVERYTHING’S A COPY:
▸ Patterns created outside the front-end tooling

are a layer removed from the finished product
▸ Nuance can get lost in translation —

“I wanted that to slide in, not jump up from the bottom.”
▸ In my experience, not much faster than PSD/Sketch
EVERYTHING’S A COPY:EVERYTHING’S A COPY:EVERYTHING’S A COPY:
SECTION 3A:
BACK TO THE PROVERBIAL
DRAWING BOARD
DESIGNERS DON’T REACT!
THIS ONE DOES.
THIS ACTUALLY REQUIRED ME TO LEARN REACT
▸ A little scary, but I’m adapting well
▸ Eliminates a layer of abstraction

between my elements and final code
▸ Uses the latest tools:
A. React + Webpack (1) :( Sorry @thelarkinn
B. Babel + ES6
C. And a few others…
SECTION 3B:
SO I HAVE COMPONENTS.
CSS STILL SUCKS.
CSS IS KUDZU VINE
CSS PROBLEM #1:
SPECIFICITY
▸ Discipline is high at beginning of project
▸ Everyone agrees to basic hierarchy, class-based approach
▸ Discipline is lost as deadlines loom, overtime mounts
▸ !important begins creeping into your code base
▸ Rules are over-written in too-specific ways, leading to this:

#main .layout-container . layout-container-inner div div div…
▸ Visual layouts become brittle, harder to verify integrity
CSS PROBLEM #2:
NAMESPACING (OR LACK THEREOF)
▸ Can fake this with Sass/Less, but it’s still just a class inside
another class
▸ Can be clobbered with an ID or overly nested (specific) rule
HTTP://WWW.CREATIVEBLOQ.COM/WEB-DESIGN/MANAGE-LARGE-CSS-PROJECTS-
ITCSS-101517528
ENTER ITCSS 

(INVERTED TRIANGLE CSS)
THIS IS A METHODOLOGY THAT INVOLVES
VISUALISING YOUR ENTIRE CSS PROJECT AS

A LAYERED, UPSIDE-DOWN TRIANGLE. THIS
HIERARCHICAL SHAPE REPRESENTS A MODEL

THAT WILL HELP YOU ORDER YOUR CSS IN THE

MOST EFFECTIVE, LEAST WASTEFUL WAY.
Harry Roberts — @czzwizardry
HTTP://WWW.CREATIVEBLOQ.COM/WEB-DESIGN/MANAGE-LARGE-CSS-PROJECTS-
ITCSS-101517528
ITCSS IS AND DOES THE FOLLOWING:
▸ Favors a class-based, NO ID, component architecture
▸ Generic to explicit CSS
A. Top of the triangle is very general, catch all, settings
B. Bottom is very specific, usually a single component
▸ Low to high specificity
A. Start out capturing more items due to low specificity
B. Increase specificity through each level of the triangle
C. Makes progressive passes over the DOM, refining CSS with each pass
D. Uses !important as a feature, not a bug
CONFESSION TIME:
▸ I’m moving away from Sass / SCSS! Shock! Horror!
▸ It’s true. I have finally found a few nits:
A. A bit slower when compared to alternatives
B. Ruby dependency, which isn’t a crime, but this is JS!
C. Bad habits like too-deep nesting, wrong use of @extend
and %placeholder
D. Better alternatives?
SECTION 3C:
CSS MODULES AND
POSTCSS
HTTPS://GLENMADDERN.COM/ARTICLES/CSS-MODULES
CSS MODULES + REACT FOR GREAT GOOD
▸ Not React specific, but they work great

with React components
▸ CSS modules are local by default:
▸ Import * from ‘../objects/Layout.css’;
▸ Namespaces: Layout__flex__<hash64:5>
▸ Collisions are very unlikely
CSS COMPOSITION FTW
.common {

/* all the common styles you want */

}
.normal {

composes: common;

/* anything that only applies to normal */

}
.disabled {

composes: common;

/* anything that only applies to disabled */

}
HTTPS://GLENMADDERN.COM/ARTICLES/CSS-MODULES
HTTPS://GITHUB.COM/POSTCSS/POSTCSS
POSTCSS: THE POWER IS IN YOUR HANDS
▸ All the cool stuff of Sass/SCSS/Less
▸ CSS Next (Level 4, native variables, more)
▸ Cleaner CSS, less nesting w/ composition
▸ Webpack pipelining
SECTION 4:
LIVE CODE!!!
Github.com/1Copenut/atomic-storybook

More Related Content

What's hot

Evolving your Design System: People, Product, and Process
Evolving your Design System: People, Product, and ProcessEvolving your Design System: People, Product, and Process
Evolving your Design System: People, Product, and Processuxpin
 
The User Experience Iceberg
The User Experience IcebergThe User Experience Iceberg
The User Experience IcebergTrevor van Gorp
 
Design systems: accounting for quality and scalability
Design systems: accounting for quality and scalabilityDesign systems: accounting for quality and scalability
Design systems: accounting for quality and scalabilityuxpin
 
Building a Mature Design System
Building a Mature Design SystemBuilding a Mature Design System
Building a Mature Design SystemDrew Burdick
 
Design System & Atomic Design
Design System & Atomic DesignDesign System & Atomic Design
Design System & Atomic DesignVani Jain
 
Design System - Fail, Learn, Build, Test
Design System - Fail, Learn, Build, TestDesign System - Fail, Learn, Build, Test
Design System - Fail, Learn, Build, TestPaya Do
 
Design system presentation - How to sell it internally
Design system presentation - How to sell it internallyDesign system presentation - How to sell it internally
Design system presentation - How to sell it internallyEugene Kardash
 
アジャイル開発の現在・過去・未来~今を知り、源流を訪ね、先を見据える~
アジャイル開発の現在・過去・未来~今を知り、源流を訪ね、先を見据える~アジャイル開発の現在・過去・未来~今を知り、源流を訪ね、先を見据える~
アジャイル開発の現在・過去・未来~今を知り、源流を訪ね、先を見据える~Kenji Hiranabe
 
Initiating and Sustaining Design Systems for the Enterprise
Initiating and Sustaining Design Systems for the EnterpriseInitiating and Sustaining Design Systems for the Enterprise
Initiating and Sustaining Design Systems for the Enterpriseuxpin
 
Design Systems: Enterprise UX Evolution
Design Systems: Enterprise UX EvolutionDesign Systems: Enterprise UX Evolution
Design Systems: Enterprise UX EvolutionAnne Grundhoefer
 
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜Jumpei Miyata
 
Role-Based Accessibility in Government
Role-Based Accessibility in GovernmentRole-Based Accessibility in Government
Role-Based Accessibility in GovernmentAngela M. Hooker
 
A design system. A year in review.
A design system. A year in review.A design system. A year in review.
A design system. A year in review.James Ferguson
 
Design Systems at Scale
Design Systems at ScaleDesign Systems at Scale
Design Systems at ScaleSarah Federman
 
User Story Smells & Anti-patterns
User Story Smells & Anti-patternsUser Story Smells & Anti-patterns
User Story Smells & Anti-patternsFadi Stephan
 
Creating and maintaining a design system for 130 teams - Bethany Sonefeld
Creating and maintaining a design system for 130 teams - Bethany SonefeldCreating and maintaining a design system for 130 teams - Bethany Sonefeld
Creating and maintaining a design system for 130 teams - Bethany Sonefelduxpin
 

What's hot (20)

Evolving your Design System: People, Product, and Process
Evolving your Design System: People, Product, and ProcessEvolving your Design System: People, Product, and Process
Evolving your Design System: People, Product, and Process
 
Design System
Design SystemDesign System
Design System
 
The User Experience Iceberg
The User Experience IcebergThe User Experience Iceberg
The User Experience Iceberg
 
Design systems: accounting for quality and scalability
Design systems: accounting for quality and scalabilityDesign systems: accounting for quality and scalability
Design systems: accounting for quality and scalability
 
Building a Mature Design System
Building a Mature Design SystemBuilding a Mature Design System
Building a Mature Design System
 
Design System & Atomic Design
Design System & Atomic DesignDesign System & Atomic Design
Design System & Atomic Design
 
Design System - Fail, Learn, Build, Test
Design System - Fail, Learn, Build, TestDesign System - Fail, Learn, Build, Test
Design System - Fail, Learn, Build, Test
 
Design system presentation - How to sell it internally
Design system presentation - How to sell it internallyDesign system presentation - How to sell it internally
Design system presentation - How to sell it internally
 
Atomic design in React
Atomic design in ReactAtomic design in React
Atomic design in React
 
アジャイル開発の現在・過去・未来~今を知り、源流を訪ね、先を見据える~
アジャイル開発の現在・過去・未来~今を知り、源流を訪ね、先を見据える~アジャイル開発の現在・過去・未来~今を知り、源流を訪ね、先を見据える~
アジャイル開発の現在・過去・未来~今を知り、源流を訪ね、先を見据える~
 
Initiating and Sustaining Design Systems for the Enterprise
Initiating and Sustaining Design Systems for the EnterpriseInitiating and Sustaining Design Systems for the Enterprise
Initiating and Sustaining Design Systems for the Enterprise
 
Design Systems: Enterprise UX Evolution
Design Systems: Enterprise UX EvolutionDesign Systems: Enterprise UX Evolution
Design Systems: Enterprise UX Evolution
 
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
 
Role-Based Accessibility in Government
Role-Based Accessibility in GovernmentRole-Based Accessibility in Government
Role-Based Accessibility in Government
 
A design system. A year in review.
A design system. A year in review.A design system. A year in review.
A design system. A year in review.
 
Design Systems at Scale
Design Systems at ScaleDesign Systems at Scale
Design Systems at Scale
 
SPAと覚悟
SPAと覚悟SPAと覚悟
SPAと覚悟
 
User Story Smells & Anti-patterns
User Story Smells & Anti-patternsUser Story Smells & Anti-patterns
User Story Smells & Anti-patterns
 
Atomic design
Atomic designAtomic design
Atomic design
 
Creating and maintaining a design system for 130 teams - Bethany Sonefeld
Creating and maintaining a design system for 130 teams - Bethany SonefeldCreating and maintaining a design system for 130 teams - Bethany Sonefeld
Creating and maintaining a design system for 130 teams - Bethany Sonefeld
 

Similar to React Storybook, Atomic Design, and ITCSS

Front End Best Practices
Front End Best PracticesFront End Best Practices
Front End Best PracticesHolger Bartel
 
The Fast And The Fabulous
The Fast And The FabulousThe Fast And The Fabulous
The Fast And The FabulousNicole Sullivan
 
Cache Rules Everything Around Me
Cache Rules Everything Around MeCache Rules Everything Around Me
Cache Rules Everything Around MeRussell Heimlich
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingAshok Modi
 
Architecting with Style
Architecting with StyleArchitecting with Style
Architecting with StyleTimothy Knight
 
Scalable front-end architecture with Bootstrap 3 + Atomic CSS
Scalable front-end architecture with Bootstrap 3 + Atomic CSSScalable front-end architecture with Bootstrap 3 + Atomic CSS
Scalable front-end architecture with Bootstrap 3 + Atomic CSSHayden Bleasel
 
Copass + Ruby on Rails = &lt;3 - From Simplicity to Complexity
Copass + Ruby on Rails = &lt;3 - From Simplicity to ComplexityCopass + Ruby on Rails = &lt;3 - From Simplicity to Complexity
Copass + Ruby on Rails = &lt;3 - From Simplicity to ComplexityAugustin Riedinger
 
Architecture for css
Architecture for cssArchitecture for css
Architecture for cssMohamed Amin
 
Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019Katie Sylor-Miller
 
[Access U 2010] HTML5 & Accessibility
[Access U 2010] HTML5 & Accessibility[Access U 2010] HTML5 & Accessibility
[Access U 2010] HTML5 & AccessibilityChristopher Schmitt
 
Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Derek Jacoby
 
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)Christopher Schmitt
 
Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3adamsilverstein
 
What is Object Oriented CSS?
What is Object Oriented CSS?What is Object Oriented CSS?
What is Object Oriented CSS?Nicole Sullivan
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityAshok Modi
 
CSS Audits: Take Back Control of your CSS (Susan Robertson)
CSS Audits: Take Back Control of your CSS (Susan Robertson)CSS Audits: Take Back Control of your CSS (Susan Robertson)
CSS Audits: Take Back Control of your CSS (Susan Robertson)Future Insights
 
The State of Rust Web Frameworks
The State of Rust Web FrameworksThe State of Rust Web Frameworks
The State of Rust Web FrameworksIanWagner10
 
Teams, styles and scalable applications
Teams, styles and scalable applicationsTeams, styles and scalable applications
Teams, styles and scalable applicationsVittorio Vittori
 

Similar to React Storybook, Atomic Design, and ITCSS (20)

Front End Best Practices
Front End Best PracticesFront End Best Practices
Front End Best Practices
 
The Fast And The Fabulous
The Fast And The FabulousThe Fast And The Fabulous
The Fast And The Fabulous
 
Cache Rules Everything Around Me
Cache Rules Everything Around MeCache Rules Everything Around Me
Cache Rules Everything Around Me
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
 
Architecting with Style
Architecting with StyleArchitecting with Style
Architecting with Style
 
Scalable front-end architecture with Bootstrap 3 + Atomic CSS
Scalable front-end architecture with Bootstrap 3 + Atomic CSSScalable front-end architecture with Bootstrap 3 + Atomic CSS
Scalable front-end architecture with Bootstrap 3 + Atomic CSS
 
Copass + Ruby on Rails = &lt;3 - From Simplicity to Complexity
Copass + Ruby on Rails = &lt;3 - From Simplicity to ComplexityCopass + Ruby on Rails = &lt;3 - From Simplicity to Complexity
Copass + Ruby on Rails = &lt;3 - From Simplicity to Complexity
 
Architecture for css
Architecture for cssArchitecture for css
Architecture for css
 
Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019
 
[Access U 2010] HTML5 & Accessibility
[Access U 2010] HTML5 & Accessibility[Access U 2010] HTML5 & Accessibility
[Access U 2010] HTML5 & Accessibility
 
Please dont touch-3.6-jsday
Please dont touch-3.6-jsdayPlease dont touch-3.6-jsday
Please dont touch-3.6-jsday
 
Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4Untangling the web - fall2017 - class 4
Untangling the web - fall2017 - class 4
 
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
 
Css Systems
Css SystemsCss Systems
Css Systems
 
Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3Put a little Backbone in your WordPress vs. 3
Put a little Backbone in your WordPress vs. 3
 
What is Object Oriented CSS?
What is Object Oriented CSS?What is Object Oriented CSS?
What is Object Oriented CSS?
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and Scalability
 
CSS Audits: Take Back Control of your CSS (Susan Robertson)
CSS Audits: Take Back Control of your CSS (Susan Robertson)CSS Audits: Take Back Control of your CSS (Susan Robertson)
CSS Audits: Take Back Control of your CSS (Susan Robertson)
 
The State of Rust Web Frameworks
The State of Rust Web FrameworksThe State of Rust Web Frameworks
The State of Rust Web Frameworks
 
Teams, styles and scalable applications
Teams, styles and scalable applicationsTeams, styles and scalable applications
Teams, styles and scalable applications
 

Recently uploaded

%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 

Recently uploaded (20)

%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 

React Storybook, Atomic Design, and ITCSS

  • 1. THE ATOMIC STORYBOOK
 ITCSS DUSTUP BOLDLY GOING WHERE DESIGN HAS 
 LIKELY GONE BEFORE:
  • 2. SECTION 1: HOW WE GOT HERE
  • 3. WEBPAGES USED TO BE: ▸ Static presentation layer ▸ Single focus — each page was fairly self-contained ▸ A full page refresh (server roundtrip) ▸ Easy to code: HTML/CSS/JS/PHP ▸ Easy to understand
  • 4. THESE GAVE WAY TO APPS: ▸ AJAX (async loading was the missing ingredient) ▸ Fragments, not full pages were being updated, often with JSON data hydration ▸ Hyperactive focus => Did I need all the data, or just this one thing? ▸ The attention span phenomenon: 
 “OH LOOK SQUIRREL!”
  • 5. WITH BIGGER EXPECTATIONS… ▸ Waterfall was in decline ▸ The rise of Agile! A. Kanban B. Scrum ▸ Shorter development cycles ▸ “Smaller is better!” CAME SHORTER DEADLINES
  • 6. YEAH, WE’RE GONNA NEED TO PLAY A LITTLE CATCH UP… Bill Lumbergh
  • 7. DESIGN FALLS BEHIND ▸ Have to be methodical: A. Information architecture B. User experience C. Basic styling ▸ Prefer to design the whole
 thing at once ▸ Risk of style creep
  • 8. DEVELOPMENT FALLS BEHIND ▸ Agile workflows demand discrete pieces of functionality ▸ Design dependencies: A. Usability, complex workflows B. Requirements — what are those? ▸ Exploration — “Does this 3 level foldout menu work
 better here…or here…how about here?”
  • 10. I KNOW! WE’LL DESIGN IN CODE! Hare-brained designer (me) IN WHICH I AM COMPLETELY OVER MY HEAD
  • 11. ATOMIC DESIGN IS METHODOLOGY FOR CREATING DESIGN SYSTEMS. THERE ARE FIVE DISTINCT LEVELS 
 IN ATOMIC DESIGN: Brad Frost — @brad_frost HTTP://BRADFROST.COM/BLOG/POST/ATOMIC-WEB-DESIGN/ Atoms > Molecules > Organisms > Templates > Pages
  • 12. HTTP://BRADFROST.COM/BLOG/POST/ATOMIC-WEB-DESIGN/#ATOMS ATOMS: THE SMALLEST BUILDING BLOCKS ▸ Single HTML tags: A. Form label B. Input C. Paragraph D. Header E. Link
  • 13. HTTP://BRADFROST.COM/BLOG/POST/ATOMIC-WEB-DESIGN/#MOLECULES MOLECULES: GROUPS OF ATOMS BONDED TOGETHER ▸ Possible combinations: A. Form label & input B. Search box C. Button bar (tabs) D. Text block (header, sub-header, timestamp, paragraph)
  • 14. HTTP://BRADFROST.COM/BLOG/POST/ATOMIC-WEB-DESIGN/#ORGANISMS ORGANISMS: MOLECULES FORMING DISTINCT UI COMPONENTS ▸ Possible combinations: A. Header B. Navigation bar + flyout menus C. Main body text + aside D. Footer
  • 15. HTTP://BRADFROST.COM/BLOG/POST/ATOMIC-WEB-DESIGN/#TEMPLATES TEMPLATES: BLOCKED REPRESENTATIONS OF FULL PAGES ▸ Useful for information architecture and content design ▸ Help customers visualize the layout ▸ Help customers adjust content “shape”
  • 16. HTTP://BRADFROST.COM/BLOG/POST/ATOMIC-WEB-DESIGN/#PAGES PAGES: SPECIFIC TEMPLATE INSTANCES ▸ Built from multiple atoms, molecules, organisms ▸ Allow designers to build smaller, discrete things
  • 17. GREAT! HOW DO WE GET THERE?
  • 18. PATTERN LAB ▸ Simple way for designers to build UI components in code ▸ Single source of truth for visual design ▸ PHP or Node + Gulp ▸ Minimal templating in Mustache ▸ JSON includes for realistic data models ▸ Easily exported as a static site HTTP://PATTERNLAB.IO/
  • 20. JUST ONE SMALL DETAIL… WE USE REACT, SO SOMEONE HAS TO REFACTOR THOSE PATTERNS INTO JSX… YEAH…
  • 21. EVERYTHING’S A COPY: ▸ Patterns created outside the front-end tooling
 are a layer removed from the finished product ▸ Nuance can get lost in translation —
 “I wanted that to slide in, not jump up from the bottom.” ▸ In my experience, not much faster than PSD/Sketch EVERYTHING’S A COPY:EVERYTHING’S A COPY:EVERYTHING’S A COPY:
  • 22. SECTION 3A: BACK TO THE PROVERBIAL DRAWING BOARD
  • 24. THIS ACTUALLY REQUIRED ME TO LEARN REACT ▸ A little scary, but I’m adapting well ▸ Eliminates a layer of abstraction
 between my elements and final code ▸ Uses the latest tools: A. React + Webpack (1) :( Sorry @thelarkinn B. Babel + ES6 C. And a few others…
  • 25.
  • 26. SECTION 3B: SO I HAVE COMPONENTS. CSS STILL SUCKS.
  • 27. CSS IS KUDZU VINE
  • 28. CSS PROBLEM #1: SPECIFICITY ▸ Discipline is high at beginning of project ▸ Everyone agrees to basic hierarchy, class-based approach ▸ Discipline is lost as deadlines loom, overtime mounts ▸ !important begins creeping into your code base ▸ Rules are over-written in too-specific ways, leading to this:
 #main .layout-container . layout-container-inner div div div… ▸ Visual layouts become brittle, harder to verify integrity
  • 29. CSS PROBLEM #2: NAMESPACING (OR LACK THEREOF) ▸ Can fake this with Sass/Less, but it’s still just a class inside another class ▸ Can be clobbered with an ID or overly nested (specific) rule
  • 31. THIS IS A METHODOLOGY THAT INVOLVES VISUALISING YOUR ENTIRE CSS PROJECT AS
 A LAYERED, UPSIDE-DOWN TRIANGLE. THIS HIERARCHICAL SHAPE REPRESENTS A MODEL
 THAT WILL HELP YOU ORDER YOUR CSS IN THE
 MOST EFFECTIVE, LEAST WASTEFUL WAY. Harry Roberts — @czzwizardry HTTP://WWW.CREATIVEBLOQ.COM/WEB-DESIGN/MANAGE-LARGE-CSS-PROJECTS- ITCSS-101517528
  • 32. ITCSS IS AND DOES THE FOLLOWING: ▸ Favors a class-based, NO ID, component architecture ▸ Generic to explicit CSS A. Top of the triangle is very general, catch all, settings B. Bottom is very specific, usually a single component ▸ Low to high specificity A. Start out capturing more items due to low specificity B. Increase specificity through each level of the triangle C. Makes progressive passes over the DOM, refining CSS with each pass D. Uses !important as a feature, not a bug
  • 33. CONFESSION TIME: ▸ I’m moving away from Sass / SCSS! Shock! Horror! ▸ It’s true. I have finally found a few nits: A. A bit slower when compared to alternatives B. Ruby dependency, which isn’t a crime, but this is JS! C. Bad habits like too-deep nesting, wrong use of @extend and %placeholder D. Better alternatives?
  • 34. SECTION 3C: CSS MODULES AND POSTCSS
  • 35. HTTPS://GLENMADDERN.COM/ARTICLES/CSS-MODULES CSS MODULES + REACT FOR GREAT GOOD ▸ Not React specific, but they work great
 with React components ▸ CSS modules are local by default: ▸ Import * from ‘../objects/Layout.css’; ▸ Namespaces: Layout__flex__<hash64:5> ▸ Collisions are very unlikely
  • 36. CSS COMPOSITION FTW .common {
 /* all the common styles you want */
 } .normal {
 composes: common;
 /* anything that only applies to normal */
 } .disabled {
 composes: common;
 /* anything that only applies to disabled */
 } HTTPS://GLENMADDERN.COM/ARTICLES/CSS-MODULES
  • 37. HTTPS://GITHUB.COM/POSTCSS/POSTCSS POSTCSS: THE POWER IS IN YOUR HANDS ▸ All the cool stuff of Sass/SCSS/Less ▸ CSS Next (Level 4, native variables, more) ▸ Cleaner CSS, less nesting w/ composition ▸ Webpack pipelining