12.07.2015 Views

systematic-css

systematic-css

systematic-css

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Classes added to a document for the purpose of feature detection should be prefixed with"supports-"..supports-<strong>css</strong>boxsizing {}.supports-<strong>css</strong>transforms3d {}.supports-webworkers {}The popular Modernizr library can be configured to add a custom prefix to theclasses that it injects into documents. Use the "className prefix" option whenyou download the library from here: http://modernizr.com/download/Class name semanticsChoosing names for things is not easy. In fact it is one of the hardest parts of scalable webdesign. Names should last the lifetime of the objects to which they are given. So we shouldchoose names that describe things that are unlikely to change. The trick is to pick names thatare a little bit abstract, that do not precisely describe the content that they encapsulate, or thefunctionality that they represent, or the presentation that they apply, because these things areinclined to change over time.Consider the following example. It's the markup for a widget that presents a scrollingmarquee of breaking news headlines.Headline #1Headline #2Headline #3Headline #4Headline #5Class names 32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!