Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Styling the Shadow Dom
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Andres Galante
September 26, 2016
Technology
0
54
Styling the Shadow Dom
Tiangle JS meetup talk about how to style the shadow DOM
Andres Galante
September 26, 2016
Tweet
Share
More Decks by Andres Galante
See All by Andres Galante
Make Something Great! Become an Open Source Contributor
andresgalante
0
210
Make Something Great: Become an Open Source Contributor
andresgalante
0
290
How to use CSS to make your App look amazing and be accessible on any device
andresgalante
0
72
Open source - JUG BA
andresgalante
0
75
Open source - QCon19
andresgalante
0
110
CSS - Media queries o tamanho não importa
andresgalante
0
86
Cosmos
andresgalante
0
110
PatternFly 4 variable system
andresgalante
0
110
Open source
andresgalante
3
89
Other Decks in Technology
See All in Technology
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
73k
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
110
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
41k
re:Inventで出たインフラエンジニアが嬉しかったアップデート
nagisa53
4
230
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
IaaS/SaaS管理における SREの実践 - SRE Kaigi 2026
bbqallstars
4
1.2k
2人で作ったAIダッシュボードが、開発組織の次の一手を照らした話― Cursor × SpecKit × 可視化の実践 ― Qiita AI Summit
noalisaai
1
340
Azure SRE Agent x PagerDutyによる近未来インシデント対応への期待 / The Future of Incident Response: Azure SRE Agent x PagerDuty
aeonpeople
0
270
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
160
Mosaic AI Gatewayでコーディングエージェントを配るための運用Tips / JEDAI 2026 新春 Meetup! AIコーディング特集
genda
0
140
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
4
1.8k
ゼロから始めたFindy初のモバイルアプリ開発
grandbig
2
610
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Building the Perfect Custom Keyboard
takai
2
680
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
A Soul's Torment
seathinner
5
2.2k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
230
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
WENDY [Excerpt]
tessaabrams
9
36k
Making Projects Easy
brettharned
120
6.6k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
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 :)