Re: [css-pseudo] Need a way to styling the disclosure triangle of the <details> (or <summary>) element

On 2/28/2016 12:33 AM, Xidorn Quan wrote:
> On Sun, Feb 28, 2016 at 2:19 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> On Sat, Feb 27, 2016 at 2:36 PM, Patrick Dark
>> <www-style.at.w3.org@patrick.dark.name> wrote:
>>> Clicking display: list-item markers causes an element's text to become
>>> selected in Firefox (but not Chrome or Edge). That seems like a bad behavior
>>> for a disclosure widget.
>> That sounds like a very weird behavior for Firefox to have. Maybe they
>> should just stop that?
> I don't know the reason behind this behavior, but I don't think this
> is something CSS spec need to consider.

The behavior is a convenience feature for selecting a list item's contents.

I don't think this issue is a CSS spec problem. However, it does 
highlight the fact that this feature -- the disclosure widget -- is 
being shoehorned into another feature -- list counters -- that clearly 
wasn't designed for this purpose.

> Yes, this behavior is weird for <details>/<summary>, and I agree we
> don't want to ship with that. But it doesn't affect what
> presentational hint should we apply to those elements. (I don't know
> the exact code here but I don't believe this would be hard to fix.)

I'm not sure it's a good idea to special-case this behavior for one 
(i.e., summary) element.

If an author tries moving the disclosure widget onto a nested span 
element, for example, the behavior will presumably reappear.

summary  { display: block; }
summary > span { display: list-item; list-style-type: disclosure-closed; }

It'd make more sense to remove the behavior entirely.

Received on Thursday, 3 March 2016 06:56:55 UTC