SlideShare a Scribd company logo
Teams, styles and
scalable applications
vittorio vittori
@vttrx vitto
#css #team #style-guide
I started to love
modular design
thanks to…
…my beloved LEGO!
it was love for
modular design
and engineering
I dreamed to
became an
artist
and one day I met internet
so,
full of dreams
and ideals,
I became…
a Macromedia Flash developer
for 6 years
but this wasn’t the end
I switched to HTML, CSS and JS
and I saw my LEGO again
.class{
background-color: green;
}
. {
border-top: 1px solid blue;
}
with infinite possibilities
<div class=“ ”>
Heilo world!
</div>
so,
I decided
to move on
and…
write beautiful CSS
#home.new table div tr {…}
/* buy bread @ SUPERMAKET */
.Pag .red_area#ORO HR {…}
/* not working */
/* MUST BE A CSS BUG */
.str.CIAO..new > * > div {…}
ok, I know
I’m missing
somethingCSS
This is when I
realized I needed
to using tools
to ease my life
Using a
framework
helps you gain
time on
reusable stuff
like
grids & widgets
you need for
your scaling
application
Using an
approach
gives you the
opportunity to
grow your code
between
scaling
application that
changes during
development
Now let’s talk about approaches
not frameworks
APPROACH AUTHOR
SMACSS

smacss.com
Jonathan Snook

snook.ca
OOCSS
github.com/stubbornella/oocss/wiki
Nicole Sullivan

stubbornella.org
Expressive CSS

johnpolacek.github.io/expressive-css
John Polacek

johnpolacek.com
BEM
bem.info
Vitaly Harisov
vitaly.harisov.name
what’s around
SMACSS
Scalable and Modular Architecture for CSS
v
SMACSS
BASE
for common
element
selectors
body,
form {
margin: 0;
padding: 0;
}
a {
color: #039;
}
a:hover {
color: #03F;
}
v
SMACSS
BASE
not nice
for element ’s
attribute
selectors
input[type=“text”] {
color: #039;
}
.alt-input {
color: red;
}
.i-said-alt-input {
…: #03F!important;
}
v
SMACSS
LAYOUT
for repeated
layout
elements
without style
changes or
states
#header,
#article,
#footer {
width: 960px;
margin: auto;
}
#article {
/* etc. */
}
v
SMACSS
LAYOUT
not nice
they may need
to be changed
in the future
#article {
/* bg yellow */
}
.bg-blue {
/* bg blue */
}
#article.bg-blue {
/* bg blue */
}
SMACSS
MODULE
designed to
exist as a
standalone
component
.module > h2 {
padding: 5px;
}
.module span {
padding: 5px;
}
v
span {
/* BASE styles */
border: 2px solid;
border-color: red;
}
.module > h2 {
padding: 5px;
}
.module span {
padding: 5px;
/* unwanted
inherited propos */
border: 2px solid;
border-color: red;
}
SMACSS
MODULE
resets needed
because of
BASE in some
cases
SMACSS
STATE
something
that augments
and overrides
all other styles
.tab {
color: white;
}
.is-tab-active {
color: black;
border: 1px … #000;
}
.is-active {
color: black;
}
v
SMACSS
STATE
not nice
for potential
states
duplication
.tab {
color: white;
}
.is-tab-active {
color: black;
border: 1px … #000;
}
.is-active {
color: black;
}
.is-button-active {
color: black;
}
SMACSS

Scalable and Modular Architecture for CSS
CONS
xYou have to be careful on
widget children selectors
strength

xMany design levels, layout,
base, widgets, etc. that can
lead to conflicts if you
work on a team

xWidget’s element selectors
are not a best practice
PROS
✓Organizing files by
widgets it’s nice for
avoiding conflicts

✓Very fast on building
codebase with state
selectors
SMACSS
by Jonathan Snook

smacss.com
OOCSS
Object Oriented CSS
v
OOCSS
STRUCTURE
AND SKIN
SEPARATION
to make every
selector
reusable in
different
contexts
.message {
/* structure */
width: 200px;
height: 50px;
padding: 10px;
}
.pink-box {
/* skin */
background: pink;
border: 1px solid;
border-color: #C5D
}
v
OOCSS
STRUCTURE
AND SKIN
SEPARATION
<div class=“message pink-box blue-box”>
…
</div>
not nice
if you want to avoid
changes in HTML
template for some
client changes
v
OOCSS
CONTAINER
AND CONTENT
SEPARATION
break
components
dependency of
their containers
.footer .category {
/* avoid this */
font-family: a, b;
font-size: 24px;
line-height: 1;
}
.category {

/* use this */
font-family: a, b;
font-size: 24px;
line-height: 1;
}
v
OOCSS
CONTAINER
AND CONTENT
SEPARATION
not nice
cause you may
be forced to
reset some
props
.category {
font-family: a, b;
font-size: 24px;
line-height: 1;
}
/* SMACSS states */
.small-font {
font-size: 12px;
}
OOCSS

Object Oriented CSS
CONS
xYou will write verbose
HTML

xVisual changes are made
mainly in the HTML
templates
PROS
✓Smaller CSS files size with
reusable selectors

✓Nice for prototyping

✓Easy to write

✓Can be combined with
other approaches
OOCSS
by Nicole Sullivan
github.com/stubbornella/oocss/wiki
EXPRESSIVE CSS
Scalable CSS using utility classes
v
EXPRESSIVE CSS
UTILITY/HELPER
CLASSES
a list of ready to
be used styles
/* Bootstrap like */
.center-block {
display: block;
margin-left: auto;
margin-right: auto;
}
/* HTML5 boilerplate
like */
.hidden {
display: none !im…;
visibility: hidden;
}
not nice
if you don’t want
verbose, heavy
HTML
v
EXPRESSIVE CSS
UTILITY/HELPER
CLASSES
<div class=“message move-left margin-top
more-padding no-padding-left just-a-few-
border-left no-border—top”>
…
</div>
EXPRESSIVE CSS

Scalable CSS using utility classes
CONS
xNeeds documentation to
share infos to the team on
the stuff you write

xIf you use Foundation,
Bootstrap or other you can
get some conflict selector
PROS
✓Approach very similar to
frameworks like Bootstrap,
so it’s easy to learn for
people already using them

✓Easy to read if the team
has the docs

✓Very, very, very fast
writing
EXPRESSIVE CSS
by John Polacek

johnpolacek.github.io/expressive-css
BEM
Block Element Modifier
v
BEM
BLOCK
ELEMENT
MODIFIER
self container
modules without
deep selector
levels
/* block */
.button {
display: block;
background: black;
}
/* element
(a block child) */
.button__text {
color: white;
}
/* modifier */
.button––yellow {
background: yellow;
}
v
BEM
BLOCK
ELEMENT
MODIFIER
not nice
you are forced
to make more
modifiers
.button {
display: block;
background: black;
}
.button__text {
color: white;
}
.button––yellow {
background: yellow;
}
.button__text––black
{
color: black;
}
BEM

Block Element Modifier
CONS
x It’s time consuming

x Hard to naming things and
keep it consistent

x Verbose selectors naming

x Bigger CSS file size

x Suggested to be used with
CSS critical path
PROS
✓Nice scalable solution

✓Just 1 level class selectors

✓Conflict proof selectors

✓Ultra flexible and reusable
widgets

✓Nice for teams when they
know how it works
BEM
by Vitaly Harisov

bem.info
Why all these approaches listed?
Because the more approaches
you learn
the more solutions you have
the more viewpoints you see
the more problems you consider
What is the future?
Maybe mixing parts of these
approaches together to do it

in your way
SMACSS
OOCSS
Expressive
CSS
BEM
Your way
to do it
now, what about
CSS & TEAMS ?
Front-end
developer
Builds the
templates
from the
designs to
make them
responsive
or other
Iterates the
staging
pages the
back-end
dev made
to give
feedback
Client
iteration
How we are used to do develop
Back-end
developer
Takes the
HTML static
templates
from the
fdev and
make them
dynamic
Client
feedback
iterations
Back-end
developer
Staging
app / pages
back-end tests
Production
app
The fdev prepares the templates
Front-end
developer
HTML
static
templates
front-end tests
Back-end
developer
Staging
app / pages
back-end tests
Production
app
Client
feedback
iterations
Front-end
developer
HTML
static
templates
front-end tests
The client gives iteration feedback
Production
app
Back-end
developer
Staging
app / pages
back-end tests
Client
feedback
iterations
Front-end
developer
HTML
static
templates
front-end tests
The bdev bakes the app
Production
app
Back-end
developer
Staging
app / pages
back-end tests
Client
feedback
iterations
Front-end
developer
HTML
static
templates
front-end tests
The client gives iteration feedback
Production
app
Back-end
developer
Staging
app / pages
back-end tests
Client
feedback
iterations
Front-end
developer
HTML
static
templates
front-end tests
We are is ready to go in production
What about the velocity of this
process?
Is everything going always
slightly fast?
Front-end
developer
static
page +
widgets
static
page +
widgets
static
page +
widgets
static
page +
widgets
static
page +
widgets
I just need a
purple button, but
where is it?
static
page +
widgets
static
page +
widgets
static
page +
widgets
static
page +
widgets
static
page +
widgets
static
page +
widgets
static
page +
widgets
static
page +
widgets
Back-end
developer
?
?
?
Now we have 70 static views
let’s play to hide and seek.
+ 53
We’ve got a good workflow,
but we still have messy code
organization, how can we boost
team speed?
If you’ve noticed this problem,
you should consider to start
adding style guides to your
development workflow
There’s a tons of style guide
generators around


github.com/davidhund/styleguide-generators

styleguides.io
• Hologram
• StyleDocco
• Huge styleguide.
• Styledown
• stylifyme
• mdcss
• Kalei
• kss
• tapestry
• etc.
We also have our style guide
coded for our back-end devs
Hey! I still need
this #!$?% button!
Can you help?
static
page +
widgets
static
page +
widgets
static
page +
widgets
Back-end
developer
?
?
?
a-pollo
a tool to pass front-end code to
back-end developers
Base use in icon.css || .scss || .less
/*@pollo
@name: Icon
@html: <i class="icon icon--flag"></i>
*/
.icon {
…
}
.icon––flag {
…
}
More tags in icon.css || .scss || .less
/*@pollo
@name: Icon
@auth: [Vittorio Vittori](http://vit.to)
@category: Icons
@date: 2016-01-11
@text: This is an icons set composet by…
@html: <i class="icon icon--flag"></i>
*/
.icon {
…
}
.icon––flag {
…
}
Multiple examples in icon.css
/*@pollo … */
/*@pollo … */
/*@pollo … */
/*@pollo … */
/*@pollo … */
.icon {
…
}
.icon––flag {
…
}
Hexo is used by a-pollo
hexo.io/docs/themes.html
a-pollo
repo @ github.com/vitto/a-pollo
website @ vitto.github.io/a-pollo
✓ Widget files doc/s
✓ Project stats
✓ Based on hexojs to
easily custom
style guide theme
? CSS stats
? SASS doc
? LESS doc
? Default markdown
style guide articles
Features Roadmap
Global usage
# Global installation
$ npm install -g a-pollo
# Config file a-pollo.yml creation
$ a-pollo init
# Default command to generate style guide
$ a-pollo
# Choose a different config file
$ a-pollo config=file.yml
Project usage
# Project installation
$ npm install ––save a-pollo
# Config file a-pollo.yml creation
$ ./node_modules/.bin/a-pollo init
# Default command to generate style guide
$ ./node_modules/.bin/a-pollo
# Choose a different config file
$ ./node_modules/.bin/a-pollo config=file.yml
These shelves are probably
how we’d like to handle
our CSS code snippets
to make a faster front-end
development environment
</> with || die();
QUESTIONS?
vittorio vittori
@vttrx

vitto
vit.to

More Related Content

What's hot (20)

PDF
Front End Tooling and Performance - Codeaholics HK 2015
Holger Bartel
 
KEY
Why You Need a Front End Developer
Mike Wilcox
 
KEY
It's a Mod World - A Practical Guide to Rocking Modernizr
Michael Enslow
 
PDF
The What & Why of Pattern Lab
Dave Olsen
 
PDF
Front-End Frameworks: a quick overview
Diacode
 
PDF
HTML5 and CSS3: does now really mean now?
Chris Mills
 
PDF
Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...
Cedric Spillebeen
 
PPTX
HTML5 and CSS3 Techniques You Can Use Today
Todd Anglin
 
PDF
CSS Systems
Natalie Downe
 
PDF
HTML5와 오픈소스 기반의 Web Components 기술
Jeongkyu Shin
 
PDF
A modern front end development workflow for Magnolia at Atlassian
Magnolia
 
PDF
Structuring your CSS for maintainability: rules and guile lines to write CSS
Sanjoy Kr. Paul
 
PDF
CSS Grid Changes Everything - Keynote at WebCamp Zagreb 2017
Morten Rand-Hendriksen
 
PDF
Web Development for UX Designers
Ashlimarie
 
PDF
Lightning fast sass
chriseppstein
 
PPTX
Crafting Custom CSS @ PodCamp Toronto 2015 #PCTO15
Andy McIlwain
 
PDF
Front End Development - Beyond Javascript (Robin Cannon)
Future Insights
 
PDF
Building the next generation of themes with WP Rig 2.0
Morten Rand-Hendriksen
 
PDF
No Feature Solutions with SharePoint
mikehuguet
 
PDF
How to Build Custom WordPress Blocks
Morten Rand-Hendriksen
 
Front End Tooling and Performance - Codeaholics HK 2015
Holger Bartel
 
Why You Need a Front End Developer
Mike Wilcox
 
It's a Mod World - A Practical Guide to Rocking Modernizr
Michael Enslow
 
The What & Why of Pattern Lab
Dave Olsen
 
Front-End Frameworks: a quick overview
Diacode
 
HTML5 and CSS3: does now really mean now?
Chris Mills
 
Bootstrap 3 - Sleek, intuitive, and powerful mobile first front-end framework...
Cedric Spillebeen
 
HTML5 and CSS3 Techniques You Can Use Today
Todd Anglin
 
CSS Systems
Natalie Downe
 
HTML5와 오픈소스 기반의 Web Components 기술
Jeongkyu Shin
 
A modern front end development workflow for Magnolia at Atlassian
Magnolia
 
Structuring your CSS for maintainability: rules and guile lines to write CSS
Sanjoy Kr. Paul
 
CSS Grid Changes Everything - Keynote at WebCamp Zagreb 2017
Morten Rand-Hendriksen
 
Web Development for UX Designers
Ashlimarie
 
Lightning fast sass
chriseppstein
 
Crafting Custom CSS @ PodCamp Toronto 2015 #PCTO15
Andy McIlwain
 
Front End Development - Beyond Javascript (Robin Cannon)
Future Insights
 
Building the next generation of themes with WP Rig 2.0
Morten Rand-Hendriksen
 
No Feature Solutions with SharePoint
mikehuguet
 
How to Build Custom WordPress Blocks
Morten Rand-Hendriksen
 

Similar to Teams, styles and scalable applications (20)

PDF
What is Modular CSS?
Scott Vandehey
 
PPTX
Rock Solid CSS Architecture
John Need
 
PDF
Css Systems
Stephen Burgess
 
PDF
Organize Your Website With Advanced CSS Tricks
Andolasoft Inc
 
PDF
Download full ebook of Professional Css3 Sikora Piotr instant download pdf
lisnpcc4248
 
PDF
More of less (take 2)
Guilherme Zühlke O'Connor
 
PDF
Scalable CSS You and Your Back-End Coders Can Love - @CSSConf Asia 2014
Christian Lilley
 
PPTX
Css methods architecture
Lasha Sumbadze
 
PPTX
Php Indonesia x Bliblidotcom - Architecting Scalable CSS
Irfan Maulana
 
PDF
Highly Maintainable, Efficient, and Optimized CSS
Zoe Gillenwater
 
PDF
CSS vs. JavaScript - Trust vs. Control
Christian Heilmann
 
PDF
Is everything we used to do wrong?
Russ Weakley
 
PPT
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
Deepak Sharma
 
PPT
Css best practices style guide and tips
Chris Love
 
PDF
CSS: a rapidly changing world
Russ Weakley
 
PDF
X-TREME THEMES
FITC
 
PPTX
Html and CSS 101 - hipages Group Friday talk
hipages
 
PDF
Css tools and methodologies
Isatu Conteh
 
PPT
Web design-workflow
Peter Kaizer
 
PPTX
The Cascade is Dead
chriseppstein
 
What is Modular CSS?
Scott Vandehey
 
Rock Solid CSS Architecture
John Need
 
Css Systems
Stephen Burgess
 
Organize Your Website With Advanced CSS Tricks
Andolasoft Inc
 
Download full ebook of Professional Css3 Sikora Piotr instant download pdf
lisnpcc4248
 
More of less (take 2)
Guilherme Zühlke O'Connor
 
Scalable CSS You and Your Back-End Coders Can Love - @CSSConf Asia 2014
Christian Lilley
 
Css methods architecture
Lasha Sumbadze
 
Php Indonesia x Bliblidotcom - Architecting Scalable CSS
Irfan Maulana
 
Highly Maintainable, Efficient, and Optimized CSS
Zoe Gillenwater
 
CSS vs. JavaScript - Trust vs. Control
Christian Heilmann
 
Is everything we used to do wrong?
Russ Weakley
 
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
Deepak Sharma
 
Css best practices style guide and tips
Chris Love
 
CSS: a rapidly changing world
Russ Weakley
 
X-TREME THEMES
FITC
 
Html and CSS 101 - hipages Group Friday talk
hipages
 
Css tools and methodologies
Isatu Conteh
 
Web design-workflow
Peter Kaizer
 
The Cascade is Dead
chriseppstein
 
Ad

Recently uploaded (20)

PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PPTX
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PPTX
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PPTX
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
PDF
Simplify React app login with asgardeo-sdk
vaibhav289687
 
PDF
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
UITP Summit Meep Pitch may 2025 MaaS Rebooted
campoamor1
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
Simplify React app login with asgardeo-sdk
vaibhav289687
 
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
UITP Summit Meep Pitch may 2025 MaaS Rebooted
campoamor1
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Ad

Teams, styles and scalable applications