17. Start fr
om the
upper l
eft, righ
<div id= t?
”h o m e -
page”>
that
works.
18. Using IDs for styling to
over-ride the cascade
Poor code reuse, if any at
all. To much ‘copy pasta’
Styles are written
based on placement
Start fr
in the view
om the
upper l
eft, righ
A major case of <div id= t?
the div’itus ”h o m e -
page”>
classesthat
Presentation
in the
CSS too specific. Very works.
markup
fragile with placement
19. BETWEEN DESIGNERS &
DEVS THE COMP IS
THE ONLY CONSTANT
what could possibly go wrong?
20. PICTURE WORTH
1000 WORDS
a comp is worth 10,000 development variations
41. Visual elements are the basic
building blocks of the UI.
Well engineered individual
elements reduces duplication
and increases consistency.
ents?
hat ar e elem
W
44. Buttons
Typography
Color pallet
ents?
hat ar e elem
W
45. Buttons
standard
icons Typography
Color pallet
ents?
hat ar e elem
W
46. Buttons
borders and
line widths
standard
icons Typography
Color pallet
ents?
hat ar e elem
W
47. Using the engineered visual
elements, construct modules.
Caveat ... modules can also be
assembled of other smaller
modules and UI patterns
(mind blown)
e mo dules?
What ar
55. These are books on Object
Oriented Programming.
CSS is not on one of them!
56. GREAT CONCEPT
bad name
• Identify reusable objects This is
• Be semantic w/HTML GREAT
• Minimize selectors stuff
• Extend your classes
• ‘Style’ separate from content
• ‘Content’ separate from container
57. OBJECT ORIENTATED CSS
... shortcomings
• CSS Selectors are not objects
• Reliesheavily on ‘presentation
classes’
• Requiresmaintenance of DOM
elements for design updates
• Promotes extending in the DOM,
not the CSS
• Uses vanilla CSS
58. THE OOCSS PROCESS
the classing of the DOM
OOCSS, in short, is a process of
<button class="btn btn-
defining standardized primary btn-large">
presentational selectors which are ! <i class="icon-white icon-
in turn applied to the DOM. envelope"></i>
! Button Generator
</button>
Extensions of such selectors are
then extended in the DOM for
added effect.
It is likely that you will see
examples like what you see here.
59. THE OOCSS PROCESS
the classing of the DOM
OOCSS, in short, is a process of
<button class="btn btn-
defining standardized primary btn-large">
presentational selectors which are ! <i class="icon-white icon-
in turn applied to the DOM. envelope"></i>
! Button Generator
</button>
Extensions of such selectors are
then extended in the DOM for What’s with
added effect. using the <i>
tag for ‘icon’
It is likely that you will see now?
examples like what you see here.
60. OOCSS FRAMEWORKS
attempts to automate OOCSS
CSS frameworks have been using
OOCSS methods since inception.
Where these fail is the insane
amount of CSS selectors that by
default are added to the site’s CSS.
From grid systems to UI elements,
CSS bloat is a real issue. Ironically
this bloat is what OOCSS is
supposed to address.
61. OOCSS FRAMEWORKS
attempts to automate OOCSS
CSS frameworks have been using
OOCSS methods since inception.
Where these fail is the insane
amount of CSS selectors that by
default are added to the site’s CSS.
Twitter’s
From grid bootstrapUI elements,
systems to default
CSS bloat is a real issue. Ironically
includes 4914
this bloat is what OOCSS is
lines of CSS.
supposed to address.
62. OOCSS FRAMEWORKS
attempts to automate OOCSS
CSS frameworks have been using
OOCSS methods since inception.
Where these fail is the insane
amount of CSS selectors that by
default are added to the site’s CSS.
Twitter’s
From grid bootstrapUI elements,
systems to default
CSS bloat is a real issue. Ironically
includes 4914
this bloat is what OOCSS is
lines of CSS.
supposed to address.
63. THE CSS DREAM
redesign without DOM editing
Imagine a world where new design
requirements are only addressed
by updating CSS? Functional
modules and view templates are
not edited.
I don’t feel OOCSS will get us
there, but OOSCSS will.
64. OBJECT ORIENTATED SCSS
the future of silent selectors
What if we lived in a world where
the ‘object’ selectors from OOCSS
can be created, but never manifest
themselves as CSS until they are
used in semantic application?
What if we could seamlessly
extend selectors in our CSS and
not have to touch the DOM?
What if ....
65. SASS 3.2
re-writing what we can do with CSS
Extending elements in vanilla CSS // silent classes
is hard to track. Between nested %kung {
background: green;
color: yellow;
selectors and the sheer volume }
alone make this an arduous task.
%foo {
background: orange;
color: red;
font-size: 12px;
Sass gives us clarity. The ability to
}
// selectors extending silent classes
really define objects in our SCSS .foo_one {
@extend %foo;
and apply them to semantic
}
.foo_two {
selectors within our CSS. }
@extend %foo;
// output CSS
The dream realized. .foo_one, .foo_two {
background: orange;
color: red;
font-size: 12px;
}
78. Cool. Developed the
module in an abstract
environment.
Now we can use this
anywhere. All UX/UI
cleanly encapsulated.
79. Cool. Developed the
module in an abstract
environment.
Now we can use this
anywhere. All UX/UI
cleanly encapsulated.
When developing, no
elements were created.
Typography and color
are all inherited.
80. Cool. Developed the
module in an abstract
environment.
Now we can use this
anywhere. All UX/UI
cleanly encapsulated.
When developing, no
elements were created.
Typography and color
are all inherited.
Follow the example
HTML and you are
rockin!
118. Comps are a failed
communication resource
between designers and devs
SUMMARY
what have we learned?
119. Comps are a failed
communication resource
between designers and devs
As devs, we need to
SUMMARY change our contextual
starting point.
what have we learned?
120. Comps are a failed
communication resource
between designers and devs
As devs, we need to
SUMMARY change our contextual
Without common standards; starting point.
duplicated effort, wild
what have we learned?
deviations in code and
inconsistencies run ramped.
121. We can do it
Comps are a failed
communication resource better!
between designers and devs
As devs, we need to
SUMMARY change our contextual
Without common standards; starting point.
duplicated effort, wild
what have we learned?
deviations in code and
inconsistencies run ramped.
122. We can do it
Comps are a failed
communication resource better!
between designers and devs
As devs, we need to
SUMMARY change our contextual
Without common standards; starting point.
duplicated effort, wild
what have we learned?
deviations in code and
inconsistencies run ramped.
Embracing elements,
patterns and modules
makes our UI code
manageable, maintainable
and sustainable.
123. We can do it
Comps are a failed
communication resource better!
between designers and devs
Vanilla CSS
frameworks
will causeAs devs, we need to
you
SUMMARY much pain our contextual
Without common standards;
duplicated effort, wild
change
starting point.
what have we learned?
deviations in code and
inconsistencies run ramped.
Embracing elements,
patterns and modules
makes our UI code
manageable, maintainable
and sustainable.
124. We can do it
Comps are a failed
communication resource better!
between designers and devs
Vanilla CSS
frameworks
will causeAs devs, we need to
you
SUMMARY much pain our contextual
Without common standards;
duplicated effort, wild
change
starting point.
what have we learned?
deviations in code and
inconsistencies run ramped.
Sass is re-writing
the future of Embracing elements,
CSS. patterns and modules
makes our UI code
manageable, maintainable
and sustainable.
125. We can do it
Comps are a failed
communication resource better!
between designers and devs
Vanilla CSS
frameworks
will causeAs devs, we need to
you
SUMMARY much pain our contextual
change
Without common standards; starting point.
duplicated effort,OOCSS is ok, but
wild
what have we learned?
deviations in code and
OOSCSS is
inconsistencies run ramped.
amazing!
Sass is re-writing
the future of Embracing elements,
CSS. patterns and modules
makes our UI code
manageable, maintainable
and sustainable.