SlideShare une entreprise Scribd logo
1  sur  59
Télécharger pour lire hors ligne
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!”
BORDER-RADIUS

  border-radius: 5px;
  border-radius: 5px 5px 0 0;
  border-radius: 5px 0 / 2px 0;
BOX SHADOW

box-shadow: 2px 2px 2px #000;
box-shadow: inset 2px 2px 2px #000;
TEXT SHADOW

text-shadow: 2px 2px 2px #000;
text-shadow: 0 -1px #000, 0 1px #fff;
BACKGROUNDS & BORDERS

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

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

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

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

:nth-of-type() | :nth-last-of-type()
SELECTORS

:nth-of-type(even):not(: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);
OPACITY, ALPHA & COLOUR
WEB FONTS

 @font-face {
   font-family: 'My Font';
   src: url('/path/to/font.woff');
 }

 h1 { font-family: 'My Font'; }
WEB FONTS




  http://lostworldsfairs.com
MEDIA QUERIES

@media all and (min-device-width:480px)

@media all and (-webkit-pixel-ratio:2)

    @media screen not (monochrome)

 @media screen and (max-device-width:
 640px) and (-moz-touch-enabled: 1)
MEDIA QUERIES




  http://mediaqueri.es
LINEAR GRADIENTS

      linear-gradient(red,blue);

linear-gradient(45deg,red,yellow,blue);

repeating-linear-gradient(red,blue 10%);
RADIAL GRADIENTS

       radial-gradient(red,blue);

 radial-gradient(0 100%,farthest-side,
 red,yellow,blue);
repeating-radial-gradient(red,blue 10%);
RADIAL GRADIENTS

     -moz-radial-gradient(100% 0,
     circle,red,blue);

 -webkit-gradient(radial,100% 0,0,100%
 0,number,from(red),to(blue));
2   2
sqrt(x +y )
GRADIENTS




http://leaverou.me/css3patterns/
2D TRANSFORMATIONS

       transform: rotate(45deg);

     transform: skew(15deg,7.5deg);

transform: scale(2) translate(1em,-25px);
2D TRANSFORMATIONS




http://media.24ways.org/2009/14/5/index.html
3D TRANSFORMATIONS


  transform: rotate3d(1,1,0,45deg);

transform: translate3d(1em,-15px,10%);

    transform: scale3d(0.5,3,1.1);
3D TRANSFORMATIONS




http://broken-links.com/tests/nakamats
TRANSITIONS

      transition: all 1s linear;

transition: width 2s 500ms ease-in-out;
ANIMATIONS

  @keyframes 'name' {
    from { border-width: 10px; }
    50% { border-width: 1px; }
    to {
      border-width: 1px;
      height: 120px;
    }
  }

  div { animation: name 1s linear; }
MULTIPLE COLUMNS
         column-count: 3;

        column-width: 25em;

        column-gap: 1.5em;

   column-rule: 3px double #f00;

        column-span: all;
FLEXIBLE BOX LAYOUT
                           div { display: box;
   A           B           width: 80em; }
                           .a,.b { width: 25em; }

       A           B       .a,.b { box-flex: 1; }


           A           B
                           .a { box-flex: 3; }
                           .b { box-flex: 2; }

http://netmag.co.uk/tutorials/css3-flexible-box-model-explained
FLEXIBLE BOX LAYOUT
                                c


        a                       a


                                b




.a {                 div {
                     box-orient: vertical; }
box-flex: 0;         .a,.b {
box-align: center;   box-ordinal-group: 2; }
box-pack: center;    .c {
}                    box-ordinal-group: 1; }
GRID POSITIONING
div {                         div {
display: grid;                display: grid;
grid-columns: 1fr 1fr 2fr;    grid-columns: 1fr 1fr 2fr;
}                             grid-rows: 80px auto 10em;
                              }




                   http://j.mp/kul0H1
GRID POSITIONING
       .a {
       grid-column: 2;
       grid-row: 2;
       grid-column-span: 2;
       }
TEMPLATE LAYOUT
           a


           b                       a        b        c


           c




.a { position: a; }            div {
.b { position: b; }              display: 'abc';
.c { position: c; }            }

           http://www.w3.org/TR/css3-layout/
     http://code.google.com/p/css-template-layout/
TEMPLATE LAYOUT
         a
                                   c

                          a
    b        c                         b




div {                 div {
display: 'aa' 'bc';   display: 'acc' 'a.b';
}                     }
GRID POSITIONING

         a                         a


         b

                              b        c
         c



.a { grid-cell: a; }   div {
.b { grid-cell: b; }   grid-template: 'aa' 'bc';
.c { grid-cell: c; }   }
EXTENDED FLOATS


                             div {
                             float: positioned;
                             position: absolute;
                             left: 33.3%;
                             top: 100px;
                             width: 33.3%;
                             }



  http://www.interoperabilitybridges.com/css3-floats/
REGIONS
           a


                            .a { flow: foo; }
                            .b { content: from(foo); }
           b




     b

                            .b, .c, .d, .e {
                   e        content: from(foo);
 c                          }
            d

         http://labs.adobe.com/technologies/cssregions/
             http://dev.w3.org/csswg/css3-regions/
EXCLUSIONS
.b {
wrap-shape: polygon(150px,0 0,300px 300px,300px);
wrap-shape-mode: around;
}




        http://dev.w3.org/csswg/css3-exclusions/
EXCLUSIONS
.a { wrap-shape-mode: content; }
.b {
wrap-shape: polygon(150px,0 0,300px 300px,300px);
wrap-shape-mode: around;
}
GROUPING SELECTOR

 header h1, article h1, aside h1 {};

 :any(header,article,aside) h1 {}

 ol ul li a, ul ul li a, ul ul ul li
 a, ol ul ul li a {};

 :any(ol,ul,ul ul,ol ul) ul li a {}
CALCULATIONS

      width: calc(20em + 10px);

height: calc((85% / 4) – (1em + 2px));

  border-width: calc(110px mod 4);
IMAGES
             background: url('
             img.png#xywh=0,20,25,30
             ');

             background: -moz-image-
             rect(url('img.png'),20,
             20,0,0);

background-image:
url('img.svg'),url('img.png') or #f00;
CONDITIONAL RULES

       @supports (display: grid) {}

   @supports (display: box)
   and (background: linear-gradient) {}

   @supports (display: box)
   or (background: linear-gradient) {}

  @supports not (transform: rotate3d) {}



    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}/') {}
VARIABLES & MIXINS
     @var $myColor #f00;

     h1 { color: $myColor; }

       @mixin myStuff {
         color: #f00;
         font-size: 1.5em;
       }

       h1 {
         font-weight: bold;
         @mix myStuff;
       }
     http://www.xanthir.com/blog/b4Av0
VARIABLES & MIXINS

   @mixin myStuff($myColor #f00) {
     color: $myColor;
     font-size: 1.5em;
   }

   h1 {
     font-weight: bold;
     @mix myStuff(#00f);
   }
CSS4
THX. PLEASE BUY MY BOOK
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!

Contenu connexe

En vedette

CSS3: Are you experienced?
CSS3: Are you experienced?CSS3: Are you experienced?
CSS3: Are you experienced?Denise Jacobs
 
Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Joseph Lewis
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3Doris Chen
 
HTML5, CSS3, and JavaScript
HTML5, CSS3, and JavaScriptHTML5, CSS3, and JavaScript
HTML5, CSS3, and JavaScriptZac Gordon
 
It's Business Time: Givin' User Experience Love with CSS3
It's Business Time: Givin' User Experience Love with CSS3It's Business Time: Givin' User Experience Love with CSS3
It's Business Time: Givin' User Experience Love with CSS3Denise Jacobs
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 WorkshopChristopher Schmitt
 
Microsoft TechDays - CSS3 Presentation
Microsoft TechDays - CSS3 PresentationMicrosoft TechDays - CSS3 Presentation
Microsoft TechDays - CSS3 PresentationRachel Andrew
 
CSS3: Simply Responsive
CSS3: Simply ResponsiveCSS3: Simply Responsive
CSS3: Simply ResponsiveDenise Jacobs
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersTodd Anglin
 
CSS3 secrets: 10 things you might not know about CSS3
CSS3 secrets: 10 things you might not know about CSS3CSS3 secrets: 10 things you might not know about CSS3
CSS3 secrets: 10 things you might not know about CSS3Lea Verou
 
Quality Development with CSS3
Quality Development with CSS3Quality Development with CSS3
Quality Development with CSS3Shay Howe
 
Designing Mobile Apps with HTML5 & CSS3
Designing Mobile Apps with HTML5 & CSS3Designing Mobile Apps with HTML5 & CSS3
Designing Mobile Apps with HTML5 & CSS3Johannes Ippen
 
CSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondCSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondDenise Jacobs
 
Mastering CSS3 gradients
Mastering CSS3 gradientsMastering CSS3 gradients
Mastering CSS3 gradientsLea Verou
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media QueriesRuss Weakley
 

En vedette (20)

CSS3: Are you experienced?
CSS3: Are you experienced?CSS3: Are you experienced?
CSS3: Are you experienced?
 
Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
HTML5, CSS3, and JavaScript
HTML5, CSS3, and JavaScriptHTML5, CSS3, and JavaScript
HTML5, CSS3, and JavaScript
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
 
It's Business Time: Givin' User Experience Love with CSS3
It's Business Time: Givin' User Experience Love with CSS3It's Business Time: Givin' User Experience Love with CSS3
It's Business Time: Givin' User Experience Love with CSS3
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop
 
Microsoft TechDays - CSS3 Presentation
Microsoft TechDays - CSS3 PresentationMicrosoft TechDays - CSS3 Presentation
Microsoft TechDays - CSS3 Presentation
 
CSS3 now
CSS3 nowCSS3 now
CSS3 now
 
CSS3: Simply Responsive
CSS3: Simply ResponsiveCSS3: Simply Responsive
CSS3: Simply Responsive
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
 
CSS3 and Selectors
CSS3 and SelectorsCSS3 and Selectors
CSS3 and Selectors
 
Intro to CSS3
Intro to CSS3Intro to CSS3
Intro to CSS3
 
CSS3 secrets: 10 things you might not know about CSS3
CSS3 secrets: 10 things you might not know about CSS3CSS3 secrets: 10 things you might not know about CSS3
CSS3 secrets: 10 things you might not know about CSS3
 
Quality Development with CSS3
Quality Development with CSS3Quality Development with CSS3
Quality Development with CSS3
 
Designing Mobile Apps with HTML5 & CSS3
Designing Mobile Apps with HTML5 & CSS3Designing Mobile Apps with HTML5 & CSS3
Designing Mobile Apps with HTML5 & CSS3
 
CSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondCSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to Respond
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
 
Mastering CSS3 gradients
Mastering CSS3 gradientsMastering CSS3 gradients
Mastering CSS3 gradients
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 

Similaire à The CSS3 of Tomorrow (Version 2)

The CSS of Tomorrow (Front Row 2011)
The CSS of Tomorrow (Front Row 2011)The CSS of Tomorrow (Front Row 2011)
The CSS of Tomorrow (Front Row 2011)Peter Gasston
 
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 GridRachel Andrew
 
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)Igalia
 
Talk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid LayoutTalk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid LayoutRachel Andrew
 
An Event Apart Nashville: CSS Grid Layout
An Event Apart Nashville: CSS Grid LayoutAn Event Apart Nashville: CSS Grid Layout
An Event Apart Nashville: CSS Grid LayoutRachel Andrew
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSSRachel Andrew
 
CSS Grid layout - De volta para o futuro
CSS Grid layout - De volta para o futuroCSS Grid layout - De volta para o futuro
CSS Grid layout - De volta para o futuroAfonso Pacifer
 
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 thatRachel Andrew
 
Simple flat ui css accordion
Simple flat ui css accordionSimple flat ui css accordion
Simple flat ui css accordionSamsury Blog
 
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 FlashThomas Fuchs
 
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 StoryRachael L Moore
 
The Future of Frontend - what is new in CSS?
The Future of Frontend - what is new in CSS?The Future of Frontend - what is new in CSS?
The Future of Frontend - what is new in CSS?Rachel Andrew
 
Start Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJSStart Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJSRachel Andrew
 
Introduction to CSS Grid Layout
Introduction to CSS Grid LayoutIntroduction to CSS Grid Layout
Introduction to CSS Grid LayoutRachel Andrew
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]ThemePartner
 
An Event Apart SF: CSS Grid Layout
An Event Apart SF: CSS Grid LayoutAn Event Apart SF: CSS Grid Layout
An Event Apart SF: CSS Grid LayoutRachel Andrew
 
Would you like some Grids with that?
Would you like some Grids with that?Would you like some Grids with that?
Would you like some Grids with that?Kianosh Pourian
 
Making the most of New CSS Layout
Making the most of New CSS LayoutMaking the most of New CSS Layout
Making the most of New CSS LayoutRachel Andrew
 
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 - WEBU17Rachel Andrew
 

Similaire à The CSS3 of Tomorrow (Version 2) (20)

The CSS of Tomorrow (Front Row 2011)
The CSS of Tomorrow (Front Row 2011)The CSS of Tomorrow (Front Row 2011)
The CSS of Tomorrow (Front Row 2011)
 
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
 
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
CSS Grid Layout from the inside out (HTML5DevConf Autumn 2015)
 
Talk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid LayoutTalk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid Layout
 
An Event Apart Nashville: CSS Grid Layout
An Event Apart Nashville: CSS Grid LayoutAn Event Apart Nashville: CSS Grid Layout
An Event Apart Nashville: CSS Grid Layout
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
 
CSS Grid layout - De volta para o futuro
CSS Grid layout - De volta para o futuroCSS Grid layout - De volta para o futuro
CSS Grid layout - De volta para o futuro
 
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
 
Simple flat ui css accordion
Simple flat ui css accordionSimple flat ui css accordion
Simple flat ui css accordion
 
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
 
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
 
The Future of Frontend - what is new in CSS?
The Future of Frontend - what is new in CSS?The Future of Frontend - what is new in CSS?
The Future of Frontend - what is new in CSS?
 
Next-level CSS
Next-level CSSNext-level CSS
Next-level CSS
 
Start Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJSStart Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJS
 
Introduction to CSS Grid Layout
Introduction to CSS Grid LayoutIntroduction to CSS Grid Layout
Introduction to CSS Grid Layout
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]
 
An Event Apart SF: CSS Grid Layout
An Event Apart SF: CSS Grid LayoutAn Event Apart SF: CSS Grid Layout
An Event Apart SF: CSS Grid Layout
 
Would you like some Grids with that?
Would you like some Grids with that?Would you like some Grids with that?
Would you like some Grids with that?
 
Making the most of New CSS Layout
Making the most of New CSS LayoutMaking the most of New CSS Layout
Making the most of New CSS Layout
 
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
 

Dernier

Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 

Dernier (20)

Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 

The CSS3 of Tomorrow (Version 2)

  • 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. BORDER-RADIUS border-radius: 5px; border-radius: 5px 5px 0 0; border-radius: 5px 0 / 2px 0;
  • 7. BOX SHADOW box-shadow: 2px 2px 2px #000; box-shadow: inset 2px 2px 2px #000;
  • 8. TEXT SHADOW text-shadow: 2px 2px 2px #000; text-shadow: 0 -1px #000, 0 1px #fff;
  • 9. BACKGROUNDS & BORDERS background-image: url('img1.png'), url('img2.png'), url('img3.png'); border-image: url('img1.png') 20 25 20 25 stretch;
  • 12. SELECTORS :first-child | :last-child :first-of-type | :last-of-type :nth-child() | :nth-last-child() :nth-of-type() | :nth-last-of-type()
  • 14. 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);
  • 16. WEB FONTS @font-face { font-family: 'My Font'; src: url('/path/to/font.woff'); } h1 { font-family: 'My Font'; }
  • 17. WEB FONTS http://lostworldsfairs.com
  • 18. MEDIA QUERIES @media all and (min-device-width:480px) @media all and (-webkit-pixel-ratio:2) @media screen not (monochrome) @media screen and (max-device-width: 640px) and (-moz-touch-enabled: 1)
  • 19. MEDIA QUERIES http://mediaqueri.es
  • 20.
  • 21. LINEAR GRADIENTS linear-gradient(red,blue); linear-gradient(45deg,red,yellow,blue); repeating-linear-gradient(red,blue 10%);
  • 22. RADIAL GRADIENTS radial-gradient(red,blue); radial-gradient(0 100%,farthest-side, red,yellow,blue); repeating-radial-gradient(red,blue 10%);
  • 23. RADIAL GRADIENTS -moz-radial-gradient(100% 0, circle,red,blue); -webkit-gradient(radial,100% 0,0,100% 0,number,from(red),to(blue));
  • 24. 2 2 sqrt(x +y )
  • 26. 2D TRANSFORMATIONS transform: rotate(45deg); transform: skew(15deg,7.5deg); transform: scale(2) translate(1em,-25px);
  • 28. 3D TRANSFORMATIONS transform: rotate3d(1,1,0,45deg); transform: translate3d(1em,-15px,10%); transform: scale3d(0.5,3,1.1);
  • 30. TRANSITIONS transition: all 1s linear; transition: width 2s 500ms ease-in-out;
  • 31. ANIMATIONS @keyframes 'name' { from { border-width: 10px; } 50% { border-width: 1px; } to { border-width: 1px; height: 120px; } } div { animation: name 1s linear; }
  • 32.
  • 33. MULTIPLE COLUMNS column-count: 3; column-width: 25em; column-gap: 1.5em; column-rule: 3px double #f00; column-span: all;
  • 34.
  • 35. FLEXIBLE BOX LAYOUT div { display: box; A B width: 80em; } .a,.b { width: 25em; } A B .a,.b { box-flex: 1; } A B .a { box-flex: 3; } .b { box-flex: 2; } http://netmag.co.uk/tutorials/css3-flexible-box-model-explained
  • 36. FLEXIBLE BOX LAYOUT c a a b .a { div { box-orient: vertical; } box-flex: 0; .a,.b { box-align: center; box-ordinal-group: 2; } box-pack: center; .c { } box-ordinal-group: 1; }
  • 37. GRID POSITIONING div { div { display: grid; display: grid; grid-columns: 1fr 1fr 2fr; grid-columns: 1fr 1fr 2fr; } grid-rows: 80px auto 10em; } http://j.mp/kul0H1
  • 38. GRID POSITIONING .a { grid-column: 2; grid-row: 2; grid-column-span: 2; }
  • 39. TEMPLATE LAYOUT a b a b c c .a { position: a; } div { .b { position: b; } display: 'abc'; .c { position: c; } } http://www.w3.org/TR/css3-layout/ http://code.google.com/p/css-template-layout/
  • 40. TEMPLATE LAYOUT a c a b c b div { div { display: 'aa' 'bc'; display: 'acc' 'a.b'; } }
  • 41. GRID POSITIONING a a b b c c .a { grid-cell: a; } div { .b { grid-cell: b; } grid-template: 'aa' 'bc'; .c { grid-cell: c; } }
  • 42. EXTENDED FLOATS div { float: positioned; position: absolute; left: 33.3%; top: 100px; width: 33.3%; } http://www.interoperabilitybridges.com/css3-floats/
  • 43.
  • 44. REGIONS a .a { flow: foo; } .b { content: from(foo); } b b .b, .c, .d, .e { e content: from(foo); c } d http://labs.adobe.com/technologies/cssregions/ http://dev.w3.org/csswg/css3-regions/
  • 45. EXCLUSIONS .b { wrap-shape: polygon(150px,0 0,300px 300px,300px); wrap-shape-mode: around; } http://dev.w3.org/csswg/css3-exclusions/
  • 46. EXCLUSIONS .a { wrap-shape-mode: content; } .b { wrap-shape: polygon(150px,0 0,300px 300px,300px); wrap-shape-mode: around; }
  • 47.
  • 48. GROUPING SELECTOR header h1, article h1, aside h1 {}; :any(header,article,aside) h1 {} ol ul li a, ul ul li a, ul ul ul li a, ol ul ul li a {}; :any(ol,ul,ul ul,ol ul) ul li a {}
  • 49. CALCULATIONS width: calc(20em + 10px); height: calc((85% / 4) – (1em + 2px)); border-width: calc(110px mod 4);
  • 50. IMAGES background: url(' img.png#xywh=0,20,25,30 '); background: -moz-image- rect(url('img.png'),20, 20,0,0); background-image: url('img.svg'),url('img.png') or #f00;
  • 51. CONDITIONAL RULES @supports (display: grid) {} @supports (display: box) and (background: linear-gradient) {} @supports (display: box) or (background: linear-gradient) {} @supports not (transform: rotate3d) {} http://dev.w3.org/csswg/css3-conditional/
  • 52. 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}/') {}
  • 53. VARIABLES & MIXINS @var $myColor #f00; h1 { color: $myColor; } @mixin myStuff { color: #f00; font-size: 1.5em; } h1 { font-weight: bold; @mix myStuff; } http://www.xanthir.com/blog/b4Av0
  • 54. VARIABLES & MIXINS @mixin myStuff($myColor #f00) { color: $myColor; font-size: 1.5em; } h1 { font-weight: bold; @mix myStuff(#00f); }
  • 55.
  • 56.
  • 57. CSS4
  • 58. THX. PLEASE BUY MY BOOK http://nostarch.com/css3.htm
  • 59. 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!