2

I'd like to change the icon with CSS for this snippet of HTML5:

<details>
  <summary>Hello</summary>
  <p>The details</p>
</details>

Any clues?

Toto
  • 89,455
  • 62
  • 89
  • 125
Aslak Hellesøy
  • 1,191
  • 6
  • 9

1 Answers1

2

On WebKit browsers you could do:

summary::-webkit-details-marker {display: none}

summary:before {content: ""}
details[open] summary:before {content: ""}
Knu
  • 14,806
  • 5
  • 56
  • 89
  • [Seems like](http://jsfiddle.net/m47yd/1/) only the first line is necessary, at least in Chrome 16. That's the only browser I see the generated content in, however. I've never even heard of this element until just now though, so future browsers might need the rest :) EDIT: Oh right, to override the icon you need the psuedo element. – Wesley Murch Jan 01 '12 at 23:13