16. This is when I
realized I needed
to using tools
to ease my life
17. 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
24. 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 */
}
29. 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
36. 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
39. 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;
}
40. 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>
41. 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
44. 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;
}
45. 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;
}
46. 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
48. 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
52. 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
58. What about the velocity of this
process?
Is everything going always
slightly fast?
59. 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
60. We’ve got a good workflow,
but we still have messy code
organization, how can we boost
team speed?
61. If you’ve noticed this problem,
you should consider to start
adding style guides to your
development workflow
62. 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.
63. 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
?
?
?