SlideShare a Scribd company logo
Brian Graves
@briangraves
CSS in 2015 is Amazing.
WHERE HAVE
WE BEEN?
There is No CSS3!
And other facts about how standards are made.
Despite the popularity of the “CSS3”
buzzword, there is actually no spec
defining such a thing.
– Lea Verou
Animation
Typography
Layout
“CSS is not a real
programming language”
Problems with CSS
• Cross-browser compatibility issues
• Vendor prefixes
• No variables
• No inline importing
• No nested selectors
• No functions/mixins
• No color manipulation
• No basic arithmetic
Rise of the Preprocessors.
How we filled in the gaps.
.row {
@include display-flex;
background-color: $color-blue;
}
.row {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
background-color: #173fb1;
}
Preprocessors
Perpetuate A Problem.
– Aaron Ladage
More & More
Layers of Abstraction
Problems with Preprocessors
• Not “real” code
• Proprietary syntax
• Often written in non front-end languages
• Not as easily extensible
• Must be compiled
• Compile times can be slow
• Browsers are catching up
Preprocessors?
Where we’re going, we don’t need preprocessors.
THE FUTURE
OF CSS IS NOW
Variables
Color Functions
Nesting
Custom Media Queries
PostCSS
.row {
@include display-flex;
background: $color-blue;
}
.row {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
background-color: #173fb1;
}
.row {
display: flex;
background: var(—color-blue);
}
.row {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
background-color: #173fb1;
}
PostCSS Advantages
• Write CSS using CSS
• Use CSS3 without worry
• Even Use CSS4
• Modular
• Works with your existing task runner
• Faster compile times
• Built on Node
• No Ruby dependencies
• Easier to debug
• Tons of existing plugins
• Can’t find a plugin? Write one
in javascript.
Autoprefixer
PostCSS Ecosystem
• Autoprefixer
• PostCSS-nested
• PostCSS-color-function
• PostCSS-calc
• PostCSS-custom-properties
• PostCSS-mixins
• PostCSS-custom-media
• CSSNext
• PostCSS-import
• Can’t find a plugin? Write one
in javascript.
Variables
:root {
--color-blue: #0A81C4;
--color-blue-dark: #005581;
}
.element {
color: var(--color-blue);
}
.element:hover {
color: var(--color-blue-dark);
}
Variables lose their value if you
have to constantly track down
what they represent.
– Ryan Heap
Color Functions
.element {
color: #1982C5;
}
.element-modifier {
color: color(#1982C5 tint(40%));
}
.element {
color: #1982C5;
}
.element-modifier {
color: color(#1982C5 shade(40%));
}
CSS Color Functions
• Tints & Shades
• RGBA Adjustment
• HSL/HWB Adjustment
• Color Blending (blend & blenda)
• Guarantee Contrast
Nesting
.element {
color: blue;
{&.modifier { color: red; }}
}
.element {
color: blue;
{&.modifier { color: red; }}
}
.element {
color: blue;
&.modifier { color: red; }
}
Custom Media Queries
@custom-media --small (min-width: 450px);
@media (--small) {
.element {
font-size: 22px;
}
}
Partials & Globbing
/* generated with grunt-sass-globbing */
@import "utilities/variables";
@import "utilities/mixins";
@import "utilities/reset";
@import “utilities/breakpoints";
@import “atoms/buttons";
@import “atoms/headings";
@import “atoms/icons";
@import “atoms/text";
@import “molecules/components/disclaimer“;
…
Mixins
Problems with CSS
• Cross-browser compatibility issues
• Vendor prefixes
• No variables
• No inline importing
• No nested selectors
• No functions/mixins
• No color manipulation
• No basic arithmetic
One Day…
Let’s Get As Close As We
Can To The Real Language
@briangraves
Thank You!

More Related Content

What's hot

TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)
Igor Talevski
 
Ember JS - Why Ember Matches My Wavelength
Ember JS - Why Ember Matches My WavelengthEmber JS - Why Ember Matches My Wavelength
Ember JS - Why Ember Matches My Wavelength
Lohith Goudagere Nagaraj
 
Building Your Own Development Tools With the Force.com Tooling API
Building Your Own Development Tools With the Force.com Tooling APIBuilding Your Own Development Tools With the Force.com Tooling API
Building Your Own Development Tools With the Force.com Tooling API
Salesforce Developers
 
Architecture - why so serious?
Architecture - why so serious?Architecture - why so serious?
Architecture - why so serious?
Barbara Fusinska
 
Rails project code review
Rails project code reviewRails project code review
Rails project code reviewRichard Huang
 
UPenn on Rails intro
UPenn on Rails introUPenn on Rails intro
UPenn on Rails intro
Mat Schaffer
 
Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?
Weng Wei
 
Being With Rails App For 3 Years
Being With Rails App For 3 YearsBeing With Rails App For 3 Years
Being With Rails App For 3 Years
deeeki
 
Fast Web Applications with Go
Fast Web Applications with Go Fast Web Applications with Go
Fast Web Applications with Go
Eylem Ozekin
 
Metaprogramming Go
Metaprogramming GoMetaprogramming Go
Metaprogramming Go
Weng Wei
 
Design for scale
Design for scaleDesign for scale
Design for scale
Doug Lampe
 
Webservices: The RESTful Approach
Webservices: The RESTful ApproachWebservices: The RESTful Approach
Webservices: The RESTful Approach
Mushfekur Rahman
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script Applications
Fabian Jakobs
 
Node as an API shim
Node as an API shimNode as an API shim
Node as an API shim
TorontoNodeJS
 
ASP.NET Core - Phillosophies, Processes and Tooling
ASP.NET Core - Phillosophies, Processes and ToolingASP.NET Core - Phillosophies, Processes and Tooling
ASP.NET Core - Phillosophies, Processes and Tooling
💻 Spencer Schneidenbach
 
Modern javascript
Modern javascriptModern javascript
Modern javascript
Kevin Ball
 
Rails bestpractices.com
Rails bestpractices.comRails bestpractices.com
Rails bestpractices.com
Richard Huang
 
Maglev-A different way to develop with Ruby
Maglev-A different way to develop with RubyMaglev-A different way to develop with Ruby
Maglev-A different way to develop with Ruby
Hernan Wilkinson
 
SOA Latam 2015
SOA Latam 2015SOA Latam 2015
SOA Latam 2015
Domingo Suarez Torres
 

What's hot (20)

TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)
 
Ember JS - Why Ember Matches My Wavelength
Ember JS - Why Ember Matches My WavelengthEmber JS - Why Ember Matches My Wavelength
Ember JS - Why Ember Matches My Wavelength
 
Building Your Own Development Tools With the Force.com Tooling API
Building Your Own Development Tools With the Force.com Tooling APIBuilding Your Own Development Tools With the Force.com Tooling API
Building Your Own Development Tools With the Force.com Tooling API
 
SGCE 2015 REST APIs
SGCE 2015 REST APIsSGCE 2015 REST APIs
SGCE 2015 REST APIs
 
Architecture - why so serious?
Architecture - why so serious?Architecture - why so serious?
Architecture - why so serious?
 
Rails project code review
Rails project code reviewRails project code review
Rails project code review
 
UPenn on Rails intro
UPenn on Rails introUPenn on Rails intro
UPenn on Rails intro
 
Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?
 
Being With Rails App For 3 Years
Being With Rails App For 3 YearsBeing With Rails App For 3 Years
Being With Rails App For 3 Years
 
Fast Web Applications with Go
Fast Web Applications with Go Fast Web Applications with Go
Fast Web Applications with Go
 
Metaprogramming Go
Metaprogramming GoMetaprogramming Go
Metaprogramming Go
 
Design for scale
Design for scaleDesign for scale
Design for scale
 
Webservices: The RESTful Approach
Webservices: The RESTful ApproachWebservices: The RESTful Approach
Webservices: The RESTful Approach
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script Applications
 
Node as an API shim
Node as an API shimNode as an API shim
Node as an API shim
 
ASP.NET Core - Phillosophies, Processes and Tooling
ASP.NET Core - Phillosophies, Processes and ToolingASP.NET Core - Phillosophies, Processes and Tooling
ASP.NET Core - Phillosophies, Processes and Tooling
 
Modern javascript
Modern javascriptModern javascript
Modern javascript
 
Rails bestpractices.com
Rails bestpractices.comRails bestpractices.com
Rails bestpractices.com
 
Maglev-A different way to develop with Ruby
Maglev-A different way to develop with RubyMaglev-A different way to develop with Ruby
Maglev-A different way to develop with Ruby
 
SOA Latam 2015
SOA Latam 2015SOA Latam 2015
SOA Latam 2015
 

Similar to Using Tomorrow's CSS Today

Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
Nick Cooley
 
Simply Responsive CSS3
Simply Responsive CSS3Simply Responsive CSS3
Simply Responsive CSS3
Denise Jacobs
 
CSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondCSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to Respond
Denise Jacobs
 
Intro to CSS3
Intro to CSS3Intro to CSS3
Intro to CSS3
Denise Jacobs
 
October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101
Eric Sembrat
 
CSS3: Ripe and Ready
CSS3: Ripe and ReadyCSS3: Ripe and Ready
CSS3: Ripe and Ready
Denise Jacobs
 
The Coding Designer's Survival Kit - Capital Camp
The Coding Designer's Survival Kit - Capital CampThe Coding Designer's Survival Kit - Capital Camp
The Coding Designer's Survival Kit - Capital Campcanarymason
 
LESS CSS
LESS CSSLESS CSS
Rockstar Graphics with HTML5
Rockstar Graphics with HTML5Rockstar Graphics with HTML5
Rockstar Graphics with HTML5
Dave Balmer
 
Using Tomorrow's CSS Today
Using Tomorrow's CSS TodayUsing Tomorrow's CSS Today
Using Tomorrow's CSS TodayBrian Graves
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi Kedar
 
ScalaClean at ScalaSphere 2019
ScalaClean at ScalaSphere 2019ScalaClean at ScalaSphere 2019
ScalaClean at ScalaSphere 2019
Rory Graves
 
Rails 3.1
Rails 3.1Rails 3.1
Rails 3.1
Lori Olson
 
A web app in pure Clojure
A web app in pure ClojureA web app in pure Clojure
A web app in pure Clojure
Dane Schneider
 
10 Advanced CSS Techniques (You Wish You Knew More About)
10 Advanced CSS Techniques (You Wish You Knew More About)10 Advanced CSS Techniques (You Wish You Knew More About)
10 Advanced CSS Techniques (You Wish You Knew More About)
Emily Lewis
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overview
Diacode
 
Performance and scalability with drupal
Performance and scalability with drupalPerformance and scalability with drupal
Performance and scalability with drupalRonan Berder
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Web
philogb
 

Similar to Using Tomorrow's CSS Today (20)

Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
 
Simply Responsive CSS3
Simply Responsive CSS3Simply Responsive CSS3
Simply Responsive CSS3
 
CSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondCSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to Respond
 
Intro to CSS3
Intro to CSS3Intro to CSS3
Intro to CSS3
 
October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101October 2014 - USG Rock Eagle - Sass 101
October 2014 - USG Rock Eagle - Sass 101
 
CSS3: Ripe and Ready
CSS3: Ripe and ReadyCSS3: Ripe and Ready
CSS3: Ripe and Ready
 
The Coding Designer's Survival Kit - Capital Camp
The Coding Designer's Survival Kit - Capital CampThe Coding Designer's Survival Kit - Capital Camp
The Coding Designer's Survival Kit - Capital Camp
 
LESS CSS
LESS CSSLESS CSS
LESS CSS
 
Rockstar Graphics with HTML5
Rockstar Graphics with HTML5Rockstar Graphics with HTML5
Rockstar Graphics with HTML5
 
Using Tomorrow's CSS Today
Using Tomorrow's CSS TodayUsing Tomorrow's CSS Today
Using Tomorrow's CSS Today
 
Sass compass
Sass compassSass compass
Sass compass
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
ScalaClean at ScalaSphere 2019
ScalaClean at ScalaSphere 2019ScalaClean at ScalaSphere 2019
ScalaClean at ScalaSphere 2019
 
Rails 3.1
Rails 3.1Rails 3.1
Rails 3.1
 
A web app in pure Clojure
A web app in pure ClojureA web app in pure Clojure
A web app in pure Clojure
 
10 Advanced CSS Techniques (You Wish You Knew More About)
10 Advanced CSS Techniques (You Wish You Knew More About)10 Advanced CSS Techniques (You Wish You Knew More About)
10 Advanced CSS Techniques (You Wish You Knew More About)
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overview
 
Performance and scalability with drupal
Performance and scalability with drupalPerformance and scalability with drupal
Performance and scalability with drupal
 
The Future of CSS
The Future of CSSThe Future of CSS
The Future of CSS
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Web
 

More from Brian Graves

Using Tomorrow's CSS Today - TEDC15
Using Tomorrow's CSS Today - TEDC15Using Tomorrow's CSS Today - TEDC15
Using Tomorrow's CSS Today - TEDC15
Brian Graves
 
Sweating the Small Stuff
Sweating the Small StuffSweating the Small Stuff
Sweating the Small Stuff
Brian Graves
 
Winning the Design Battle on Every Screen
Winning the Design Battle on Every ScreenWinning the Design Battle on Every Screen
Winning the Design Battle on Every Screen
Brian Graves
 
Adapting to a Multi-Device World: A Utility Company's Perspective
Adapting to a Multi-Device World: A Utility Company's PerspectiveAdapting to a Multi-Device World: A Utility Company's Perspective
Adapting to a Multi-Device World: A Utility Company's Perspective
Brian Graves
 
How To Optimize Your Email Workflow - TEDC13 Boston
How To Optimize Your Email Workflow - TEDC13 BostonHow To Optimize Your Email Workflow - TEDC13 Boston
How To Optimize Your Email Workflow - TEDC13 Boston
Brian Graves
 
How to Optimize Your Email Workflow - TEDC13 London
How to Optimize Your Email Workflow - TEDC13 LondonHow to Optimize Your Email Workflow - TEDC13 London
How to Optimize Your Email Workflow - TEDC13 London
Brian Graves
 
Coding for Responsive Email
Coding for Responsive EmailCoding for Responsive Email
Coding for Responsive EmailBrian Graves
 
10 Essentials for Gamestorming
10 Essentials for Gamestorming10 Essentials for Gamestorming
10 Essentials for Gamestorming
Brian Graves
 
Responsive Email Design
Responsive Email DesignResponsive Email Design
Responsive Email Design
Brian Graves
 

More from Brian Graves (9)

Using Tomorrow's CSS Today - TEDC15
Using Tomorrow's CSS Today - TEDC15Using Tomorrow's CSS Today - TEDC15
Using Tomorrow's CSS Today - TEDC15
 
Sweating the Small Stuff
Sweating the Small StuffSweating the Small Stuff
Sweating the Small Stuff
 
Winning the Design Battle on Every Screen
Winning the Design Battle on Every ScreenWinning the Design Battle on Every Screen
Winning the Design Battle on Every Screen
 
Adapting to a Multi-Device World: A Utility Company's Perspective
Adapting to a Multi-Device World: A Utility Company's PerspectiveAdapting to a Multi-Device World: A Utility Company's Perspective
Adapting to a Multi-Device World: A Utility Company's Perspective
 
How To Optimize Your Email Workflow - TEDC13 Boston
How To Optimize Your Email Workflow - TEDC13 BostonHow To Optimize Your Email Workflow - TEDC13 Boston
How To Optimize Your Email Workflow - TEDC13 Boston
 
How to Optimize Your Email Workflow - TEDC13 London
How to Optimize Your Email Workflow - TEDC13 LondonHow to Optimize Your Email Workflow - TEDC13 London
How to Optimize Your Email Workflow - TEDC13 London
 
Coding for Responsive Email
Coding for Responsive EmailCoding for Responsive Email
Coding for Responsive Email
 
10 Essentials for Gamestorming
10 Essentials for Gamestorming10 Essentials for Gamestorming
10 Essentials for Gamestorming
 
Responsive Email Design
Responsive Email DesignResponsive Email Design
Responsive Email Design
 

Recently uploaded

Moldes de letra 3D Alfabeto completo esp
Moldes de letra 3D Alfabeto completo espMoldes de letra 3D Alfabeto completo esp
Moldes de letra 3D Alfabeto completo esp
Hess9
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
n0tivyq
 
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
708pb191
 
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
smpc3nvg
 
Design-Thinking-eBook for Public Service Delivery
Design-Thinking-eBook for Public Service DeliveryDesign-Thinking-eBook for Public Service Delivery
Design-Thinking-eBook for Public Service Delivery
farhanaslam79
 
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
asuzyq
 
PDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in NoidaPDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in Noida
PoojaSaini954651
 
Impact of Fonts: in Web and Apps Design
Impact of Fonts:  in Web and Apps DesignImpact of Fonts:  in Web and Apps Design
Impact of Fonts: in Web and Apps Design
contactproperweb2014
 
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANEEASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
Febless Hernane
 
一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理
peuce
 
SECURING BUILDING PERMIT CITY OF CALOOCAN.pdf
SECURING BUILDING PERMIT CITY OF CALOOCAN.pdfSECURING BUILDING PERMIT CITY OF CALOOCAN.pdf
SECURING BUILDING PERMIT CITY OF CALOOCAN.pdf
eloprejohn333
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
9a93xvy
 
Timeless Principles of Good Design
Timeless Principles of Good DesignTimeless Principles of Good Design
Timeless Principles of Good Design
Carolina de Bartolo
 
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
pmgdscunsri
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptxUNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
GOWSIKRAJA PALANISAMY
 
Transforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting ProfitabilityTransforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting Profitability
aaryangarg12
 
Portfolio.pdf
Portfolio.pdfPortfolio.pdf
Portfolio.pdf
garcese
 
Connect Conference 2022: Passive House - Economic and Environmental Solution...
Connect Conference 2022: Passive House -  Economic and Environmental Solution...Connect Conference 2022: Passive House -  Economic and Environmental Solution...
Connect Conference 2022: Passive House - Economic and Environmental Solution...
TE Studio
 
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
h7j5io0
 

Recently uploaded (20)

Moldes de letra 3D Alfabeto completo esp
Moldes de letra 3D Alfabeto completo espMoldes de letra 3D Alfabeto completo esp
Moldes de letra 3D Alfabeto completo esp
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
 
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
一比一原版(UAL毕业证书)伦敦艺术大学毕业证成绩单如何办理
 
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
 
Design-Thinking-eBook for Public Service Delivery
Design-Thinking-eBook for Public Service DeliveryDesign-Thinking-eBook for Public Service Delivery
Design-Thinking-eBook for Public Service Delivery
 
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
 
PDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in NoidaPDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in Noida
 
Impact of Fonts: in Web and Apps Design
Impact of Fonts:  in Web and Apps DesignImpact of Fonts:  in Web and Apps Design
Impact of Fonts: in Web and Apps Design
 
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANEEASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
 
一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理
 
SECURING BUILDING PERMIT CITY OF CALOOCAN.pdf
SECURING BUILDING PERMIT CITY OF CALOOCAN.pdfSECURING BUILDING PERMIT CITY OF CALOOCAN.pdf
SECURING BUILDING PERMIT CITY OF CALOOCAN.pdf
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
 
Timeless Principles of Good Design
Timeless Principles of Good DesignTimeless Principles of Good Design
Timeless Principles of Good Design
 
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptxUNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
 
Transforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting ProfitabilityTransforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting Profitability
 
Portfolio.pdf
Portfolio.pdfPortfolio.pdf
Portfolio.pdf
 
Connect Conference 2022: Passive House - Economic and Environmental Solution...
Connect Conference 2022: Passive House -  Economic and Environmental Solution...Connect Conference 2022: Passive House -  Economic and Environmental Solution...
Connect Conference 2022: Passive House - Economic and Environmental Solution...
 
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
 

Using Tomorrow's CSS Today

Editor's Notes

  1. Throughout 2012 there was a hoax taking place on Facebook and Twitter. Someone had Photoshopped the display of the Delorian from Back to the Future II to read June 27th, 2012. Everyone, well everyone that didn’t know the movie well, posted away. All, wanting to know where there hover boards were. so why did this phenomenon take off
  2. it’s 2015
  3. We may not have flying cars
  4. but we do have hover boards. just ask justin bieber or wiz.
  5. and we have slightly better 3d graphics
  6. and thankfully we’ve all but killed off fax machines.
  7. and…
  8. So, how Did We Get Here? how did we get to the point where we can say css is amazing?
  9. One of the things that got us here was the wisdom of the csswg to make the css spec more modular. While trying to finish CSS 2.1, they realized that these big monolithic "versions" weren't any good. They were difficult to maintain, and slow to develop. So they decided to split up the CSS language into a bunch of independent modules.
  10. So, despite what you may have heard, there really is no such thing as css3 Each css module can now level up independently, and contains only a smallish set of features, so it's harder for a large set of features to be slowed down by a single stubborn feature. Some modules start out at level 3, if they extend something from CSS2.1. Others start out at level 1, if they're something new (for example, Flexbox).
  11. the end result of all of this modularization is that we’re now seeing css features come out at a record pace.
  12. but while they were coming out faster that before, most of them only focused on the visual aspects of css
  13. things like animation - transitions, transforms & keyframes
  14. typography - web fonts, hyphenation, etc
  15. new layout techniques like flexbox, columns, grids everyone knows the inherent problems with absolute pos and floats. some of the workarounds we used for years. these layout techniques are great and address a lot of those problems. and while all of these things helped to solve those existing problems. they didn’t get to the core of the problems with css.
  16. this is what you hear from a lot of developers.
  17. and it’s because CSS does have a lot of inherent problems still Cross-browser compatibility issues Vendor prefixes No variables No inline importing No nested selectors No functions/mixins No color manipulation No basic arithmetic
  18. Developers wanted these problems solved, but for a long time, the spec updates coming through were only addressing the visual front end. Developers wanted better authoring tools and realized they had to do it themselves. Enter preprocessors! People started to fill in those gaps themselves
  19. to help them do this they created things like sass that gave them many of these powers sass is probably the most popular of the bunch but there’s also
  20. also fairly popular, less does many of the same things as sass, just maybe with a little bit smaller user base
  21. and there’s also stylus - probably the least popular, but maybe the most powerful. adds additional things like built in globbing and some other things. popular with people who hate punctuation. :) preprocessors gave devs the authoring enhancements they craved- those things like variables, nesting, color functions, custom media queries
  22. The way all of these work is: A developer writes code using a preprocessor’s proprietary syntax. A task runner notices the code change and compiles the preprocessor code. Standards-based CSS is output by the task runner and fed to the browser.
  23. But preprocessors perpetuate a problem
  24. We’re putting more and more layers of abstraction between the code we write and the code the browser can read
  25. And that’s because preprocessors are their own programming languages when you really think about it. Not "real" code - a browser can never read sass Proprietary syntax Often written in “non-front-end" languages Not as easily extensible - Must be compiled, today and forever - sass will never natively run in a browser Compile times can be slow Browsers are catching up
  26. but well they had they issues, preprocessors did solve our problems. and as use of them surged, the w3c began to take notice. But they haven’t just adopted everything from Sass. They’ve taken more of an in with the good out with the bad type approach.
  27. And now we’re at a point where many of these authoring tools are in proposed or working draft stages in native css. Some have even made their way into browsers. That means that we’re at the beginning stages of being able to use these things in native css. Free from sass, less, or stylus
  28. things like variables
  29. color functions
  30. nesting
  31. custom media queries but all of these things are just proposed spec they aren’t approved and very few of them have landed in browsers. really only variables in firefox. so, what is the solution?
  32. Instead of using a preprocessor. We can use what’s been referred to as a postprocessor. Who here has heard of PostCSS or just the general concept of a postprocessor? now to be fair. things like PostCSS, which is the most popular, aren’t really postprocessors. That is, they don’t happen at runtime, so technically yes, postprocessors are still preprocessors.
  33. but there definitely are differences between something like postcss and sass If you remember — our preprocessor process: A developer writes code using a preprocessor’s proprietary syntax. A task runner notices the code change and compiles the preprocessor code. Standards-based CSS is output by the task runner and fed to the browser.
  34. with our post processor or transpiler, instead, our process looks like this: A developer writes code in standards based (even next-gen) CSS. A task runner notices the change and transpiles it into browser-friendly CSS. Standards-based CSS is output by the task runner and fed to the browser.
  35. PostCSS Advantages: Write your CSS using CSS. Use CSS3 with reckless abandon. Hell, use CSS4. Who cares if that's not actually a thing yet? Modular - only use what you need Works with your existing task runners - grunt, gulp, or probably even fly.js that I heard about all of 12 hours ago Faster compile times Built on Node! - which means No more Ruby dependencies! Easier to debug if you’re a js dev Countless plugins Can't find a plugin that does what you want? Write your own in nothing but JavaScript.
  36. There’s a good chance you’ve at least heard of or are already using part of the postCSS ecosystem. Autoprefixer - A popular replacement for Compass's vendor prefix mixins. You define which browsers you need to support Cross-references the caniuse database Automatically adds vendor prefixes to your CSS3 properties. No need to memorize special function names; just write CSS and let it do its work in the background.
  37. but autoprefixer is just one postcss plugin there are many many more. and you may notice that this list and the list of upcoming native css authoring tools is very similar.
  38. VARIABLES if you’re used to sass variables, the syntax may look a little different. but the basic concept is the same as a variable used in any other language.
  39. you define your variables with that dash dash you see there in root. and then call it with var()… is the syntax as clean as the $ sign in sass? arguably not, but you honestly get used to it very quickly, and…it is native spec, so you’re going to have to use it eventually
  40. one caveat, if you’re new to variables - make sure to use a naming system that makes sense you should know just from looking at your variable, what it represents. otherwise they lose most of their value.
  41. Color Module Level 4 - allow you to modify colors Use postcss-color. You may have done similar things in sass with saturation or lighten and darken functions. Essentially, color functions work like this:
  42. using tint as an example - what tint does is mix your base color with white. so if you have an element, say a link that’s blue and then you want to set a modifier of some sort off of your base color, you can do so right in your css. call the color in your color function, and pass in tint() plus the percentage of white you want to mix it with. so, essentially the amount you want to lighten it by and the result is what you see here.
  43. shade is more or less works the same as tint, only instead of mixing the base color with white it mixes it with black, darkening it.
  44. and tints and shades aren’t your only color options you can do things with alpha transparently, hsl, you can blend colors, and there’s even some new crazy stuff in the spec you can do like guarantee contrast.
  45. nested selectors - this IS in the spec…but only in authoring state…that is to say…not very far along at all
  46. the authoring state of the spec is proposed to work like this:
  47. red set of curly braces and you can use postcss-nesting if you want to use that spec style
  48. but there is also postcss plugin for sass style nesting if that’s what you’re used to and more comfortable with postcss-nested Just like Sass, remember to use them sparingly.
  49. custom media queries - let you set your media queries to variables
  50. custom media queries example easier to reference works well with “resize until it looks like shit - add a media query approach” estimate media queries and then adjust as you go also good for not having to remember the exact pixel dimensions you set your breakpoints at - you can just reference small, medium, large, etc
  51. One of the things not in the spec, at least yet, but that we weren’t willing to give up is the concept of partials and globbing And the good news is that if you can do it with sass, you can probably pretty easily do it with postcss. postcss-import allows you to do basic partials.
  52. and if you’re a fan of globbing…grunt-sass-globbing will still work for you in fact aaron has spent probably more time than necessary trying to convince the creator to drop sass from the name
  53. Mixins As a team, we’re honestly of the opinion that if you’ve got super complex mixins you’re probably over-engineering. But there are definitely use cases, so if you want mixins, which aren’t yet in the spec, you can use the postcss-mixins plugin.
  54. FRONT-END DEVELOPMENT IS AT A CROSSROADS. We're not that far away from next-gen CSS and JS being adopted into standards and supported natively in all modern browsers. Until that happens, it's a wonderful time to get as close to "real" code as you can in your development process.
  55. Let’s take a look back at our problems with CSS. Which ones have we solved? Really? Most of them!
  56. One day, hopefully, we really can get to a point where all of this is available in browsers natively. But even though that’s not yet the case, the specs are out there and they’re catching up.
  57. There’s no longer any reason to hide behind a language of abstraction. Let’s choose to work towards ONCE AGAIN getting as close as we can to REAL, POWERFUL, CSS.