Cascading Style Sheets (CSS) is a style sheet language used for describing the look and formatting of a document written in a markup language. While most often used to style web pages and interfaces written in HTML and XHTML, the language can be applied to any kind of XML document, including plain XML, SVG and XUL. CSS is a cornerstone specification of the web and almost all web pages use CSS style sheets to describe their presentation. CSS is designed primarily to enable the separation of document content from document presentation, including elements such as the layout, colors, and fonts. This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple pages to share formatting, and reduce complexity and repetition in the structural content (such as by allowing for tableless web design).
Trang 1mezzoblue.com/presentations/2011/fowdDAVE SHEA / NEW YORK / 8 NOV 2011
THEFUTUREOFCSS
(or, as much as will fit in 40 minutes)
Trang 3Browsers &
Specs
Trang 5Oct 2010
2011 Data Source: http://gs.statcounter.com/
Trang 6Oct 2011 Oct 2010
2011 Data Source: http://gs.statcounter.com/
Trang 10Original Presentation: http://goo.gl/81zP8
Trang 12Word of Warning
Trang 1324 Ways in
Wikipedia in
Sites in Question: 24ways.org & wikipedia.org
Trang 14CSS3 Checkup
Trang 15}
Trang 16}
Trang 17First/Last of Type
0 ; }
0 ; }
Trang 19Forms - Required?
}
Trang 20Forms - Optional?
}
Trang 22border-‐radius 5px ; }
Trang 23border-‐radius 5px ; }
Trang 24Vendor Prefixes:
Time to drop them?
Trang 26border-‐radius 5px ; }
Trang 28url (shadow-‐top.gif) ,
}
Trang 30; }
Trang 31; }
Trang 32100px 100px ; }
Trang 33100px 100px ; }
Trang 34; }
Trang 35; }
Trang 36repeat ; }
Trang 37space ; }
Trang 38round ; }
Trang 39background-‐image linear-‐gradient ( top ,
);
}
Trang 40linear-‐gradient ( top #1e5799 0% #7db9e8 100%);
startColorstr = '#1e5799' endColorstr = '#7db9e8' ,GradientType=0
}
Trang 42text-‐shadow #000 ;
}
text-shadow
Trang 43http://markdotto.com/playground/3d-text/
Trang 44text-‐shadow #000 ;
}
don’t do this
Trang 45box-‐shadow #000 ; }
Trang 46box-‐shadow inset #000 ; }
Trang 47border-image
Trang 50}
Trang 52padding 20px ; }
Trang 53width 100% ;
padding 20px ; }
Trang 55width calc ( -‐ 40px );
padding 20px ;
}
Trang 57Jakarta Karachi Kinshasa Kolkata
Lagos Lima London Los
Angeles Manila Mexico City
Moscow Mumbai New York Osaka
Paris Rio de Janeiro
}
Trang 58Jakarta Karachi Kinshasa Kolkata
Lagos Lima London Los Angeles Manila
Mexico City
Moscow Mumbai New York Osaka
Paris Rio de Janeiro
}
Trang 59Jakarta Karachi Kinshasa Kolkata
Lagos Lima London Los Angel
Manila Mexico City
Moscow Mumbai New York Osaka
Paris Rio de Jan
Trang 60}
Trang 61}
Trang 62; }
Trang 63optimizeLegibility ; }
http://www.aestheticallyloyal.com/public/optimize-legibility/
Trang 64common-‐ligatures ; }
Trang 65discretionary-‐ligatures ; }
Trang 66historical-‐forms ; }
Trang 67historical-‐ligatures ; }
Trang 68ItalicSerif , ;
swash ( flowing ); }
Trang 69http://hacks.mozilla.org/2009/10/font-control-for-designers/
Trang 71scale ( 2 ); }
Trang 72scale ( 2 ); }
Trang 73transform translate ( -‐20px -‐20px ); }
Trang 74transform translate ( -‐20px -‐20px ); }
Trang 75transform skewX ( 90 ); }
Trang 76transform skewX ( 90 ); }
Trang 77transform rotate ( 90 );
}
Trang 78transform rotate ( 90 );
}
Trang 79transform rotate ( 90 );
}
Trang 80translate ( -‐40px -‐40px ),
rotate ( 10deg );
}
Trang 81translate ( -‐40px -‐40px ),
rotate ( 10deg );
}
Trang 82Shadow DOM
Trang 83http://37signals.com/svn/posts/2609-customizing-web-forms-with-css3-and-webkit
Trang 87none ; }
Trang 88http://lab.simurai.com/css/umbrui/
Trang 89class = "box" >
placeholder =
type = "email" placeholder =
type = "submit" value = "Send" >
</form>
Trang 91background #333 ;
border none ;
none ; }
Trang 93http://css-tricks.com/examples/WebKitScrollbars/
Trang 94WebKit Extras
Trang 95#3d8ba4 ;
plus-‐darker ; }
Trang 971px black ; }
5px black ; }
rgba ( 0 , 0 , 0 , 0 );
1px rgba ( 0 , 0 , 0 , 0 5 );
rgba ( 0 , 0 , 0 , 0 25 ; }
Trang 98url(/path/to/mask.png) ;
rgba ( 30 28 28 0 6 );
}
http://trentwalton.com/2011/05/19/mask-image-text/
Trang 99below 5px
(
linear from ( transparent ),
color-‐stop ( 0 5 transparent to ( white ) }
Trang 100Where Next?
Trang 101Floats Suck
Trang 102New layout controls?
Trang 103How about 4?
Trang 104Multi-column
Trang 1053 ;
3em ;
1px solid #CCC ; }
all ; }
100% ; }
Trang 106all ; }
100% ; }
2 ;
3em ;
1px solid #CCC ; }
Trang 107Regions
Trang 108"main-‐thread" ; }
Trang 109"main-‐thread" ; }
Trang 110"main-‐thread" ; }
Trang 111http://www.netmagazine.com/features/future-css-layouts
Trang 112Template Layout
&
Grid Layout
Trang 113; }
a ; }
b ; }
c ; }
Trang 115Bonus 5th Layout Method!
Trang 116Flexible Box
Layout
Trang 120So which one(s)?
Trang 123CSS Shaders
Trang 124http://www.adobe.com/devnet/html5/articles/css-shaders.html
Trang 125CSS Variables
Trang 127CSS
Trang 128CSS 4?
Trang 129bold ; }
normal ; }
Trang 130100% ; }
}
Trang 131bold ; }
normal ; }
Trang 132bold ; }
Trang 133Elements Out
Trang 134Pseudo-mezzoblue.com/presentations/2011/fowdDAVE SHEA / NEW YORK / 8 NOV 2011
Thanks!