SlideShare a Scribd company logo
THECSS3 OF
TOMORROW



        PETER GASSTON
       @STOPSATGREEN
      BROKEN-LINKS.COM
“35 Awesome CSS3 Examples!”

 “50+ Best CSS3 Examples!”

     “350+ Amazing CSS3
   Resources - All You'll Ever
Need to Become a CSS3 Master!”
CSS3 TODAY

         border-radius: 5px;



    box-shadow: 2px 2px 4px #000;



    text-shadow: 4px 4px 2px #000;
BACKGROUNDS & BORDERS

background-image:
 url('img1.png'),
 url('img2.png'),
 url('img3.png');

border-image:
url('img1.png')
20 25 20 25 stretch;
SELECTORS
      :first-child | :last-child

    :first-of-type | :last-of-type

   :nth-child() | :nth-last-child()

  :nth-of-type() | :nth-last-of-type()
OPACITY, ALPHA & COLOUR
           opacity: 0.5;
     color: rgba(255,0,0,0.5);
      color: hsl(0,100%,50%);
    color: hsla(0,100%,50%,0.5);
WEB FONTS
   @font-face {
    font-family: 'My Font';
    src: url('/path/to/font.woff');
   }

   h1 { font-family: 'My Font'; }
MEDIA QUERIES
  @media all and (min-device-width: 480px)
       @media all and (pixel-ratio: 2)
       @media screen not (monochrome)
 @media screen and (max-device-width: 640px)
           and (touch-enabled: 1)
GRADIENTS
                 linear-gradient(45deg,red,yellow);
           repeating-linear-gradient(red,blue 10%);
           radial-gradient(circle cover,red,blue);
           repeating-radial-gradient(red,blue 10%);




http://leaverou.me/
css3patterns/
TRANSFORMATIONS
                            transform: rotate(45deg);
                  transform: rotate3d(1,1,0,45deg);




http://westciv.com/tools/
transforms/
TRANSITIONS & ANIMATIONS
   transition: all 2s 500ms ease-in;

   @keyframes foo {
       from { color: #f00; }
       50% { color: #00f; }
       to { color: #0f0; }
   }

   div { animation: foo 1s linear; }
TRANSITIONS & ANIMATIONS




http://daneden.me/
animate/
MULTIPLE COLUMNS
                    div {
                     column-count: 3;
                     column-width: 25em;
                     column-gap: 1.5em;
                     column-rule: 3px double #f00;
                    }

                    h2 { column-span: all; }




Implemented fully in Chrome, Opera, Safari, coming in IE10, in Firefox but using -moz- prefix.
FLEXIBLE BOX LAYOUT
                                             div { display: flexbox; }
        A            B                       .a,.b { width: 40%; }


                                             .a,.b { width: flex(1); }
            A                 B




                                             .a { width: flex(3); }
                A                 B          .b { width: flex(2); }




Currently in Chrome, Firefox, Safari, coming in IE10, but all use an older syntax; you can read more
about this in an article I wrote: http://www.netmagazine.com/tutorials/css3-flexible-box-model-explained
FLEXIBLE BOX LAYOUT
         .a {
          flex-align: center;
    a     flex-pack: center;
          width: flex(0);
         }



    c    div { flex-flow: column; }
         .a,.b { flex-order: 2; }
    a    .c { flex-order: 1; }

    b
GRID LAYOUT
                                                      div {
 div {                                                 display: grid;
  display: grid;                                       grid-columns: 1fr 1fr 2fr;
  grid-columns: 1fr 1fr 2fr;                           grid-rows: 80px auto 10em;
 }                                                    }




Coming in IE10, work apparently underway in WebKit too. Latest spec: http://dev.w3.org/csswg/css3-
grid-align/
GRID LAYOUT


              article {
               grid-column: 2;
               grid-row: 2;
               grid-column-span: 2;
              }
GRID LAYOUT
     a
             .a { grid-cell: a; }
             .b { grid-cell: b; }
             .c { grid-cell: c; }
     b


     c




             div {
              grid-template: 'abc';
             }
 a   b   c
GRID LAYOUT
         a
                         div {
                          grid-template: 'aa'
                                         'bc';
                         }
     b           c




                         div {
             c            grid-template: 'acc'
                                         'a.b';
 a
                         }
                     b
REGIONS
                    a


                                                .a { flow-into: foo; }
                    b
                                                .b { flow-from: foo; }



              b
                                                .b, .c, .d, .e {
                                                 flow-from: foo;
                                                }
                                 e
        c                                       @region .b { color: #f00 }
                     d




Currently in IE10: http://msdn.microsoft.com/en-us/ie/hh272902.aspx#_CSSConnected and in an
experimental WebKit build, using a different syntax: http://labs.adobe.com/technologies/cssregions/.
Latest spec: http://dev.w3.org/csswg/css3-regions/
LINE GRID

  article {
   layout-grid-line: 1.5;
  }

  h1 {
   layout-grid-mode: block;
  }

  p {
   layout-grid-mode: line;
   margin-bottom: 1gd;
  }




Not currently implemented. Latest spec: http://dev.w3.org/csswg/css-line-grid/
EXCLUSIONS
               div {
                shape-outside: circle(50%, 50%, 50px);
                wrap-flow: both;
               }




Currently only in an experimental WebKit build, with a different syntax: http://labs.adobe.com/
technologies/cssregions/. Latest spec: http://dev.w3.org/csswg/css3-exclusions/
EXCLUSIONS
 div {
  shape-inside: polygon(150px,0 0,300px 300px,300px);
 }
PAGED MEDIA
                               @media paged {
                                height: 100%;
                                overflow: paged-x;
                               }

                   <link rel="next" href="p2.htm">

                   @navigation {
                    nav-right: link-rel(next);
                   }




Currently only in an experimental Opera build: http://people.opera.com/howcome/2011/reader/index.html
FILTER EFFECTS
                   img { filter: grayscale(0.25); }

                img { filter: blur(5,2) sepia(1); }




Currently unimplemented. Latest spec: https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/publish/
Filters.html
SHADERS
       img {
        filter: custom(url(foo.fs), 20 20, phase 90);
       }




Currently unimplemented. Introduction: http://dstorey.tumblr.com/post/11059109286/cssshaders. Latest
spec: https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html
IMAGES

  background-image: url('
  img.png#xywh=0,20,25,30');

  background-image:
  image('img.svg','img.png',#f00);

  background-image: element(#foobar);




Latest spec: http://www.w3.org/TR/2011/WD-css3-images-20110908/
VALUES
                    width: calc((12em * 3) + 10px);

                             height: min(3em, 30px);

             list-style-type: cycle(disk, circle);

                                 content: attr(href);




Latest spec: http://www.w3.org/TR/css3-
values/
CONDITIONAL RULES
  @supports (display: grid) {}
  @supports (display: box)
  and (background: linear-gradient) {}
  @supports (display: box)
  or (background: linear-gradient) {}
  @supports not (transform: rotate3d) {}




Latest spec: http://dev.w3.org/csswg/css3-
conditional/
CONDITIONAL RULES
  @document url('http://w3.org/index.html') {}

  @document url-prefix('http://w3.org/blog/') {}

  @document domain('w3.org') {}

  @document regexp('http://w3.org/[^/]*-d{8}/') {}




Implemented in Firefox: https://developer.mozilla.org/en/CSS/@-moz-document
DEVICE ADAPTATION
                     <meta name="viewport"
                     content="width=device-width">

               @viewport { width: device-width; }




Implemented in Opera: http://www.opera.com/docs/specs/presto28/css/viewportdeviceadaptation/. Latest
spec: http://dev.w3.org/csswg/css-device-adapt/
VARIABLES
                              @var $myColor #f00;

                          h1 { color: $myColor; }




Only a suggestion at the moment: http://www.xanthir.com/blog/b4AD0
MIXINS
                               @mixin myStuff {
                                color: #f00;
                                font-size: 1.5em;
                               }

                               h1 {
                                @mix myStuff;
                                font-weight: bold;
                               }




Only a suggestion at the moment: http://www.xanthir.com/blog/b4Av0
MIXINS
    @mixin myStuff($myColor #f00) {
     color: $myColor;
     font-size: 1.5em;
    }
    h1 {
     @mix myStuff(#00f);
     font-weight: bold;
    }
NESTING
                      h1 { border: 1px solid #f00;

                        & a { color: #00f;

                          &:hover { color: #ff0; }

                       }
                      }




Only a suggestion at the moment: http://www.xanthir.com/blog/b49w0
SELECTORS
                   :matches(header,aside,div) h1 {}

                       :not(header,aside,div) h1 {}

                                          $div h1 {}




Introduction: http://www.blog.highub.com/css/whats-new-in-css-selectors-level-4/. Latest spec: http://
dev.w3.org/csswg/selectors4/
http://www.netmagazine.com/features/developers-guide-browser-adoption-rates
http://
caniuse.com/
THX. PLEASE BUY MY BOOK
                  http://nostarch.com/css3.htm




http://thebookofcss3.com or http://nostarch.com/
css3.htm
LEGAL NOTE



 Superman copyright is a contentious issue, but the images I
use here belong to DC Comics and no permission was given. I
  hope they fall under fair use doctrines. You should buy a
        copy of All Star Superman – it’s really good!

More Related Content

Viewers also liked

The CSS3 of Tomorrow (Version 2)
The CSS3 of Tomorrow (Version 2)The CSS3 of Tomorrow (Version 2)
The CSS3 of Tomorrow (Version 2)
Peter Gasston
 
Web Components: What, Why, How, and When
Web Components: What, Why, How, and WhenWeb Components: What, Why, How, and When
Web Components: What, Why, How, and When
Peter Gasston
 
CSS: The Boring Bits
CSS: The Boring BitsCSS: The Boring Bits
CSS: The Boring Bits
Peter Gasston
 
The Home of the Future: CSS Layouts
The Home of the Future: CSS LayoutsThe Home of the Future: CSS Layouts
The Home of the Future: CSS Layouts
Peter Gasston
 
CSS3 With A Safety Net - Sudweb 2012
CSS3 With A Safety Net - Sudweb 2012CSS3 With A Safety Net - Sudweb 2012
CSS3 With A Safety Net - Sudweb 2012
Peter Gasston
 
Topsy Turvy Design
Topsy Turvy DesignTopsy Turvy Design
Topsy Turvy Design
Rich Quick
 
HTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're goingHTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're going
brucelawson
 
It's the start of the web revolution, but it's not what you think
It's the start of the web revolution, but it's not what you thinkIt's the start of the web revolution, but it's not what you think
It's the start of the web revolution, but it's not what you think
Syd Lawrence
 
Bb learn fundamentals
Bb learn fundamentalsBb learn fundamentals
Bb learn fundamentalsa.panych
 
Waterex
WaterexWaterex
Criaturas Del Mar 8804
Criaturas Del Mar 8804Criaturas Del Mar 8804
Criaturas Del Mar 8804profejean
 
The Top 10 Best Biases
The Top 10 Best BiasesThe Top 10 Best Biases
The Top 10 Best Biases
Peter Gasston
 
What is blended learning?
What is blended learning?What is blended learning?
What is blended learning?a.panych
 
Qcon互联网产品研发改进之路
Qcon互联网产品研发改进之路Qcon互联网产品研发改进之路
Qcon互联网产品研发改进之路
yinluotianse
 
Productive JavaScript Workflow
Productive JavaScript WorkflowProductive JavaScript Workflow
Productive JavaScript Workflow
Krzysztof Szafranek
 
A Sensational Exposé With Bewildering Demonstrations
A Sensational Exposé With Bewildering DemonstrationsA Sensational Exposé With Bewildering Demonstrations
A Sensational Exposé With Bewildering Demonstrations
Peter Gasston
 
Laptop initiative workshop
Laptop initiative workshopLaptop initiative workshop
Laptop initiative workshopa.panych
 
New fac2011
New fac2011New fac2011
New fac2011a.panych
 

Viewers also liked (20)

The CSS3 of Tomorrow (Version 2)
The CSS3 of Tomorrow (Version 2)The CSS3 of Tomorrow (Version 2)
The CSS3 of Tomorrow (Version 2)
 
Web Components: What, Why, How, and When
Web Components: What, Why, How, and WhenWeb Components: What, Why, How, and When
Web Components: What, Why, How, and When
 
CSS: The Boring Bits
CSS: The Boring BitsCSS: The Boring Bits
CSS: The Boring Bits
 
The Home of the Future: CSS Layouts
The Home of the Future: CSS LayoutsThe Home of the Future: CSS Layouts
The Home of the Future: CSS Layouts
 
CSS3 With A Safety Net - Sudweb 2012
CSS3 With A Safety Net - Sudweb 2012CSS3 With A Safety Net - Sudweb 2012
CSS3 With A Safety Net - Sudweb 2012
 
Topsy Turvy Design
Topsy Turvy DesignTopsy Turvy Design
Topsy Turvy Design
 
HTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're goingHTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're going
 
It's the start of the web revolution, but it's not what you think
It's the start of the web revolution, but it's not what you thinkIt's the start of the web revolution, but it's not what you think
It's the start of the web revolution, but it's not what you think
 
tlpco Summary
tlpco Summarytlpco Summary
tlpco Summary
 
Oklahoma
OklahomaOklahoma
Oklahoma
 
Bb learn fundamentals
Bb learn fundamentalsBb learn fundamentals
Bb learn fundamentals
 
Waterex
WaterexWaterex
Waterex
 
Criaturas Del Mar 8804
Criaturas Del Mar 8804Criaturas Del Mar 8804
Criaturas Del Mar 8804
 
The Top 10 Best Biases
The Top 10 Best BiasesThe Top 10 Best Biases
The Top 10 Best Biases
 
What is blended learning?
What is blended learning?What is blended learning?
What is blended learning?
 
Qcon互联网产品研发改进之路
Qcon互联网产品研发改进之路Qcon互联网产品研发改进之路
Qcon互联网产品研发改进之路
 
Productive JavaScript Workflow
Productive JavaScript WorkflowProductive JavaScript Workflow
Productive JavaScript Workflow
 
A Sensational Exposé With Bewildering Demonstrations
A Sensational Exposé With Bewildering DemonstrationsA Sensational Exposé With Bewildering Demonstrations
A Sensational Exposé With Bewildering Demonstrations
 
Laptop initiative workshop
Laptop initiative workshopLaptop initiative workshop
Laptop initiative workshop
 
New fac2011
New fac2011New fac2011
New fac2011
 

Similar to The CSS of Tomorrow (Front Row 2011)

I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
Thomas Fuchs
 
What I discovered about layout vis CSS Grid
What I discovered about layout vis CSS GridWhat I discovered about layout vis CSS Grid
What I discovered about layout vis CSS Grid
Rachel Andrew
 
[A5]deview 2012 pt hds webkit_gpu
[A5]deview 2012 pt hds webkit_gpu[A5]deview 2012 pt hds webkit_gpu
[A5]deview 2012 pt hds webkit_gpuNAVER D2
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
Rachel Andrew
 
Refresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End StoryRefresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End Story
Rachael L Moore
 
Doing more with LESS
Doing more with LESSDoing more with LESS
Doing more with LESS
jsmith92
 
Making Links Magical Again with CSS
Making Links Magical Again with CSSMaking Links Magical Again with CSS
Making Links Magical Again with CSS
Jenn Lukas
 
A brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.com
A brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.comA brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.com
A brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.com
applicake
 
GOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for thatGOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for that
Rachel Andrew
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsMobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsKaelig Deloumeau-Prigent
 
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventHTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventRobert Nyman
 
Solving Layout Problems With CSS Grid and Friends
Solving Layout Problems With CSS Grid and FriendsSolving Layout Problems With CSS Grid and Friends
Solving Layout Problems With CSS Grid and Friends
FITC
 
Solving Layout Problems with CSS Grid & Friends - WEBU17
Solving Layout Problems with CSS Grid & Friends - WEBU17Solving Layout Problems with CSS Grid & Friends - WEBU17
Solving Layout Problems with CSS Grid & Friends - WEBU17
Rachel Andrew
 
404.ie: Solving Layout Problems with CSS Grid & Friends
404.ie: Solving Layout Problems with CSS Grid & Friends404.ie: Solving Layout Problems with CSS Grid & Friends
404.ie: Solving Layout Problems with CSS Grid & Friends
Rachel Andrew
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
Jonathan Snook
 
Solving Layout Problems with CSS Grid & Friends - NordicJS
Solving Layout Problems with CSS Grid & Friends - NordicJSSolving Layout Problems with CSS Grid & Friends - NordicJS
Solving Layout Problems with CSS Grid & Friends - NordicJS
Rachel Andrew
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3 Wynn Netherland
 
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
Codemotion
 

Similar to The CSS of Tomorrow (Front Row 2011) (20)

I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
 
What I discovered about layout vis CSS Grid
What I discovered about layout vis CSS GridWhat I discovered about layout vis CSS Grid
What I discovered about layout vis CSS Grid
 
[A5]deview 2012 pt hds webkit_gpu
[A5]deview 2012 pt hds webkit_gpu[A5]deview 2012 pt hds webkit_gpu
[A5]deview 2012 pt hds webkit_gpu
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
 
Refresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End StoryRefresh Tallahassee: The RE/MAX Front End Story
Refresh Tallahassee: The RE/MAX Front End Story
 
Doing more with LESS
Doing more with LESSDoing more with LESS
Doing more with LESS
 
Making Links Magical Again with CSS
Making Links Magical Again with CSSMaking Links Magical Again with CSS
Making Links Magical Again with CSS
 
Accelerated Stylesheets
Accelerated StylesheetsAccelerated Stylesheets
Accelerated Stylesheets
 
A brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.com
A brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.comA brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.com
A brief look at CSS3 techniques by Aaron Rodgers, Web Designer @ vzaar.com
 
GOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for thatGOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for that
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsMobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
 
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventHTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
 
Solving Layout Problems With CSS Grid and Friends
Solving Layout Problems With CSS Grid and FriendsSolving Layout Problems With CSS Grid and Friends
Solving Layout Problems With CSS Grid and Friends
 
Solving Layout Problems with CSS Grid & Friends - WEBU17
Solving Layout Problems with CSS Grid & Friends - WEBU17Solving Layout Problems with CSS Grid & Friends - WEBU17
Solving Layout Problems with CSS Grid & Friends - WEBU17
 
404.ie: Solving Layout Problems with CSS Grid & Friends
404.ie: Solving Layout Problems with CSS Grid & Friends404.ie: Solving Layout Problems with CSS Grid & Friends
404.ie: Solving Layout Problems with CSS Grid & Friends
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
 
Solving Layout Problems with CSS Grid & Friends - NordicJS
Solving Layout Problems with CSS Grid & Friends - NordicJSSolving Layout Problems with CSS Grid & Friends - NordicJS
Solving Layout Problems with CSS Grid & Friends - NordicJS
 
CSS3 3D Workshop
CSS3 3D WorkshopCSS3 3D Workshop
CSS3 3D Workshop
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3
 
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
Joan Leon | Houdini, programando en CSS | Codemotion Madrid 2018
 

Recently uploaded

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 

Recently uploaded (20)

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 

The CSS of Tomorrow (Front Row 2011)

  • 1. THECSS3 OF TOMORROW PETER GASSTON @STOPSATGREEN BROKEN-LINKS.COM
  • 2.
  • 3.
  • 4.
  • 5. “35 Awesome CSS3 Examples!” “50+ Best CSS3 Examples!” “350+ Amazing CSS3 Resources - All You'll Ever Need to Become a CSS3 Master!”
  • 6. CSS3 TODAY border-radius: 5px; box-shadow: 2px 2px 4px #000; text-shadow: 4px 4px 2px #000;
  • 7. BACKGROUNDS & BORDERS background-image: url('img1.png'), url('img2.png'), url('img3.png'); border-image: url('img1.png') 20 25 20 25 stretch;
  • 8. SELECTORS :first-child | :last-child :first-of-type | :last-of-type :nth-child() | :nth-last-child() :nth-of-type() | :nth-last-of-type()
  • 9. OPACITY, ALPHA & COLOUR opacity: 0.5; color: rgba(255,0,0,0.5); color: hsl(0,100%,50%); color: hsla(0,100%,50%,0.5);
  • 10. WEB FONTS @font-face { font-family: 'My Font'; src: url('/path/to/font.woff'); } h1 { font-family: 'My Font'; }
  • 11. MEDIA QUERIES @media all and (min-device-width: 480px) @media all and (pixel-ratio: 2) @media screen not (monochrome) @media screen and (max-device-width: 640px) and (touch-enabled: 1)
  • 12.
  • 13. GRADIENTS linear-gradient(45deg,red,yellow); repeating-linear-gradient(red,blue 10%); radial-gradient(circle cover,red,blue); repeating-radial-gradient(red,blue 10%); http://leaverou.me/ css3patterns/
  • 14. TRANSFORMATIONS transform: rotate(45deg); transform: rotate3d(1,1,0,45deg); http://westciv.com/tools/ transforms/
  • 15. TRANSITIONS & ANIMATIONS transition: all 2s 500ms ease-in; @keyframes foo { from { color: #f00; } 50% { color: #00f; } to { color: #0f0; } } div { animation: foo 1s linear; }
  • 17.
  • 18.
  • 19. MULTIPLE COLUMNS div { column-count: 3; column-width: 25em; column-gap: 1.5em; column-rule: 3px double #f00; } h2 { column-span: all; } Implemented fully in Chrome, Opera, Safari, coming in IE10, in Firefox but using -moz- prefix.
  • 20.
  • 21. FLEXIBLE BOX LAYOUT div { display: flexbox; } A B .a,.b { width: 40%; } .a,.b { width: flex(1); } A B .a { width: flex(3); } A B .b { width: flex(2); } Currently in Chrome, Firefox, Safari, coming in IE10, but all use an older syntax; you can read more about this in an article I wrote: http://www.netmagazine.com/tutorials/css3-flexible-box-model-explained
  • 22. FLEXIBLE BOX LAYOUT .a { flex-align: center; a flex-pack: center; width: flex(0); } c div { flex-flow: column; } .a,.b { flex-order: 2; } a .c { flex-order: 1; } b
  • 23. GRID LAYOUT div { div { display: grid; display: grid; grid-columns: 1fr 1fr 2fr; grid-columns: 1fr 1fr 2fr; grid-rows: 80px auto 10em; } } Coming in IE10, work apparently underway in WebKit too. Latest spec: http://dev.w3.org/csswg/css3- grid-align/
  • 24. GRID LAYOUT article { grid-column: 2; grid-row: 2; grid-column-span: 2; }
  • 25. GRID LAYOUT a .a { grid-cell: a; } .b { grid-cell: b; } .c { grid-cell: c; } b c div { grid-template: 'abc'; } a b c
  • 26. GRID LAYOUT a div { grid-template: 'aa' 'bc'; } b c div { c grid-template: 'acc' 'a.b'; a } b
  • 27.
  • 28. REGIONS a .a { flow-into: foo; } b .b { flow-from: foo; } b .b, .c, .d, .e { flow-from: foo; } e c @region .b { color: #f00 } d Currently in IE10: http://msdn.microsoft.com/en-us/ie/hh272902.aspx#_CSSConnected and in an experimental WebKit build, using a different syntax: http://labs.adobe.com/technologies/cssregions/. Latest spec: http://dev.w3.org/csswg/css3-regions/
  • 29. LINE GRID article { layout-grid-line: 1.5; } h1 { layout-grid-mode: block; } p { layout-grid-mode: line; margin-bottom: 1gd; } Not currently implemented. Latest spec: http://dev.w3.org/csswg/css-line-grid/
  • 30. EXCLUSIONS div { shape-outside: circle(50%, 50%, 50px); wrap-flow: both; } Currently only in an experimental WebKit build, with a different syntax: http://labs.adobe.com/ technologies/cssregions/. Latest spec: http://dev.w3.org/csswg/css3-exclusions/
  • 31. EXCLUSIONS div { shape-inside: polygon(150px,0 0,300px 300px,300px); }
  • 32.
  • 33. PAGED MEDIA @media paged { height: 100%; overflow: paged-x; } <link rel="next" href="p2.htm"> @navigation { nav-right: link-rel(next); } Currently only in an experimental Opera build: http://people.opera.com/howcome/2011/reader/index.html
  • 34. FILTER EFFECTS img { filter: grayscale(0.25); } img { filter: blur(5,2) sepia(1); } Currently unimplemented. Latest spec: https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/publish/ Filters.html
  • 35. SHADERS img { filter: custom(url(foo.fs), 20 20, phase 90); } Currently unimplemented. Introduction: http://dstorey.tumblr.com/post/11059109286/cssshaders. Latest spec: https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html
  • 36.
  • 37.
  • 38. IMAGES background-image: url(' img.png#xywh=0,20,25,30'); background-image: image('img.svg','img.png',#f00); background-image: element(#foobar); Latest spec: http://www.w3.org/TR/2011/WD-css3-images-20110908/
  • 39. VALUES width: calc((12em * 3) + 10px); height: min(3em, 30px); list-style-type: cycle(disk, circle); content: attr(href); Latest spec: http://www.w3.org/TR/css3- values/
  • 40. CONDITIONAL RULES @supports (display: grid) {} @supports (display: box) and (background: linear-gradient) {} @supports (display: box) or (background: linear-gradient) {} @supports not (transform: rotate3d) {} Latest spec: http://dev.w3.org/csswg/css3- conditional/
  • 41. CONDITIONAL RULES @document url('http://w3.org/index.html') {} @document url-prefix('http://w3.org/blog/') {} @document domain('w3.org') {} @document regexp('http://w3.org/[^/]*-d{8}/') {} Implemented in Firefox: https://developer.mozilla.org/en/CSS/@-moz-document
  • 42. DEVICE ADAPTATION <meta name="viewport" content="width=device-width"> @viewport { width: device-width; } Implemented in Opera: http://www.opera.com/docs/specs/presto28/css/viewportdeviceadaptation/. Latest spec: http://dev.w3.org/csswg/css-device-adapt/
  • 43. VARIABLES @var $myColor #f00; h1 { color: $myColor; } Only a suggestion at the moment: http://www.xanthir.com/blog/b4AD0
  • 44. MIXINS @mixin myStuff { color: #f00; font-size: 1.5em; } h1 { @mix myStuff; font-weight: bold; } Only a suggestion at the moment: http://www.xanthir.com/blog/b4Av0
  • 45. MIXINS @mixin myStuff($myColor #f00) { color: $myColor; font-size: 1.5em; } h1 { @mix myStuff(#00f); font-weight: bold; }
  • 46. NESTING h1 { border: 1px solid #f00; & a { color: #00f; &:hover { color: #ff0; } } } Only a suggestion at the moment: http://www.xanthir.com/blog/b49w0
  • 47. SELECTORS :matches(header,aside,div) h1 {} :not(header,aside,div) h1 {} $div h1 {} Introduction: http://www.blog.highub.com/css/whats-new-in-css-selectors-level-4/. Latest spec: http:// dev.w3.org/csswg/selectors4/
  • 48.
  • 51. THX. PLEASE BUY MY BOOK http://nostarch.com/css3.htm http://thebookofcss3.com or http://nostarch.com/ css3.htm
  • 52. LEGAL NOTE Superman copyright is a contentious issue, but the images I use here belong to DC Comics and no permission was given. I hope they fall under fair use doctrines. You should buy a copy of All Star Superman – it’s really good!