From: Stanimir Stamenkov on
Mon, 31 May 2010 14:01:27 -0700 (PDT), /Andy Dingley/:
> On 31 May, 21:16, Stanimir Stamenkov<s7a...(a)netscape.net> wrote:
>
>> Are there any (other, non-descendant) predicate selectors in CSS,
>> currently?
>
> There are a few specialised ones, such as the pseudo-selectors and the
> language filters and there's a case for saying that class or id tests
> are something of this ilk. The point is that you can't test on child
> elements of the element the styles will be applied to,

Yes, but I was asking whether one could test on element siblings of
the element the styles will be applied to, for example. Thomas Lahn
stated "there is just no descendant predicate/selector in CSS", but
apparently I'm not aware one could do matching using element
siblings, either.

--
Stanimir
From: Joshua Cranmer on
On 05/31/2010 11:07 AM, Jeff Thies wrote:
> CSS is much like that. It makes doing simple common chores like columns
> a convoluted mess. It is not design/user friendly. It could be fixed and
> the programming to do it is not hard. It won't be, though.

The programming may not be hard, but it would be hard to do it quickly.
The W3C CSS working group has consistently rejected proposals for a
parent selector (or various forms of it; it comes up every few months)
for the following reasons:

1. Incremental rendering becomes messier (granted, :only-child and
:only-of-type break this too)
2. DOM mutation performance goes to hell.

The problem with styling columns is actually explained quite well by Ian
Hickson here: <http://ln.hixie.ch/?start=1070385285&count=1>. In
essence, you don't know what columns things are in until after you apply
the CSS cascade, which is when things need to figure out their color.

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
From: Thomas 'PointedEars' Lahn on
Stanimir Stamenkov wrote:

> /Thomas 'PointedEars' Lahn/:
>>> Andy Dingley wrote:
>>>> You're looking for predicates, and in general there isn't any such
>>>> mechanism in CSS (look at XPath for an example of one).
>>
>> Not true. There is just no descendant predicate/selector in CSS _ATM_.
>
> Are there any (other, non-descendant) predicate selectors in CSS,
> currently?

Yes.


PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
First  |  Prev  | 
Pages: 1 2 3
Prev: positioning absolute
Next: Sidebar tops uneven