W3C home > Mailing lists > Public > www-style@w3.org > March 2016

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

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Mon, 7 Mar 2016 09:19:54 +0100
To: www-style@w3.org
Message-ID: <094fbc41-8e0e-b9a1-cb70-1acb06da99ec@disruptive-innovations.com>
On 03/03/2016 21:01, Tab Atkins Jr. wrote:

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

Sorry I am stepping in late. The above is correct, it's a feature many
users are used to, coming from wysiwyg text processors. All browsers
also select the item when the marker is double-clicked.

One reason Gecko added the one-click behaviour eons ago to the marker
was the editor where double-click is used to open element properties,
in our case list properties.

It also seems that none of Gecko, WebKit and Blink correctly applies
'display: list-item; list-style-type: square' to an element that is not
a li, dt or dd. Gecko even seems to apply it only to li/dt/dd elements
inside a ul/ol/dl. I haven't checked in the code itself yet.

>> 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.
> 
> Other way around - this is a list-related feature (highlighting the
> contents of the element when you click the bullet) being shoehorned
> into a CSS feature (the "display:list-item" value) that isn't
> restricted to lists.
> 
> This is identical to automatically putting table-sorting functionality
> on anything that specified display:table, which would be obviously
> silly.  The Firefox behavior should be limited to the <li> element,
> which is semantically a list item (if it's kept at all).

I agree with Patrick. Even if the two features (list-item and has-a-
disclosure-marker) look similar, they are not. When one sets 'display:
table' on a non-table element, the expected rendition is a table. Here,
the stylesheet author is going to set 'display: list-item' for a
rendition that is not a list item. It's unfortunate but words convey
semantics. And we still have the issues highlighted above: restrictions
to 'display: list-item' in current engines that could have a side effect
on existing web pages if lifted, click and double-click behaviour.

</Daniel>
Received on Monday, 7 March 2016 08:20:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:01 UTC