Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cascading Style Sheets 3

Cascading Style Sheets 3

An Introduction to some of the features of CSS3. Presented at DoctyleHTML5.in, organised by @hasgeek.

Rahul Gonsalves

April 10, 2012
Tweet

More Decks by Rahul Gonsalves

Other Decks in Design

Transcript

  1. My name is Rahul Gonsalves. I run Pixelogue, a small

    Bangalore-based design studio. You can email me at [email protected] Hi Css3 and Presentation | DoctypeHtml5
  2. CSS 1 1996 CSS 2 1998 CSS 2.1 2007 2010

    Css3 and Presentation | DoctypeHtml5
  3. 3

  4. Rather than attempting to shove dozens of updates into a

    single monolithic specification, it will be much easier and more efficient to be able to update individual pieces of the specification. Modules will enable CSS to be updated in a more timely and precise fashion, thus allowing for a more flexible and timely evolution of the specification as a whole. http://www.w3.org/TR/css3-roadmap/#whymods Css3 and Presentation | DoctypeHtml5
  5. Syntax/Grammar Selectors Values and Units Box Model Positioning Css3 and

    Presentation | DoctypeHtml5 Colour Profiles Colours/Backgrounds Line box model Fonts Text Ruby Generated Content Replaced Content Paged Content User Interface WebFonts aCSS SMIL Tables Columns SVG Math BECSS Media Queries
  6. CRITICAL NON-CRITICAL Branding Interaction Usability Visual Rewards Accessibility Feedback Layout

    Movement Css3 and Presentation | DoctypeHtml5 Reproduced from CSS3 for WebDesigners
  7. Syntax/Grammar Selectors Values and Units Box Model Positioning Css3 and

    Presentation | DoctypeHtml5 Colour Profiles Colours/Backgrounds Line box model Fonts Text Ruby Generated Content Replaced Content Paged Content User Interface WebFonts aCSS SMIL Tables Columns SVG Math BECSS Media Queries
  8. Syntax/Grammar Selectors Values and Units Box Model Positioning Css3 and

    Presentation | DoctypeHtml5 Colour Profiles Colours/Backgrounds Line box model Fonts Text Ruby Generated Content Replaced Content Paged Content User Interface WebFonts aCSS SMIL Tables Columns SVG Math BECSS Media Queries Better Forms
  9. Syntax/Grammar Selectors Values and Units Box Model Positioning Css3 and

    Presentation | DoctypeHtml5 Colour Profiles Colours/Backgrounds Line box model Fonts Text Ruby Generated Content Replaced Content Paged Content User Interface WebFonts aCSS SMIL Tables Columns SVG Math BECSS Media Queries Better Forms ...and more!
  10. Syntax/Grammar Selectors Values and Units Box Model Positioning Css3 and

    Presentation | DoctypeHtml5 Colour Profiles Colours/Backgrounds Line box model Fonts Text Ruby Generated Content Replaced Content Paged Content User Interface WebFonts aCSS SMIL Tables Columns SVG Math BECSS Media Queries Transitions Better Forms ...and more!
  11. Syntax/Grammar Selectors Values and Units Box Model Positioning Css3 and

    Presentation | DoctypeHtml5 Colour Profiles Colours/Backgrounds Line box model Fonts Text Ruby Generated Content Replaced Content Paged Content User Interface WebFonts aCSS SMIL Tables Columns SVG Math BECSS Media Queries Transitions Multiple Backgrounds Better Forms ...and more!
  12. Syntax/Grammar Selectors Values and Units Box Model Positioning Css3 and

    Presentation | DoctypeHtml5 Colour Profiles Colours/Backgrounds Line box model Fonts Text Ruby Generated Content Replaced Content Paged Content User Interface WebFonts aCSS SMIL Tables Columns SVG Math BECSS Media Queries Transitions CSS Transforms Multiple Backgrounds Better Forms ...and more!
  13. Syntax/Grammar Selectors Values and Units Box Model Positioning Css3 and

    Presentation | DoctypeHtml5 Colour Profiles Colours/Backgrounds Line box model Fonts Text Ruby Generated Content Replaced Content Paged Content User Interface WebFonts aCSS SMIL Tables Columns SVG Math BECSS Media Queries Rounded Corners Transitions CSS Transforms Multiple Backgrounds Better Forms ...and more!
  14. body { background: url(image-1.png) repeat-x fixed -130% 0, url(image-2.png) repeat-x

    fixed 40% 0, url(image-3.png) repeat-x fixed -80% 0, url(image-4.png) repeat-x fixed 100% 0; background-color: #1a1a1a; } Css3 and Presentation | DoctypeHtml5
  15. body { background: url(combined.png) repeat-x fixed 0 0, background: url(image-1.png)

    repeat-x fixed -130% 0, url(image-2.png) repeat-x fixed 40% 0, url(image-3.png) repeat-x fixed -80% 0, url(image-4.png) repeat-x fixed 100% 0; background-color: #1a1a1a; } Css3 and Presentation | DoctypeHtml5
  16. CSS Transitions allow property changes in CSS values to occur

    smoothly over a specified duration. This smoothing animates the changing of a CSS value when triggered by a mouse click, focus or active state, or any changes to the element (including even a change on the element’s class attribute). http://www.alistapart.com/articles/understanding-css3-transitions Css3 and Presentation | DoctypeHtml5
  17. a:link { background-color: #f2f1e9; transition-property: all; transition-duration: 1s; opacity: 0;

    } a:hover { background-color: #df9171; opacity: 1; } Css3 and Presentation | DoctypeHtml5
  18. form input[type="submit"]:hover { -webkit-box-shadow: 0px 0px 12px #C90; -moz-box-shadow: 0px

    0px 12px #C90; box-shadow: 0px 0px 12px #C90; } Css3 and Presentation | DoctypeHtml5
  19. Css3 and Presentation | DoctypeHtml5 form#payment label[for=visa] { background-image: url(visa.gif);

    } form#payment label[for=amex] { background-image: url(amex.gif); } form#payment label[for=mastercard] { background-image: url(mastercard.gif); }
  20. Css3 and Presentation | DoctypeHtml5 form#payment > fieldset > legend:before

    { content: "Step " counter(fieldsets) ": "; counter-increment: fieldsets; }
  21. @font-face { font-family: 'MyFontFamily'; src: url('myfont-webfont.eot#') format('embedded-opentype'), url('myfont-webfont.woff') format('woff'), !

    url('myfont-webfont.ttf') format('truetype'), ! url('myfont-webfont.svg#webfontFqDaNIX6') format('svg'); } .foo {font-family: ‘MyFontFamily’;} Css3 and Presentation | DoctypeHtml5
  22. @media all and (min-width: 480px) and (max-width: 800px) { #gallery

    { width: 600px; float: left; } } @media all and (max-width: 480px) { #gallery { width: 120px; float: none; } } Css3 and Presentation | DoctypeHtml5
  23. My name is Rahul Gonsalves. I run Pixelogue, a small

    Bangalore-based design studio. You can email me at [email protected] Thank you. Css3 and Presentation | DoctypeHtml5