Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Styling the Shadow Dom
Search
Andres Galante
September 26, 2016
Technology
61
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Styling the Shadow Dom
Tiangle JS meetup talk about how to style the shadow DOM
Andres Galante
September 26, 2016
More Decks by Andres Galante
See All by Andres Galante
Make Something Great! Become an Open Source Contributor
andresgalante
0
230
Make Something Great: Become an Open Source Contributor
andresgalante
0
310
How to use CSS to make your App look amazing and be accessible on any device
andresgalante
0
89
Open source - JUG BA
andresgalante
0
84
Open source - QCon19
andresgalante
0
120
CSS - Media queries o tamanho não importa
andresgalante
0
110
Cosmos
andresgalante
0
130
PatternFly 4 variable system
andresgalante
0
120
Open source
andresgalante
3
110
Other Decks in Technology
See All in Technology
『SAR衛星データ解析入門』のご紹介とその応用
syuchimu
0
120
事業成長とデータ活用を止めないためのマネジメントへ挑戦
hiracky16
0
390
OptunaHub: ブラックボックス最適化のためのプラットフォーム
pfn
PRO
0
140
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
250
hackers_champloo_2026_tidb
makocchi
0
160
UniFi(ユニファイ)AIカメラの現場活用
ludicmind
1
440
Running Kotlin + Quarkus with Lambda
nealle
1
3.7k
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
130
AIカンパニーへの転換を支えた、エンジニアの仕事の再定義
kworkdev
PRO
2
1.2k
TinyGoでオブザーバビリティ?OpenTelemetryはTinyGoで使えるのか / Is OpenTelemetry available in TinyGo environment?
ymotongpoo
2
140
しろおびから始める!ログ活用の第一歩
shumei_ito
0
950
How to Design Configuration for Rails Applications
willnet
1
770
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
Code Review Best Practice
trishagee
74
20k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
The Cult of Friendly URLs
andyhume
79
7k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
Chasing Engaging Ingredients in Design
codingconduct
0
360
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.4k
Building an army of robots
kneath
307
47k
Navigating Team Friction
lara
192
16k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Abbi's Birthday
coloredviolet
4
10k
Transcript
@andresgalante Shadow Dom
None
Shadow Dom
Heads Up
1. Never trust an Argentinean designer writing code.
1. Never trust an Argentinean designer writing code.
2. I am a Shadow Dom rookie
Shadow Dom
Custom elements + Shadow DOM = Self contained HTML, CSS
and JS
None
None
CSS
The Shadow DOM
The ShadowRoot A shadow root is a document fragment that
gets attached to a “host” element.
Light DOM + Shadow DOM = Composed DOM
<slot> Placeholders inside your component that users can fill with
their own markup.
How to style the ShadowDOM
None
None
None
None
None
CSS selectors from the outer page don’t apply inside your
component. Styles defined inside don’t bleed out. They’re scoped to the host element.
:host(<selector>) selector Allows you to target the host if it
matches a <selector>.
::host-context(<selector>) selector Matches the component if it or any of
its ancestors matches <selector>.
:slotted(<compound-selector>) selector Matches nodes that are distributed into a <slot>
Styling a component from the outside.
Style hooks using CSS custom properties CSS variables and mixins
Access Card Demo Putting everything together
None
Can we use it?
maybe
Thanks :)