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
Details on <details>
Search
Mu-An Chiou
July 19, 2018
Technology
410
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Details on <details>
https://gist.github.com/muan/adf26249c0adf018aea828105a5846eb
Mu-An Chiou
July 19, 2018
More Decks by Mu-An Chiou
See All by Mu-An Chiou
Publishing and Hosting on GitHub pages
muan
4
180
Having no patience(Japanese)
muan
1
410
JSDC
muan
2
570
Design with Code
muan
5
590
Having no patience
muan
1
330
Design in GitHub
muan
5
390
Project Lab Squirrel #2
muan
1
680
Project Lab Squirrel #1
muan
8
910
A girl with no patience
muan
18
2k
Other Decks in Technology
See All in Technology
tamachi.go 誕生の裏側
rymiyamoto
1
200
AI for Science時代を切り開く、政府の次世代HPC戦略の展望
gpuunite_official
0
190
AIに持続⼒を与える 判断の⻑期記憶設計
eiei114
1
590
NANDでも描画したい!
nichica906
2
460
猫付きpingコマンドを自作
uyuki234
0
290
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
ガバメント AI 源内を地方自治体は活用できるのか可能性と課題、期待について
takeda_h
2
460
生成 AI の基礎 〜 サンプル実装で学ぶ基本原理
enakai00
7
4.6k
FDEの心得
noriakioji
5
6.4k
LanceDB入門
mocobeta
9
660
[potatotips #96] Give Your AI Agent the Flutter Playbook
korodroid
0
130
形式手法特論:Hyperproperty とモデル検査 #kernelvm / Kernel VM Study Tokyo 19th
ytaka23
0
580
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
800
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
410
It's Worth the Effort
3n
188
29k
Six Lessons from altMBA
skipperchong
29
4.5k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
470
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
550
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
360
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
900
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Designing Experiences People Love
moore
143
24k
Transcript
Greet(‘Brooklyn JS’)
Who this Mu-An Chiou Web Systems Engineer @ GitHub Taiwan
#1 GitHub @muan / Twitter @muanchiou
Details on <details> The best element in HTML 5. Do
@ me.
https://www.chromestatus.com/metrics/feature/timeline/popularity/480
What
What <details> <summary>Details</summary> <p>content</p> </details>
What <details> <summary>Details</summary> <p>content</p> </details>
What <details> <summary>Details</summary> <p>content</p> </details>
What <details open> <summary>Details</summary> <p>content</p> </details>
What details.open = true/false
What details.addEventListener(‘toggle’, () => {})
Why not this el.addEventListener('click', e => { const thing =
document.querySelector(‘.thing’) thing.style.display = ‘none’ })
Or this input:check + * { display: block; }
Here’s why Semantic
Here’s why Accessible
Here’s why No JavaScript
Here’s why = Interactive on load
When
When Accordions Popovers Dropdowns …
The beginning ! IE 11
Dropdown menu <div class=“dropdown js-menu-container”> <button class=“btn js-menu-target” aria-haspopup=“menu”>…</button> <ul
class=“dropdown-content js-menu-content”> <li><a href=“/muan">profile</a></li> … </ul> </div>
Dropdown menu <details class=“dropdown”> <summary class=“btn” aria-haspopup=“menu”>…</summary> <ul class=“dropdown-content”> <li><a
href=“/muan">profile</a></li> … </ul> </details>
Dropdown menu
Dropdown menu CSS: summary::before
Dropdown menu CSS: summary::before + JS: [esc] to close
Build status
Emoji reactions
Also Dialogs!
None
<details> <summary aria-haspopup=“dialog”>…</summary> <details-dialog> … </details-dialog> </details> <details-dialog>
<details-dialog> Focus management Tab trapping Accessibility enhancements Sorry <dialog>
<details> <summary aria-haspopup=“menu”>…</summary> <details-menu> … </details-menu> </details> <details-menu>
EXCITED? Let’s talk browser support —
Browser support Desktop 86% / Mobile 95% http://caniuse.com/#search=details
Polyfill javan/details-element-polyfill
CSS Helpers primer-utilities @ npm
<3 HTML
</details> GitHub @muan / Twitter @muanchiou Definitely the best element
in HTML 5.