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
Andres Galante
September 26, 2016
Technology
58
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
300
How to use CSS to make your App look amazing and be accessible on any device
andresgalante
0
80
Open source - JUG BA
andresgalante
0
82
Open source - QCon19
andresgalante
0
120
CSS - Media queries o tamanho não importa
andresgalante
0
100
Cosmos
andresgalante
0
120
PatternFly 4 variable system
andresgalante
0
110
Open source
andresgalante
3
99
Other Decks in Technology
See All in Technology
AgentGatewayを試してみたかった
tkikuchi
0
120
BigQuery の Cross-cloud Lakehouse への歩み
phaya72
2
600
【Gen-AX】20260530開催_JJUG CCC 2026 Spring
genax
0
440
「速く作る」から「正しく作る」へ ─ 生成AI時代の開発フロー改革の ロードマップと実行 ─
starfish719
0
8.8k
ChatworkとBPaaS 異なる特性で学んだAI機能開発の ベストプラクティス
kubell_hr
2
3.1k
やさしいA2A入門
minorun365
PRO
7
420
DevOps Agentで始めるAWS運用 〜フロンティアエージェントが変える運用の現場〜
nyankotaro
1
320
ABEMA の Datadog × OTel 基盤、 中から見るか? 外から見るか?
tetsuya28
0
110
「気づいたら仕事が終わっている」バクラクAIエージェント本番運用の裏側 / layerx-bakuraku-aie2026
yuya4
19
11k
AI活用を推進するために ファインディが下した、一つの小さな決断
starfish719
0
270
AI フレンドリーなエラー監視を TypeScript で実現する
shinyaigeek
2
270
EventBridge Connection
_kensh
5
660
Featured
See All Featured
For a Future-Friendly Web
brad_frost
183
10k
Navigating Team Friction
lara
192
16k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Crafting Experiences
bethany
1
170
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Chasing Engaging Ingredients in Design
codingconduct
0
210
4 Signs Your Business is Dying
shpigford
187
22k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Claude Code のすすめ
schroneko
67
230k
The Cost Of JavaScript in 2023
addyosmani
55
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 :)