style guide driven development: all hail the robot overlords!
TRANSCRIPT
![Page 1: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/1.jpg)
S E N I O R F R O N T - E N D D E V E L O P E R P R E V I O U S N E X T
STYLE GUIDE DRIVEN DEVELOPMENT: ALL HAIL THE ROBOT OVERLORDS!
J O H N A L B I N W I L K I N S
![Page 2: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/2.jpg)
@JOHNALB I NSenior Front-end Developer
![Page 3: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/3.jpg)
Zen Theme Menu Block
Menu Position Fences
Conditional Stylesheets
404 Navigation
Simple aggregation
Zen Grids
Chroma
Normalize-scss
KSS-node
github.com/JohnAlbin
drupal.org/u/johnalbin
![Page 4: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/4.jpg)
QUESTIONS?
![Page 5: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/5.jpg)
WHERE ARE WE HEADED?
![Page 6: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/6.jpg)
HERE’S A SECRET: NO ONE ELSE REALLY KNOWS
WHAT THEY’RE DOING EITHER.”
“ARE YOU NEW TO FRONT-END WEB DEVELOPMENT?
– N I C O L A S G A L L A G H E R
January, 2013
![Page 7: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/7.jpg)
FRONT-END BLOG POSTS:
Grunt/Gulptask runner
Jenkins / CI build tools
npm shrinkwrap / Bundler
Web Components
CSS frameworks Bootstrap / Foundation
CSS/JS linting
Yeoman / Bowerscaffolding tools
Behat / Selenium regression testing
Vagrant Twig / Handlerbars
Sass / LessTravis
YSlowPageSpeed
Cucumber
WraithKSS
Web Starter Kit
Component
CSSLoad
Node.js
![Page 8: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/8.jpg)
“Everyone is describing the one little piece they’ve created, but don’t explain (or even
reference!) the larger concepts of how all of these elements link together.”
— Frank Chimero,July 2014 Designer News AMA
![Page 9: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/9.jpg)
TECHNOLOGY
![Page 10: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/10.jpg)
PROCESS
![Page 11: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/11.jpg)
MAKING SENSE OF FRONT-END TECH
1. Front-end performance
2. Components
3. Continuous Integration
( make shit faster )
( make shit modular )
( automate shit )
![Page 12: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/12.jpg)
WATERFALL PROJECT
Start Deadline
PlanDesign
DevelopTheme
![Page 13: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/13.jpg)
Start Deadline
PlanDesign
DevelopTheme
Tod
ay
WATERFALL PROJECT
![Page 14: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/14.jpg)
REDUCE YOUR R ISKby controlling/minimizing your risk
AG I LE DEVELOPMENT
![Page 15: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/15.jpg)
• Prioritizes project goals
• Completes a set of features
• Creates a releasable product
Each 2-week sprint:
Feature backlogFeature #1
Feature #2
Feature #3
Feature #4
Feature #5
Feature #6
Feature #7
Feature #8
Feature #9
Feature #10Start
Dead
line
Sprint Sprint Sprint Sprint Sprint Sprint Sprint
AG I LE PROJECT
![Page 16: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/16.jpg)
AG I LE + WEB = ?
![Page 17: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/17.jpg)
![Page 18: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/18.jpg)
STYLE-GU IDE-DR IVEN DEVELOPMENT
Only requirements are:
Component-based design and
Automated style guides
![Page 19: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/19.jpg)
“Component” is the same as…
“Object” in OOCSS
“Module” in SMACSS
“Block” in BEM’s Block-Element-Modifier
“Web component” in HTML
WHAT IS A DES IGN COMPONENT?
![Page 20: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/20.jpg)
CSS DES IGN COMPONENTS ARE:• Applied to a loose collection of
HTML elements
• Repeatable(even if never repeated)
• SpecificReplace CSS specificity with specific names
• Self containedStyles do not bleed onto anything else
• Nest-able
![Page 21: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/21.jpg)
![Page 22: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/22.jpg)
![Page 23: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/23.jpg)
SM
AC
SS
BE
M}1.BASE COMPONENTS
2.LAYOUT COMPONENTS
3.COMPONENTS
3.1.COMPONENT
3.2.ELEMENT
3.3.MODIFIER
3.4.STATE
3.5.SKIN
![Page 24: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/24.jpg)
3.1.COMPONENT 3.2.ELEMENT 3.3.MOD I F I ER 3.4.STATE 3.5.SK I N
.flower
![Page 25: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/25.jpg)
3.1.COMPONENT 3.2.ELEMENT 3.3.MOD I F I ER 3.4.STATE 3.5.SK I N
.flower_ _ petals
![Page 26: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/26.jpg)
.flower_ _face .flower_ _stem
.flower_ _leaves
![Page 27: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/27.jpg)
3.1.COMPONENT 3.2.ELEMENT 3.3.MOD I F I ER 3.4.STATE 3.5.SK I N
.flower_ _ bed
![Page 28: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/28.jpg)
3.1.COMPONENT 3.2.ELEMENT 3.3.MOD I F I ER 3.4.STATE 3.5.SK I N
.flower--tulip
![Page 29: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/29.jpg)
.flower:hover
3.1.COMPONENT
3.2.ELEMENT
3.3.MODIFIER
3.4.STATE
3.5.SKIN
![Page 30: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/30.jpg)
.flower.is-pollinating
3.1.COMPONENT
3.2.ELEMENT
3.3.MODIFIER
3.4.STATE
3.5.SKIN
![Page 31: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/31.jpg)
@media (min-width: 48em) { .flower }
3.1.COMPONENT
3.2.ELEMENT
3.3.MODIFIER
3.4.STATE
3.5.SKIN
![Page 32: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/32.jpg)
3.1.COMPONENT
3.2.ELEMENT
3.3.MODIFIER
3.4.STATE
3.5.SKIN
@media print { .flower }
![Page 33: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/33.jpg)
.is-night .flower3.1.COMPONEN
T
3.2.ELEMENT
3.3.MODIFIER
3.4.STATE
3.5.SKIN( global modifier )
![Page 34: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/34.jpg)
An automated
style guide of
.flower is available:
johnalbin.github.io/flower-power
.flower
![Page 35: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/35.jpg)
DON’T MAKE IT COMPLICATED
.channel-tab_ _guide_ _upcoming-video_ _info_ _time
![Page 36: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/36.jpg)
![Page 37: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/37.jpg)
the names are user-facing
Naming things is hard
if
![Page 38: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/38.jpg)
HOW TO NAME TH INGS:
• Spend 30 seconds to name it • Develop • Spend 5 minutes reflecting (Maybe add a TODO) • Commit • After some time, refactor
![Page 39: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/39.jpg)
DRUPAL 8 CSS COD ING STANDARDS
www.drupal.org/node/1886770
NAMING CONVENTION > NAMES
![Page 40: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/40.jpg)
All the selectors
.the%component+
.the%component%%modifier+
.the%component__an%element+
.the%component%%modifier__an%element+
.the%component.is%state+
+ .the%component:hover+
+ @media+all+{+.the%component+{}+}+
.the%skin+.the%component
![Page 41: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/41.jpg)
EASY TO F I ND YOUR COMPONENTS.
• Inspect the DOM.
• Find the CSS class on the
component.
• Look for a file with that
name in the components
folder.
![Page 42: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/42.jpg)
Selector in DOMI couldn’t change
Class name I wishI could use in DOM
THE “FUGLY” SELECTOR HACK
![Page 43: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/43.jpg)
Style guides are:
documentationfor design systems
![Page 44: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/44.jpg)
Style guides are AMAZING!
Out-of-date style guides are USELESS!
![Page 45: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/45.jpg)
kss-nodegithub.com/kss-node/kss-node
AUTOMATED STYLE GU I DE
![Page 46: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/46.jpg)
KSS: super-simple documentation
![Page 47: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/47.jpg)
AUTOMATED STYLE GUIDE
![Page 48: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/48.jpg)
• Build CSS from Sass/LESS/etc.
• Linting for CSS/Sass/JavaScript
• Build Style Guide
• Visual Regression testing
• Live reload
TASK RUNNER?
![Page 49: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/49.jpg)
LIVE DEMO !!!!
![Page 50: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/50.jpg)
STYLE-GU IDE-DR IVEN DEVELOPMENT
Only requirements are:
Component-based design and
Automated style guides
![Page 51: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/51.jpg)
PROCESS
![Page 52: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/52.jpg)
PROCESS TR I FECTA!
• Designers • Back-end developers • Front-end developers
![Page 53: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/53.jpg)
DECOUPLED DEVELOPMENT
“i love the style guide stuff.Means I can make things pretty!!!”
Actual back-end developer quote:
![Page 54: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/54.jpg)
SO MUCH WIN!
• Designers • Back-end developers • Front-end developers • Clients • Lawyers • Project Managers • even more!
![Page 55: Style Guide Driven Development: All Hail the Robot Overlords!](https://reader031.vdocuments.site/reader031/viewer/2022022412/58f34f3d1a28ab1a5a8b458d/html5/thumbnails/55.jpg)
WHAT DID YOU THINK?EVAULATE THIS SESSION - LOSANGELES2015.DRUPAL.ORG/SCHEDULE
THANK YOU!