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
10分で理解する HTML Modules
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
takanorip
November 19, 2020
Technology
1.3k
1
Share
10分で理解する HTML Modules
takanorip
November 19, 2020
More Decks by takanorip
See All by takanorip
「見せる」登壇資料デザインの極意
takanorip
3
730
Design System Documentation Tooling 2025
takanorip
3
2.5k
デザインエンジニアの延長にデザインマネージャーとしての可能性を探る
takanorip
1
1k
Tools for Design Engineers other than LLM in the LLM era
takanorip
1
710
Bulletproof Design System with TypeScript
takanorip
7
4.9k
Eleventy3.0 で始める爆速個人ブログ開発!
takanorip
0
270
Webフォント選定の極意!フォントの基本から最新トレンドまで徹底解説
takanorip
6
1k
効果的な管理画面を デザインをするために 避けるべき5つの罠
takanorip
15
7.8k
社内管理画面のデザインもプロダクトデザイン
takanorip
5
2.2k
Other Decks in Technology
See All in Technology
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.2k
CloudSec JP #005 後締め ~ソフトウェアサプライチェーン攻撃から開発者のシークレットを守る~
lhazy
0
120
Eight Engineering Unit 紹介資料
sansan33
PRO
3
7.2k
試されDATA SAPPORO [LT]Claude Codeで「ゆっくりデータ分析」
ishikawa_satoru
0
360
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
組織的なAI活用を阻む 最大のハードルは コンテキストデザインだった
ixbox
6
1.6k
Master Dataグループ紹介資料
sansan33
PRO
1
4.6k
シン・リスコフの置換原則 〜現代風に考えるSOLIDの原則〜
jinwatanabe
0
180
ASTのGitHub CopilotとCopilot CLIの現在地をお話しします/How AST Operates GitHub Copilot and Copilot CLI
aeonpeople
1
220
Data Hubグループ 紹介資料
sansan33
PRO
0
2.9k
さくらのAI Engineから始める クラウドネイティブ意識
melonps
0
140
Bluesky Meetup in Tokyo vol.4 - 2023to2026
shinoharata
0
150
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
210
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
350
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Designing for humans not robots
tammielis
254
26k
The Curse of the Amulet
leimatthew05
1
11k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
870
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Odyssey Design
rkendrick25
PRO
2
570
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
300
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
290
Navigating Team Friction
lara
192
16k
Transcript
10分で理解する HTML Modules Takanori Oki / 20201119 / 隅田川.js
自己紹介 • Takanori Oki / @takanorip / @takanoripe(Twitter) • UIデザイナー、フロントエンドエンジニア
• Web Platform Study GroupのOrganizer • https://www.youtube.com/channel/UCfToJ- sTOqvBnnuVq3zdZhA • 月1回くらいYouTubeでライブ配信してます • Web標準やブラウザ実装についての話を中心に話してます
HTML Imports
HTML Imports(Abandoned) • CustomElementsを外部からインポートする機能 • Chromeに先行実装されてたが様々な課題があり、開発が停止 • Global object pollution
• Parse blocking with inline script • Independent dependency resolution infrastructures between HTML Imports and ES6 Script Modules • Non-intuitive import pass through
HTML Modules
HTML Modules • https://github.com/WICG/webcomponents/issues/645 • ES Modulesの仕組みに乗っかってHTML、CSS、JSONをJavaScript ファイルの中にインポートしようという仕組み • セキュリティ課題が見つかり開発が進んでいなかったが、TC39で
提案されているImport Assertionsが実装されれば解決されそう • https://github.com/tc39/proposal-import-assertions
Import Assertions
Import Assertions • Import文にインライン構文を追加し、ファイルの情報を補足する • ファイル拡張子とHTTP Content Typeヘッダがミスマッチなことが 多いため、拡張子からモジュールタイプを判断することが難しい
CSS Modules • ES Modulesを拡張して、CSSファイルからCSSStyleSheetをインポート できるようにする仕様 • CSSStyleSheetはadoptedStyleSheetsを介してdocumentまたは shadowRootに追加できる •
https://wicg.github.io/construct-stylesheets/#using- constructed-stylesheets • 最近LitElementでこのCSS Modulesに対応するための変更があった
CSS Modules
まとめ • HTML ModulesはJavaScriptの中でHTMLをモジュールとして 扱うための技術 • CSSやJSONもモジュールとして扱えるようになるかも • CSS in
JSがこのCSS Modulesをベースに作り変えられるかも? • 今後の動向に注目!
Thank you!