Search
More Details on `details`
15.9.2022
A lot of chatter around the ol’ <details> and <summary> elements lately! I saw Lea Verou recently tweet an observation about the element’s display behavior and that sorta splintered into more observations and usage notes from folks, including a revived …
More...
Spicy Sections
7.12.2021
What if HTML had “tabs”? That would be cool, says I. Dave has been spending some of his time and energy, along with a group of “Tabvengers” from OpenUI, on this. A lot of research leads to a bit …
Shadow Roots and Inheritance
16.9.2021
There is a helluva gotcha with styling a <details> element, as documented here by Kitty Guiraudel. It’s obscure enough that you might never run into it, but if you do, I could see it being very confusing (it would confuse …
The post Shadow Roots and Inheritance appeared first...
How to Play and Pause CSS Animations with CSS Custom Properties
21.1.2021
Let’s have a look CSS @keyframes animations, and specifically about how you can pause and otherwise control them. There is a CSS property specifically for it, that can be controlled with JavaScript, but there is plenty of nuance to get …
The post How to Play and Pause CSS Animations with...
Two Issues Styling the Details Element and How to Solve Them
13.1.2021
In the not-too-distant past, even basic accordion-like interactions required JavaScript event listeners or some CSS… trickery. And, depending on the solution used, editing the underlying HTML could get complicated.
Now, the <details> and <summary> elements (which combine to form...
A (terrible?) way to do footnotes in HTML
13.1.2021
Terence Eden poked around with a way to do footnotes using the <details>/<summary> elements. I think it’s kind of clever. Rather than a hyperlink that jumps down to explain the footnote elsewhere, the details are right there next …
The post A (terrible?) way to...
Exploring What the Details and Summary Elements Can Do
26.11.2020
We’ve mentioned before just how great the <details> and <summary> elements are. They’re great for quickly making accordions that are accessible to touch, mouse, and keyboard input:
CodePen Embed Fallback
<details> and <summary> can even be used to play/pause gifs!...
How to Animate the Details Element Using WAAPI
5.11.2020
Animating accordions in JavaScript has been one of the most asked animations on websites. Fun fact: jQuery’s slideDown() function was already available in the first version in 2011.
In this article, we will see how you can animate the native <details> element using the Web Animations...
Pausing a GIF with details/summary
22.7.2020
Steve Faulkner has a clever idea here. You can show an (animated) GIF and overlay a pause/play button on top of it — which is really a <details>/<summary> element. When toggled, a (non-animated) JPG inside covers the GIF, effectively “pausing” it.
Adrian Roselli calls...
Using <details> for Menus and Dialogs is an Interesting Idea
21.3.2019
One of the most empowering things you can learn as a new front-end developer who is starting to learn JavaScript is to change classes. If you can change classes, you can use your CSS skills to control a lot on a page. Toggle a class to one thing, style it this way, toggle to another class...