2. Relax. Please donât try to take notes feverishly.
Email â http://sonspring.com/contact
Twitter â http://twitter.com/nathansmith
Slides â http://slideshare.net/nathansmith/refresh-okc
Feel free to email me later, and download these
slides as well. These links are at the end, too.
3. An important discipline when using any
framework is striving to understand the
underlying language. In other words,
use it as a tool â Not a black box.
Before we get started, letâs agree: Code is not magic
4. Veteran âninjasâ master a variety of tools â Not just one.
Useaframeworkasanextension
ofyourselfâNotjustasacrutch.
BYHAND
FRAMEWORK
http://imdb.com/title/tt1046173
5. âOur craft is becoming a
commodity and the people in
charge donât care about the
quality of the markup, CSS
or how short our JavaScript
is. What matters is how fast
you can get it to market, how
many people it reaches and
how cheaply it can be built.â
Christian Heilmann â developer evangelist at Mozilla
http://thinkvitamin.com/code/web-development-is-moving-on-are-you
6. âPoint being, choose
your battles wisely. In
the time you could
argue the relevance of
naming conventions
like these â I just built
a 16-column layout.â
Matthew Anderson â designer at OneHub.com
http://onehub.com/past/2009/5/13/why-we-chose-960gs-css-framework
7. Truth be told, I donât really care if you
use the 960 Grid System or not.
I tell people who get all emotional over
âsemanticsâ (ID & classes have none)
that it takes less energy to not use
something than to argue about it.
It also takes considerably more energy to do
research. Being ignorant is blissful and easy!
Allow me to clear up a (potential) misconception...
8. Semantics can reside in microformatsâ class names,
because parsers are built to look for them speciďŹcally
http://microformats.org
9. The W3Câs âSemantic Webâ doesnât involve CSS
http://www.w3.org/DesignIssues/Semantic.html
10. The term âSemantic Webâ refers to W3Câs
vision of the Web of linked data. Semantic
Web technologies enable people to create
data stores on the Web, build vocabularies,
and write rules for handling data. Linked
data are empowered by technologies such
as RDF, SPARQL, OWL, and SKOS.
â World Wide Web Consortium (W3C)
CSS gets no ⼠at the Semantic Web party
http://www.w3.org/standards/semanticweb
11. <tag class="peanut_butter jelly">Yummy content</tag>
Semantics live here
Not here
So letâs get this straight...
... Except in the case of microformats.
13. Jeff Croft was never one to mince words...
http://jeffcroft.com/blog/2007/nov/17/whats-not-love-about-css-frameworks
14. Donât be a Luddite (Note: I was with Sass/SCSS)
http://en.wikipedia.org/wiki/Luddite
The Luddites were a social
movement of British textile
artisans in the nineteenth
century who protested â
often by destroying
mechanized looms â against
the changes produced by
the Industrial Revolution,
which they felt were leaving
them without work and
changing their way of life.
17. Um, okay, but
why grids?
âMy design skillz are so awesome,
Iâve never needed to use grids.â
#anyways #whatevs #whocares #sobored
18. For design thatâs really, really, ridiculously good looking
http://en.wikipedia.org/wiki/Zoolander
Also, to do other
things good too.
19. The reason I create and use CSS
frameworks is because I hate doing
mundane tasks repeatedly (yawn).
Iâd rather be working in JavaScript.
FYI: I donât especially love CSS.
20. Co-author
Tech editor Tech editor
jQueryEnlightenment.com
oreilly.com/catalog/9780596159788
JavaScriptEnlightenment.com
JavaScript books Iâve worked on...
All involving Cody Lindley, who has been a JavaScript mentor to me: http://codylindley.com
21. There are many âdragonsâ
sharing the same public
facade in web development:
ColdFusion, Java, .NET,
Perl, PHP, Ruby, Python...
To render in a browser, it all
has to pass through HTML.
So, I think that front-end
is a good place to be! :)
Front-end is the opposite of a mythological hydra
http://en.wikipedia.org/wiki/Lernaean_Hydra
22. But I digress.
Iâll forever be known as âthe 960 guy.â
But I guess thatâs not so bad... Right?
#anyways #whatevs #whocares #sobored
23. The premise of the system is ideally suited to rapid
prototyping, but it would work equally well when
integrated into a production environment. There
are printable sketch sheets, design templates, and
CSS ďŹles that have identical measurements.
Whatâs this whole 960.gs thing all about?
24. 960 SHIps WITH PrINtABlE *.PDf SKeTCH
SHeEts, BeCAUSe sOmEtIMeS THe BeSt
DEsIGn ToOl IS No ToOl At ALl!
WE OfTeN JUMp RIgHT INtO DEsIGn Or
CODe SoFtWARe, BUt SKeTCHInG THIngS
OUt CAN Be MUCH mOrE eFfICIEnT.
WHEn I WOrKED AS AN InFoRmATIoN
ARCHItECt, SoMe Of mY BeSt WOrK WAS
DOnE SImPlY USInG PeN AnD PApEr.
25. The 960 Grid System is an effort to streamline
web development by providing commonly used
dimensions, based on a width of 960 pixels.
There are two variants: 12 and 16 columns,
which can be used separately or in tandem.
If you like, thereâs also a 24-column version.
âDogfoodingâ = When you use your own product
NOM, NOM, NOM â I use 960 regularly! :)
26. The 12-column grid is divided into portions that
are 60 pixels wide. The 16-column grid consists
of 40 pixel increments. Each column has 10
pixels of margin on the left and right, which
create 20 pixel wide gutters between columns.
The 24-column grid is also included. It consists
of columns 30 pixels wide, with 10 pixel gutters,
and a 5 pixel buffer on each side of the container.
12, 16, and 24 columns available by default
28. Typical use case for a 12-column grid
<div class="container_12">
<div class="grid_4">
I am 1/3 wide.
</div>
<div class="grid_4">
I am 1/3 wide.
</div>
<div class="grid_4">
Me too!
</div>
<div class="clear"></div> <!-- Yuck, I know -->
<div class="grid_6">
I am 1/2 wide.
</div>
<div class="grid_6">
I am 1/2 wide.
</div>
</div>
29. Typical use case for a 12-column grid
<div class="container_12">
<div class="grid_4">
I am 1/3 wide.
</div>
<div class="grid_4">
I am 1/3 wide.
</div>
<div class="grid_4">
Me too!
</div>
<div class="clear"></div> <!-- Yuck, I know -->
<div class="grid_6">
I am 1/2 wide.
</div>
<div class="grid_6">
I am 1/2 wide.
</div>
</div>
30. Nested grids & Column rearrangement
<div class="container_12">
<div class="grid_6 push_6">
<div class="grid_2 alpha">
First nested grid.
</div>
<div class="grid_2">
Middle. No special class.
</div>
<div class="grid_2 omega">
Last nested grid.
</div>
</div>
<div class="grid_6 pull_6">
Last in markup, first visually.
</div>
</div>
31. Nested grids: alpha = ďŹrst, omega = last (per row)
<div class="container_12">
<div class="grid_6 push_6">
<div class="grid_2 alpha">
First nested grid.
</div>
<div class="grid_2">
Middle. No special class.
</div>
<div class="grid_2 omega">
Last nested grid.
</div>
</div>
<div class="grid_6 pull_6">
Last in markup, first visually.
</div>
</div>
32. Column rearrangement (SEO maybe)
<div class="container_12">
<div class="grid_6 push_6">
<div class="grid_2 alpha">
First nested grid.
</div>
<div class="grid_2">
Middle. No special class.
</div>
<div class="grid_2 omega">
Last nested grid.
</div>
</div>
<div class="grid_6 pull_6">
Last in markup, first visually.
</div>
</div>
40. Grids can accelerate progress while maintaining order
http://www.ďŹickr.com/photos/meckert75/3732780382
41. Michael Phelps following a painted line at the bottom
of a pool doesnât make him a less talented swimmer.
http://livinggallery.oneindia.in/main.php?g2_itemId=32903
42.
43.
44.
45.
46.
47.
48. âOur best practices are killing usâ â Nicole Sullivan
http://www.slideshare.net/stubbornella/our-best-practices-are-killing-us
Three best practice myths...
1. Donât add any extra elements
2. Donât add classes
3. Use descendent selectors exclusively
49. âOur best practices are killing usâ â Nicole Sullivan
http://www.slideshare.net/stubbornella/our-best-practices-are-killing-us
Three best practice myths...
1. Donât add any extra elements
2. Donât add classes
3. Use descendent selectors exclusively
50. Take all ârulesâ in development with a grain of salt
Sensibly revised...
1. Add extra elements sparingly
2. Add classes thoughtfully
3. Avoid descendent selector kludge...
51. How would you style these <a> links?
<ul class="menu">
<li>
<a href="/">Home</a>
</li>
<li>
<a href="/about">About</a>
</li>
</ul>
52. Use only the selectors that are necessary.
.menu a {
/* Terse = Get âer done! */
}
ul.menu li a {
/* Too heavy = Overkill. */
}
70. Whither: Grid framework or Responsive design?
Doing a ďŹxed-width design using a grid framework is
relatively easy. Whereas, doing a responsive design
that looks solid at every resolution is multivariate and
there is not (yet) an automated, foolproof solution.
VS
71. Pet peeve: âUse tomorrowâs technology, today!â
The mere fact weâre even able to use it
today makes it todayâs technology.
As designers and developers, itâs easy to
get so caught up in wanting to use the
latest and greatest (to a fault) that we
forget to try and tackle present-day
problems with proven technologies.
78. How to use Adapt.js = A human-readable conďŹg
<script>
// Edit to suit your needs.
var ADAPT_CONFIG = {
// Where is your CSS?
path: 'assets/css/',
// false = Only run once, when page first loads.
// true = Change on window resize and page tilt.
dynamic: true,
// Optional callback... myCallback(i, width)
callback: myCallback,
// First range entry is the minimum.
// Last range entry is the maximum.
// Separate ranges by "to" keyword.
range: [
'0px to 760px = mobile.css',
'760px to 980px = 720.css',
'980px to 1280px = 960.css',
'1280px to 1600px = 1200.css',
'1600px to 1920px = 1560.css',
'1920px = fluid.css'
]
};
</script>
79. How to use Adapt.js = A human-readable conďŹg
<script>
// Edit to suit your needs.
var ADAPT_CONFIG = {
// Where is your CSS?
path: 'assets/css/',
// false = Only run once, when page first loads.
// true = Change on window resize and page tilt.
dynamic: true,
// Optional callback... myCallback(i, width)
callback: myCallback,
// First range entry is the minimum.
// Last range entry is the maximum.
// Separate ranges by "to" keyword.
range: [
'0px to 760px = mobile.css',
'760px to 980px = 720.css',
'980px to 1280px = 960.css',
'1280px to 1600px = 1200.css',
'1600px to 1920px = 1560.css',
'1920px = fluid.css'
]
};
</script>
80. 845 bytes
MiniďŹed, Adapt.js is less than 1 KB.
(Allow me to put into perspective)
What about adding JavaScript page-weight?
81. 60 Ă 40 pixel JPG @ 70% quality = 908 bytes
My son, ďŹguring out that the wind can spin pinwheels
908 bytes
http://www.ďŹickr.com/photos/nathansmith/5625332824
82. Or, as my dad used to tell me as a kid...
âDonât worry about problems
smaller than a gnatâs backside.â
Note: If the extra HTTP request for JS is a
concern, the ďŹle size is small enough to just
include inline in the documentâs <head>.
83. Not to go all âRon Burgundyâ on you, but...
âKind of a [small] dealâ
I didnât set out to write a
terse snippet of JavaScript.
Thatâs just how easy the
problem was to solve.
Seriously though, consider
what will be best for your
project. Nothing is a magic
bullet. Code is just code.
http://en.wikipedia.org/wiki/Anchorman:_The_Legend_of_Ron_Burgundy
84. In fact, hereâs a slew of alternatives
you might like better. You should
explore every option, and choose
one that makes sense to you.
Or, if nothing seems like a good ďŹt,
Iâd encourage you to create one!
To reiterate: I donât care if you use 960.gs or Adapt.js
95. And the list
goes on...
But you get the point. There are plenty
of options out there to choose from.
(I just want to mention two more things)
96. To prevent developers from
wasting countless hours on
styling dumb form elements
Note: I wasted countless hours styling dumb form elements, so you donât have to!
Forms = Quite possibly, the worst part of web design
97. âFuture plans include a tutorial on how
to use jQuery to add styling hooks to
form elements, since I know from
experience that is no cup of tea.â
â Source = Me when announcing 960.gs in 2008!
â Excuse = New HTML5 elements set me back :)
Itâs been awhile in the making...
http://sonspring.com/journal/960-grid-system
100. http://sass-lang.com
I prefer using Sass to expedite writing CSS
I didnât think I would like Sass, but I do. Oh, and
if youâre going to use Sass, use Sass, not SCSS.
101. Questions? Comments? Hate mail? :)
Email â http://sonspring.com/contact
Twitter â http://twitter.com/nathansmith
Slides â http://slideshare.net/nathansmith/refresh-okc
Thanks for attending my presentation!
Feel free to email or say âhiâ on Twitter.