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.


Gabriele Romanato


Received on Monday, 15 October 2007 11:15:23 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:31 UTC