Alex Riviere
Senior Front End Developer
Hygiena
WHATWG began Drafting in 2004
W3C Recommended Status October 2014
HTML Living Standard moved to WHATWG Control in 2019
<details>
/<summary>
Elements<dialog>
Elementinert
attributeattr()
<select>
ElementsDetails Element
Summary Element
open Attribute
Accordion Example
Accordion example with name attribute
Style the new ::details-content (Author: Adam Argyle)
Basic Dialog
Basic Dialog with JS
Basic Dialog with showModal
Basic Dialog with showModal and close form
inert
attributeinert demo
click
event from being fired when the user clicks on the element.focus
event from being raised by preventing the element from gaining focus.user-select
to disable text selection.Do NOT use inert
unless you are sure.
Forms, Inputs, Buttons, Selects should use disabled
rather than inert
to make them not useable.
Ideally, you should never need to use inert.
Basic Popover
Manual Popover Options
Basic Popover
Popover with Anchor Positioning
Basic Dialog with showModal and close form
Basic Dialog with popover
Basic Dialog with Invoker Command
attr()
Basic attr() usage
Advanced attr() usage
Basic Custom Element Example
Delayed Custom Element Example
Delayed Custom Element Example with Declartive ShadowDOM
Custom Declartive ShadowDOM with default fallback
Please Don't Do This
A Basic Select with some style
appearance: base-select
::picker(select)
<selectedcontent>
Alex Riviere
CodePens: