W3C home > Mailing lists > Public > www-style@w3.org > December 2012

Re: [selectors] :sorted pseudoclass for HTML

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 27 Dec 2012 20:07:59 -0800
Message-ID: <CAAWBYDCt2burLQFDK=r4SuWa+61Py9oe4YY+Be9MYE=3WCkzmA@mail.gmail.com>
To: fantasai.lists@inkedblade.net
Cc: www-style list <www-style@w3.org>
On Dec 27, 2012 10:44 AM, "fantasai" <fantasai.lists@inkedblade.net> wrote:
>
> On 12/27/2012 06:01 AM, Tab Atkins Jr. wrote:
>>
>> Hixie recently added the ability to declaratively sort tables to HTML.
To support these on the CSS side, it would be
>> convenient to define a :sorted pseudoclass, along with
:sorted(ascending) and :sorted(descending), which apply to table cells
>> in sorted columns. The relevant bug is at <
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20522>. We can just defer to
the
>> host language to define what elements are sorted at any given time.
>>
>> Anyone have any objections to us adding these to Selectors 4?
>
> Yes. Why are we not just indexing off the [sorted] attribute itself?

The attributes are placed on <th> elements, for usability, which doesn't
work with our existing selectors unless you use a complicated combination
of :matches(), the subject indicator, and the column combinator (and that's
a very stretched definition of "existing selectors").

Its also trickier to do ascending/descending, since you'd have to use a
substring attribute match against "reverse".

~TJ
Received on Friday, 28 December 2012 04:08:26 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:03 GMT