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
59
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
220
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
行動するAIのためのオントロジー | DevRev — Encraft #26.pdf
dvrv_tknrszk
1
510
AIに会社の文脈を理解させる技術~上流工程・非エンジニアにも広げるハーネスエンジニアリング実践~
ochtum
0
150
プラットフォームを「作る」、 チームに「入り込む」
sansantech
PRO
0
280
メルカリにおけるAI時代の高速プロトタイピング基盤「Arca」
ryotarai
16
12k
EventBridge に「合流」はない ― サーバーレスのワークフローを育てるということ / No Join in EventBridge
yusukeshimizu
2
590
ADKで始める業務改善 - AIエージェント開発時の考えと設計
harappa80
2
300
エージェントはローカル、検証はMicroVM — Lambda MicroVMsでつくるServerless CI
fujioka6789
3
850
Making AI Agents Safe and Fast- Jev, Obsidian, and the Meta-Harness
x5gtrn
PRO
0
160
AIに賢く動いてもらうためのコンテキスト〜Snowflake女子会 vol.8
snowwmn0824
0
190
AIは推し活である。
kurazuuuuuu
2
990
Kiro Meetup #8 Kiro アップデート (2026/3/21〜2026/9/24)
katzueno
1
290
Snowflake Horizon Catalog と Apache Iceberg で作る オープンなデータ基盤
kitagawaz
0
260
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
6.3k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
The browser strikes back
jonoalderson
0
1.7k
KATA
mclloyd
PRO
35
16k
Abbi's Birthday
coloredviolet
4
10k
Bash Introduction
62gerente
615
220k
We Have a Design System, Now What?
morganepeng
55
8.3k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Faster Mobile Websites
deanohume
310
32k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
560
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
270
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 :)