The Future of CSS With
Web Components
SETH ENGEN
‣Computer Know How
‣18 years developing
‣User interface
Who Am I?
Instead Of This…
<style>
#map-canvas {
width: 500px;
height: 400px;
}
</style>
<script src="https://maps.googleapis.com/maps/api/js"></script>
<script>
function initialize() {
var mapCanvas = document.getElementById('map-canvas');
var mapOptions = {
center: new google.maps.LatLng(44.5403, -78.5463),
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(mapCanvas, mapOptions)
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
We Had This…
<!-- Import element -->
<link rel="import" href="google-map.html">
<!-- Use element -->
<google-map latitude="44.852883"
longitude="-93.242410">
</google-map>
‣Bootstrap, Foundation, JQueryUI
‣HTML + CSS + JavaScript
How We Do It Now…
“Frontend Paralysis”
–Rob Dodson (Google)
‣Templates
‣Shadow DOM
‣Custom Elements
‣HTML Imports
Web Components
Templates
“They're a place to put a big wad of
HTML that you don't want the browser
to mess with at all...for any reason.”
Rafael Weinstein (spec author)
‣ Working w/ DOM

‣ Parsed; not rendered
‣ Hidden from document
Templates
document.querySelector(‘template h1') == null;
<template>
<h1>Template Awesomeness!</h1>
</template>
Shadow DOM
‣Subtree of DOM nodes
‣Create on any HTML element
‣Provides encapsulation
Shadow DOM
‣Shadow Host
‣Shadow Boundary
‣Shadow Root
‣Shadow Tree
‣Light DOM
Shadow Tree
Shadow DOM Shadow
Host
Shadow
Root Child
Shadow
Root Child
Shadows = false
Dev Tools Settings
Shadows = true
Shadows Up Close
Shadow DOM w/ JS
[DEMO]
Insertions Points
<content></content>
<content select='.first'></content>
Insertions Points
[DEMO]
Custom Elements
Custom Elements
<name-tag>Seth</name-tag>
[DEMO]
Custom Elements
HTML Imports
‣ Before
‣ After
HTML Imports
<link rel="import" href="bootstrap.html">
<link rel="stylesheet" href="bootstrap.css">
<link rel="stylesheet" href="fonts.css">
<script src="jquery.js"></script>
<script src="bootstrap.js"></script>
<script src="bootstrap-tooltip.js"></script>
<script src="bootstrap-dropdown.js"></script>
[DEMO]
HTML Imports
Styling
Shadow Boundary
CSS
Shadow Boundary
Shadow
Boundary
CSS
‣ Scoping
‣ Host
‣ Host (based on context)
‣ Piercing The Shadow Boundary
Styling
{CSS}
[DEMO]
Styling
{CSS}
Styling: Host Context
<style>
:host-context(.theme1) {
...
}
:host-context(.theme2) {
...
}
</style>
<body class="theme1">
...
</body>
‣ Shadow Piercing

Descendent Combinator (>>>)
Styling: Piercing
<style>
/* >>> was /deep/ */
video >>> input[type="range"] {
background: hotpink;
}
</style>
Browser Support
Chrome Firefox IE 10+ Safari 8+
Chrome
(Android)
Safari

(IOS)
Template YES YES NO YES YES YES
HTML
Imports
YES Flag NO NO YES NO
Custom
Elements
YES Flag NO NO YES NO
Shadow
DOM
 YES Flag NO NO YES NO
‣ jonrimmer.github.io/are-we-componentized-yet
‣ caniuse.com
webcomponents.org
‣ platform.js — webcomponents.js
‣ bower install webcomponentsjs
‣ npm install webcomponents.js
‣ github.com/webcomponents/webcomponentsjs
Polyfill
Browser Support
Chrome Firefox IE 10+ Safari 8+
Chrome
(Android)
Safari

(IOS)
Template YES YES YES YES YES YES
HTML
Imports
YES YES YES YES YES YES
Custom
Elements
YES YES YES YES YES YES
Shadow
DOM
 YES YES YES YES YES YES
w/ Polyfill
‣ Polymer by Google
‣ X-Tags by Mozilla
Polyfill Libraries
Polymer Elements
‣ polymer-project.org/docs/elements
‣ <core-*>
‣ <paper-*>
builtwithpolymer.org
Polymer Designer
Mozilla Brick (Elements)
‣ brick.mozilla.io
‣ <brick-*>
‣ customelements.io
‣ component.kitchen
More Web Components
‣ googlewebcomponents.github.io
Google Web Components
Thank you

More Related Content

PDF
Our application got popular and now it breaks
PDF
Web Components + Backbone: a Game-Changing Combination
PDF
A brave new web - A talk about Web Components
PDF
The Complementarity of React and Web Components
PDF
Nuxt.JS Introdruction
PDF
Webpack packing it all
PDF
Instant and offline apps with Service Worker
PDF
Web Components & Polymer 1.0 (Webinale Berlin)
Our application got popular and now it breaks
Web Components + Backbone: a Game-Changing Combination
A brave new web - A talk about Web Components
The Complementarity of React and Web Components
Nuxt.JS Introdruction
Webpack packing it all
Instant and offline apps with Service Worker
Web Components & Polymer 1.0 (Webinale Berlin)

What's hot (20)

PDF
Polymer vs other libraries (Devfest Ukraine 2015)
PPTX
Google Polymer Introduction
PPTX
Harness jQuery Templates and Data Link
PDF
Unobtrusive JavaScript
PDF
Enjoy the vue.js
PDF
Chrome enchanted 2015
KEY
Rapid Testing, Rapid Development
PDF
Drupal point of vue
PDF
Levent-Gurses' Introduction to Web Components & Polymer
PDF
Web Components
PDF
Solution to capture webpage screenshot with html2 canvas.js for backend devel...
PDF
jQuery UI and Plugins
PDF
Unlock the next era of UI design with Polymer
PDF
Service worker - Offline Web
PDF
Polymer, A Web Component Polyfill Library
PPTX
Introduction à AngularJS
PDF
Polymer
PPTX
Single Page Apps with Drupal 8
PDF
Node.js & Twitter Bootstrap Crash Course
PDF
Google Polymer Framework
Polymer vs other libraries (Devfest Ukraine 2015)
Google Polymer Introduction
Harness jQuery Templates and Data Link
Unobtrusive JavaScript
Enjoy the vue.js
Chrome enchanted 2015
Rapid Testing, Rapid Development
Drupal point of vue
Levent-Gurses' Introduction to Web Components & Polymer
Web Components
Solution to capture webpage screenshot with html2 canvas.js for backend devel...
jQuery UI and Plugins
Unlock the next era of UI design with Polymer
Service worker - Offline Web
Polymer, A Web Component Polyfill Library
Introduction à AngularJS
Polymer
Single Page Apps with Drupal 8
Node.js & Twitter Bootstrap Crash Course
Google Polymer Framework
Ad

Viewers also liked (20)

PDF
Realtime with-websockets-2015
PDF
Test box bdd
PDF
Refactor Large applications with Backbone
PPTX
ColdFusion builder 3 making the awesome
PDF
Software craftsmanship
PDF
Dev objective2015 lets git together
PDF
Expand Your ColdFusion App Power with AWS
PPTX
Accelerate your ColdFusion Applications using Caching
PDF
Language enhancements in cold fusion 11
PDF
Top5 scalabilityissues
PPTX
Sql killedserver
PDF
Accessible Video Anywhere with ColdFusion an AWS
PDF
Hidden gems in cf2016
PDF
Garbage First & You
PDF
Dependency injectionpreso
PDF
Getting started with mobile application development
PDF
Keep Applications Online
PDF
Multiply like rabbits with rabbit mq
PDF
Java scriptconfusingbits
PDF
Get Gulping with Javascript Task Runners
Realtime with-websockets-2015
Test box bdd
Refactor Large applications with Backbone
ColdFusion builder 3 making the awesome
Software craftsmanship
Dev objective2015 lets git together
Expand Your ColdFusion App Power with AWS
Accelerate your ColdFusion Applications using Caching
Language enhancements in cold fusion 11
Top5 scalabilityissues
Sql killedserver
Accessible Video Anywhere with ColdFusion an AWS
Hidden gems in cf2016
Garbage First & You
Dependency injectionpreso
Getting started with mobile application development
Keep Applications Online
Multiply like rabbits with rabbit mq
Java scriptconfusingbits
Get Gulping with Javascript Task Runners
Ad

Similar to The Future of CSS with Web Components (20)

KEY
HTML5, CSS3, and other fancy buzzwords
PDF
Devoxx France - Web Components, Polymer et Material Design
PDF
Modernizr - Detecting HTML5 and CSS3 support
DOCX
gbar.jpgglogo.jpgmaa.jpgmaah5txt.css New Pe.docx
DOCX
Twanda.Malcolm12-6-16back.jpgTwanda.Malcolm12-6-16barchart.docx
PDF
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
DOCX
jpf.jpgmodernizr-1.5.js! Modernizr JavaScript libra.docx
PDF
Browsers with Wings
DOCX
modernizr-1.5.js! Modernizr JavaScript library 1.5 .docx
DOCX
! Modernizr v2.0.6 httpwww.modernizr.com Copyri.docx
PDF
Everything is Awesome - Cutting the Corners off the Web
PDF
Practical HTML5: Using It Today
PDF
Introduccion a HTML5
PDF
PDF
HTML5 after the hype - JFokus2015
PDF
Refresh Tallahassee: The RE/MAX Front End Story
KEY
Sass Essentials at Mobile Camp LA
PPTX
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
PDF
HTML 5 - Overview
PDF
2014 03-25 - GDG Nantes - Web Components avec Polymer
HTML5, CSS3, and other fancy buzzwords
Devoxx France - Web Components, Polymer et Material Design
Modernizr - Detecting HTML5 and CSS3 support
gbar.jpgglogo.jpgmaa.jpgmaah5txt.css New Pe.docx
Twanda.Malcolm12-6-16back.jpgTwanda.Malcolm12-6-16barchart.docx
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
jpf.jpgmodernizr-1.5.js! Modernizr JavaScript libra.docx
Browsers with Wings
modernizr-1.5.js! Modernizr JavaScript library 1.5 .docx
! Modernizr v2.0.6 httpwww.modernizr.com Copyri.docx
Everything is Awesome - Cutting the Corners off the Web
Practical HTML5: Using It Today
Introduccion a HTML5
HTML5 after the hype - JFokus2015
Refresh Tallahassee: The RE/MAX Front End Story
Sass Essentials at Mobile Camp LA
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
HTML 5 - Overview
2014 03-25 - GDG Nantes - Web Components avec Polymer

More from ColdFusionConference (20)

PDF
Api manager preconference
PDF
PDF
Building better SQL Server Databases
PDF
API Economy, Realizing the Business Value of APIs
PDF
Don't just pdf, Smart PDF
PDF
Crafting ColdFusion Applications like an Architect
PDF
Security And Access Control For APIS using CF API Manager
PDF
Monetizing Business Models: ColdFusion and APIS
PDF
Become a Security Rockstar with ColdFusion 2016
PDF
ColdFusion in Transit action
PDF
Developer Insights for Application Upgrade to ColdFusion 2016
PDF
Where is cold fusion headed
PDF
ColdFusion Keynote: Building the Agile Web Since 1995
PDF
Instant ColdFusion with Vagrant
PPT
Restful services with ColdFusion
PDF
Super Fast Application development with Mura CMS
PDF
Build your own secure and real-time dashboard for mobile and web
PDF
Why Everyone else writes bad code
PDF
Securing applications
PDF
Testing automaton
Api manager preconference
Building better SQL Server Databases
API Economy, Realizing the Business Value of APIs
Don't just pdf, Smart PDF
Crafting ColdFusion Applications like an Architect
Security And Access Control For APIS using CF API Manager
Monetizing Business Models: ColdFusion and APIS
Become a Security Rockstar with ColdFusion 2016
ColdFusion in Transit action
Developer Insights for Application Upgrade to ColdFusion 2016
Where is cold fusion headed
ColdFusion Keynote: Building the Agile Web Since 1995
Instant ColdFusion with Vagrant
Restful services with ColdFusion
Super Fast Application development with Mura CMS
Build your own secure and real-time dashboard for mobile and web
Why Everyone else writes bad code
Securing applications
Testing automaton

Recently uploaded (20)

PPTX
Module 1 Introduction to Web Programming .pptx
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PPTX
Internet of Everything -Basic concepts details
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
Statistics on Ai - sourced from AIPRM.pdf
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PPTX
Build Your First AI Agent with UiPath.pptx
Module 1 Introduction to Web Programming .pptx
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Rapid Prototyping: A lecture on prototyping techniques for interface design
Internet of Everything -Basic concepts details
Taming the Chaos: How to Turn Unstructured Data into Decisions
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Statistics on Ai - sourced from AIPRM.pdf
Improvisation in detection of pomegranate leaf disease using transfer learni...
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Enhancing plagiarism detection using data pre-processing and machine learning...
Comparative analysis of machine learning models for fake news detection in so...
Flame analysis and combustion estimation using large language and vision assi...
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
giants, standing on the shoulders of - by Daniel Stenberg
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
Co-training pseudo-labeling for text classification with support vector machi...
Build Your First AI Agent with UiPath.pptx

The Future of CSS with Web Components