W3C home > Mailing lists > Public > www-style@w3.org > October 2007

Fwd: [CSS3] Conditional statements in CSS 3

From: Gabriele Romanato <gabriele.romanato@gmail.com>
Date: Mon, 15 Oct 2007 13:14:27 +0200
Message-ID: <8aec6fbf0710150414o32702896q5f06827d4865eb5e@mail.gmail.com>
To: www-style@w3.org
---------- Forwarded message ----------
From: Gabriele Romanato <gabriele.romanato@gmail.com>
Date: 15-ott-2007 13.12
Subject: [CSS3] Conditional statements in CSS 3
To: www-style-request@w3.org

Dear all,
while I was writing an user style sheet that emulates the behavior of Lynx
browser, it came to my attention the following problem:

img[alt]:before {
content: attr(alt) !important;
}

img[src]:before {
content: attr(src) !important;
}

In other words, it's not possible to choose between the above mentioned
options. I propose the following new keyword for the at-rules

@if (img[src]) {style rules}

@else if (img[alt]) {style rules}

we can check now if there's such an attribute. the above syntax can be
extended also to the media queries.

regards,

Gabriele Romanato

-- 
http://www.css-zibaldone.com/
http://mimicry.css-zibaldone.com/

-- 
http://www.css-zibaldone.com/
http://mimicry.css-zibaldone.com/
Received on Monday, 15 October 2007 11:15:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:55 GMT