Reputation: 3
I'm wanting to remove the little arrow that appears on the left of <details>
element, but I don't find how to..
Can anyone tell me how to do this ?
Thanks
(btw I'm sure that it's makeable easily by editing css styling)
Upvotes: 0
Views: 2060
Reputation:
The MDN's details
element article says:
The
<summary>
element supports thelist-style
shorthand property and its longhand properties, such aslist-style-type
, to change the disclosure triangle to whatever you choose (usually withlist-style-image
). For example, we can remove the disclosure widget icon by settinglist-style: none
.Chrome doesn't support this yet, however, so we also need to use its non-standard
::-webkit-details-marker
pseudo-element to customize the appearance in that browser.
Therefore, use list-style-type
property and ::-webkit-details-marker
pseudo element.
summary {
list-style-type: none; /* Firefox */
}
summary::-webkit-details-marker {
display: none; /* Chrome */
}
<details>
<summary>Summary</summary>
<p>text text text text text text text text text text text text text text text text text text text.</p>
</details>
Upvotes: 5