SlideShare a Scribd company logo
CSS3: stay tuned
   for style
 Chris Mills, Opera Software




          Slides available on http://slideshare.net/chrisdavidmills
Who the hell am I?
‣ Opera open standards evangelist and tech writer
‣ Telling the world about open standards & Opera
‣ Improving web education
‣ Drinking beer & saving the world before morning
‣ Drumming in a heavy metal band
CSS3!



 http://www.flickr.com/photos/burningmax/4956554644/
http://www.flickr.com/photos/drakelelane/3891672125/
Today I'll cover
‣ Where CSS3 came from
‣ What it brings to the table
‣ Why it is worth knowing about
‣ When (and how) you can start using it
Where did it evolve from?




              http://www.flickr.com/photos/dyanna/3202542828/
Brief CSS history
‣ CSS invented by Håkon Wium Lie and Bert Bos
  around 1994/5
‣ CSS1 rec published in 1996
‣ CSS2 rec published 1998, including things like
  absolute, relative, and fixed positioning, z-index,
  media types
Brief CSS history
‣ CSS 2.1 work started soon after, to remove
  errors and inconsistencies, but this is still not
  completely finished
‣ Kept pinging back and forth between working
  draft and candidate rec. Currently sat at last call
  working draft, as of Dec 2010
Brief CSS history
‣ CSS3 also started soon after CSS2, to add new
  features
‣ Earliest CSS3 drafts published in June 1999
‣ As of March 2011, there are over 40 CSS3
  module drafts published
‣ Some a lot more stable than others
W3C breaking down?
‣ You might think so...
‣ ...especially considering the XHTML2/HTML5
  debacle as well
‣ Browsers and developers are largely rushing
  ahead
‣ But at least things are getting standardized
Vendor prefixes help...
Like sandboxes for browsers to experiment!




                      http://www.flickr.com/photos/horiavarlan/4290846294/
Vendor prefixes...
‐ms‐transform‐origin:
center;
‐moz‐transform‐origin:
center;
‐o‐transform‐origin:
center;
‐webkit‐transform‐origin:
center;

transform‐origin:
center;
What does CSS3 offer?




              http://www.flickr.com/photos/bre/552152780/
What is CSS3?
‣ A series of new modules
‣ Adds extra functionality on top of CSS2.1
The modules
 Selectors | Color | Backgrounds and borders
  Media queries | Multi-column layout | Fonts
 2D Transformations | Transitions | Animation
   Image values | Basic user interface | Text
    Flexible box layout | 3D transformations
   Grid positioning | Ruby | Template layout
The modules
And loads more!
See http://www.w3.org/Style/CSS/current-
work.en.html for more information
Modular = good
‣ Browser vendors can work on one module at a
  time
‣ Less worry and pressure about supporting the
  entire spec
Why is CSS3 so cool?




            http://www.flickr.com/photos/mafleen/3780072133/
We've done most of
this stuff before...




            http://www.flickr.com/photos/monkeytime/4120229885/
...so why...




               http://www.flickr.com/photos/shawnblog/566041143/
...should we care?




           http://www.flickr.com/photos/philliecasablanca/2816530573/
Simple...makes common
tasks easier and simpler
‣ Less time spent in Photoshop
‣ Less time spent with JavaScript
‣ Less presentational markup
‣ Less time spent dicking about with Flash
‣ More time spent in the pub
Less Photoshop
Doing this programmatically is so much more
flexible!

Classic examples:
 ‣ Drop shadows
 ‣ Gradients
 ‣ Rounded corners
 ‣ Transparency
Drop shadows
text‐shadow:
black
3px
3px
5px;
box‐shadow:
black
4px
4px
5px;

text‐shadow:
0
0
4px
white,













0
‐5px
4px
#ffff33,













2px
‐10px
6px
#ffdd33,













‐2px
‐15px
11px
#ff8800,













2px
‐25px
18px
#ff2200,
Gradients
background‐image:
‐o‐linear‐gradient(top

left,rgb(255,0,0),rgb(150,0,0));
Rounded corners
border‐radius:
10px;

border‐radius:
0px
0px
10px
0px;
Transparency
opacity:
0.6;

background‐color:
rgba(204,204,204,0.6);
Less JavaScript
Designers don't like coding
And not relying on JS can mean smaller
downloads, and better compatibility

Obvious behavioural stuff:
 ‣ Animation
 ‣ Style/layout switchers
 ‣ Showing/hiding
Animation
‣ CSS keyframe animations allow you to create
  animations that run independently
‣ Transitions allow animation that is dependant
  on state changes
Controlling layouts
‣ Media queries allow you to apply CSS
  depending on browser/device attributes such
  as resolution, screen width and height, and
  more
‣ Multi-column layout allows you to easily put
  your content into columns
Showing/hiding
‣ :target pseudo-class: apply CSS depending on
  whether the element selected is the target of a
  fragment identifier
‣ So when links are clicked you could make
  panels, etc. appear.
Less presentational markup
‣ CSS3 includes a wide variety of new selectors
  to allow you to select what you want more
  easily, with less classes/ids
‣ Features like multiple background images and
  rounded corners allow you to get rid of some of
  those nested divisions!
CSS3 selectors
[attr*=str]       :nth‐last‐of‐type(n)
[attr^=str]       :nth‐last‐child(n)
[attr~=str]       :only‐child
:first‐child      :only‐of‐type
:last‐child       :checked
:first‐of‐type    :valid
:last‐of‐type     :invalid
:nth‐child(n)     :enabled       :target
:nth‐of‐type(n)   :disabled      And
more!
Multiple backgrounds
header
{


background:
url(icon.gif)
top
left
no‐repeat,














url(pattern.jpg)
repeat,














url(center‐spine.png)
top
center














repeat‐y;


}
When can we start using
these tools?
Now!




       http://www.flickr.com/photos/ilamont/5538511847/
Yes, there's browser
support to consider
‣ But most browsers support most of this stuff
  now, even IE9!
‣ Most of it degrades gracefully
‣ And you can work around problems
‣ Depends on what your client needs
‣ By “identical”, how similar do you mean??
Try to argue the case...
...”identical in every browser” is outdated
‣ Especially with mobile phones, iPad, tablets...
‣ And IE6 is a decade old now
‣ Surely providing an acceptable experience in
   each browser is, well, acceptable?
‣ Then you can spend more less time on hacking
Selectivizr
CSS3 pie
Modernizr
Thanks for listening!
‣ cmills@opera.com
‣ @chrisdavidmills
‣ http://dev.opera.com
‣ http://www.opera.com/wsc

More Related Content

PDF
Look ma! No images!
PPTX
Crafting Custom CSS @ PodCamp Toronto 2015 #PCTO15
PDF
Front-end Tools: Sifting Through the Madness
PDF
Front-end Tools: Sifting Through the Madness
PPT
Abusing JavaScript for fun and profit
PPT
HTML5 CSS3 The Future of Web Technologies
KEY
CSS3: the new style council
PDF
CSS Grid Changes Everything - Keynote at WebCamp Zagreb 2017
Look ma! No images!
Crafting Custom CSS @ PodCamp Toronto 2015 #PCTO15
Front-end Tools: Sifting Through the Madness
Front-end Tools: Sifting Through the Madness
Abusing JavaScript for fun and profit
HTML5 CSS3 The Future of Web Technologies
CSS3: the new style council
CSS Grid Changes Everything - Keynote at WebCamp Zagreb 2017

Viewers also liked (15)

KEY
(For non-developers) HTML5: A richer web for everyone
KEY
Selling Yourself Online Chrismills
KEY
Optimizing content for the "mobile web"
PDF
A web sized education problem?
PDF
HTML5 Pearson preso
PDF
HTML5 and CSS3 Shizzle
KEY
CSS3: stay tuned for style
KEY
HTML5: A brave new world of markup
KEY
HTML5: what's new?
ODP
Cross Device Accessibility
KEY
Web education, and the Opera web standards curriculum
PDF
HTML5 and CSS3: does now really mean now?
PDF
APIs for modern web apps
PDF
APIs, now and in the future
PDF
Feedback handling, community wrangling, panhandlin’
(For non-developers) HTML5: A richer web for everyone
Selling Yourself Online Chrismills
Optimizing content for the "mobile web"
A web sized education problem?
HTML5 Pearson preso
HTML5 and CSS3 Shizzle
CSS3: stay tuned for style
HTML5: A brave new world of markup
HTML5: what's new?
Cross Device Accessibility
Web education, and the Opera web standards curriculum
HTML5 and CSS3: does now really mean now?
APIs for modern web apps
APIs, now and in the future
Feedback handling, community wrangling, panhandlin’
Ad

Similar to CSS3: stay tuned for style (20)

PPT
CSS3 and a brief introduction to Google Maps API v3
PDF
CSS3: Ripe and Ready to Respond
PDF
Simply Responsive CSS3
PDF
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
PDF
Intro to CSS3
PDF
CSS3 - is everything we used to do wrong?
KEY
The web standards gentleman: a matter of (evolving) standards)
PPTX
CSS 3 Overview
PDF
HTML5 for the Flash Developer
PPT
KEY
Trendsetting: Web Design and Beyond
PDF
CSS3: Ripe and Ready
PDF
Introduction to CSS3
PPTX
Css3 paul trani
KEY
CSS and CSS3
PPTX
CSS3: The Next Generation Of Style
PPTX
Css3 shubelal
PDF
Evolution of CSS
PDF
PDF
CSS Training Online-Online CSS Course css course online learning html and css...
CSS3 and a brief introduction to Google Maps API v3
CSS3: Ripe and Ready to Respond
Simply Responsive CSS3
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Intro to CSS3
CSS3 - is everything we used to do wrong?
The web standards gentleman: a matter of (evolving) standards)
CSS 3 Overview
HTML5 for the Flash Developer
Trendsetting: Web Design and Beyond
CSS3: Ripe and Ready
Introduction to CSS3
Css3 paul trani
CSS and CSS3
CSS3: The Next Generation Of Style
Css3 shubelal
Evolution of CSS
CSS Training Online-Online CSS Course css course online learning html and css...
Ad

More from Chris Mills (18)

PDF
More efficient, usable web
PDF
Guerrilla education
PDF
Web versus Native: round 1!
PDF
BrazilJS MDN
PDF
Empowering the "mobile web"
PDF
Documentation and publishing
PDF
MDN is easy!
PDF
Getting rid of images with CSS
PDF
Future layouts
PDF
Laying out the future
PDF
Accessibility doesn't exist
PDF
Responsive web design standards?
PDF
Adapt! Media queries and viewport
PDF
Adapt and respond: keeping responsive into the future
KEY
Angels versus demons: balancing shiny and inclusive
PDF
The W3C and the web design ecosystem
PDF
Brave new world of HTML5
KEY
Inclusive design: real accessibility for everyone
More efficient, usable web
Guerrilla education
Web versus Native: round 1!
BrazilJS MDN
Empowering the "mobile web"
Documentation and publishing
MDN is easy!
Getting rid of images with CSS
Future layouts
Laying out the future
Accessibility doesn't exist
Responsive web design standards?
Adapt! Media queries and viewport
Adapt and respond: keeping responsive into the future
Angels versus demons: balancing shiny and inclusive
The W3C and the web design ecosystem
Brave new world of HTML5
Inclusive design: real accessibility for everyone

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PDF
Electronic commerce courselecture one. Pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Approach and Philosophy of On baking technology
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Encapsulation theory and applications.pdf
PPT
Teaching material agriculture food technology
PPTX
Machine Learning_overview_presentation.pptx
A Presentation on Artificial Intelligence
Electronic commerce courselecture one. Pdf
Advanced methodologies resolving dimensionality complications for autism neur...
MIND Revenue Release Quarter 2 2025 Press Release
Approach and Philosophy of On baking technology
A comparative analysis of optical character recognition models for extracting...
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Per capita expenditure prediction using model stacking based on satellite ima...
Spectral efficient network and resource selection model in 5G networks
Mobile App Security Testing_ A Comprehensive Guide.pdf
sap open course for s4hana steps from ECC to s4
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Network Security Unit 5.pdf for BCA BBA.
MYSQL Presentation for SQL database connectivity
Encapsulation theory and applications.pdf
Teaching material agriculture food technology
Machine Learning_overview_presentation.pptx

CSS3: stay tuned for style

Editor's Notes