$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Styling the Shadow Dom
Search
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
67
Open source - JUG BA
andresgalante
0
70
Open source - QCon19
andresgalante
0
100
CSS - Media queries o tamanho não importa
andresgalante
0
82
Cosmos
andresgalante
0
110
PatternFly 4 variable system
andresgalante
0
100
Open source
andresgalante
3
87
Other Decks in Technology
See All in Technology
エンジニアリングをやめたくないので問い続ける
estie
2
1.2k
「図面」から「法則」へ 〜メタ視点で読み解く現代のソフトウェアアーキテクチャ〜
scova0731
0
420
ハッカソンから社内プロダクトへ AIエージェント「ko☆shi」開発で学んだ4つの重要要素
sonoda_mj
6
910
Jakarta Agentic AI Specification - Status and Future
reza_rahman
0
120
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
文字列の並び順 / Unicode Collation
tmtms
3
620
Amazon Connect アップデート! AIエージェントにMCPツールを設定してみた!
ysuzuki
0
110
Bedrock AgentCore Memoryの新機能 (Episode) を試してみた / try Bedrock AgentCore Memory Episodic functionarity
hoshi7_n
2
1k
2025-12-18_AI駆動開発推進プロジェクト運営について / AIDD-Promotion project management
yayoi_dd
0
140
プロンプトやエージェントを自動的に作る方法
shibuiwilliam
15
15k
Microsoft Agent 365 についてゆっくりじっくり理解する!
skmkzyk
0
410
AI-DLCを現場にインストールしてみた:プロトタイプ開発で分かったこと・やめたこと
recruitengineers
PRO
2
190
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
30
How to make the Groovebox
asonas
2
1.8k
The Spectacular Lies of Maps
axbom
PRO
1
390
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.4k
Navigating Team Friction
lara
191
16k
Embracing the Ebb and Flow
colly
88
4.9k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
23
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
63
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.4k
Un-Boring Meetings
codingconduct
0
160
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
170
BBQ
matthewcrist
89
9.9k
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 :)