{"id":332415,"date":"2021-01-11T16:18:11","date_gmt":"2021-01-12T00:18:11","guid":{"rendered":"https:\/\/css-tricks.com\/?p=332415"},"modified":"2021-01-11T17:18:52","modified_gmt":"2021-01-12T01:18:52","slug":"careful-when-changing-the-display-of-summary","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/careful-when-changing-the-display-of-summary\/","title":{"rendered":"Careful When Changing the Display of `summary`"},"content":{"rendered":"\n

I got a very helpful bug report the other day (thanks Kilian<\/a>!) about the <details><\/code> element in a blog post<\/a> of mine not showing the default ▶ icon, and thus looking rather like any ol’ random <p><\/code>.<\/p>\n\n\n\n\n\n\n\n

\"\"<\/figure>\n\n\n\n

It wasn’t terribly hard to diagnose. I just opened the page in Firefox, inspected the element in Firefox DevTools, and played with properties and values until I saw the ▶ come back. The problem? I was using a (very old) copy of Normalize.css<\/a>, which must have followed me through several redesigns on this site, and set…<\/p>\n\n\n\n

summary {\n  display: block; \/* the problem *\/\n}<\/code><\/pre>\n\n\n\n

If you do that, Firefox nukes the ▶:<\/p>\n\n\n\n

\n

Careful not to `display: block` your <summary> elements, lest lose the \u25b6 in Firefox. My old copy of Normalize.css had that in there. pic.twitter.com\/06KHY892dT<\/a><\/p>— Chris Coyier (@chriscoyier) January 6, 2021<\/a><\/blockquote>