- From: Ian Hickson <ian@hixie.ch>
- Date: Sat, 4 Feb 2012 04:05:12 +0000 (UTC)
- To: Sean Hogan <shogun70@westnet.com.au>
- cc: www-style@w3.org, Hugh Guiney <hugh.guiney@gmail.com>
On Sat, 4 Feb 2012, Sean Hogan wrote:
> >
> > This isn't a formal proposal, but you get the idea. If we solve this
> > problem, the need for<di> completely goes away, but more importantly,
> > so does the need for a huge number of<div>s.
>
> Could you provide examples for how this suggestion--
Note that I explicitly said that I wasn't making a specific proposal. My
point is that this is the kind of thing that once solved in CSS solves a
whole ton of other things in CSS.
> --solves styling specific name-value groups within the <dl>, e.g.
>
> dl > li.hidden { display: none; }
dl::magicpseudo(dt.hidden magic dd) { display: none; }
> dl > li.closed > dd { display: none; }
Since the pseudo here would introduce a box in the middle of the render
tree, it seems to make sense to me to also make it introduce a scope for
selectors, as in:
dl::magic(dt...dd) > dt.closed ~ dd { display: none; }
or introducing another kind of magic syntax that lets you do optional
sequences in selectors using the syntax (selector)suffix, where suffix is
one of ?, +, *, or :count(n,m), with the same meanings as in regexps (the
last one having the same meaning as {n,m}) one could do:
dl > dt.closed (+ dt)* (+ dd)* + dd { display: none; }
(Though really, how often do you have a collapsible dt/dd group that has
more than one dt or dd?)
> dl > li::even { background-color: #ccc; }
On the basis that the magic pseudo is an actual thing, you could see
something like this working:
dl::magicthingy(dt..dd):nth-child(even) { ... }
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 4 February 2012 04:05:36 UTC