W3C home > Mailing lists > Public > www-style@w3.org > April 2005

Re: Targeting CSS3 only (evil?), either with pseudoclass or an extra syntax for properties.

From: Mikko Rantalainen <mikko.rantalainen@peda.net>
Date: Mon, 04 Apr 2005 11:36:27 +0300
Message-ID: <4250FC8B.4010205@peda.net>
To: www-style@w3.org

Emrah BASKAYA wrote:
> On Sat, 2 Apr 2005 20:23:53 +0100 (BST), David Woolley 
> <david@djwhome.demon.co.uk> wrote:
>>> However, as much as some will hate me for this, I'd really
>>> like to have a null pseudo-class that targets css3 capable
>>> agents only, e.g. p:css3 {} ,
>> Variations on this come up frequently.  The problems are:
> You are entirely correct. However, a dummy css3 pseudo class may
> give authors an easy transition to getting their things done with
> new CSS3 features while providing something useable for the old
> generation and may solve the degrade problems for style sheets
> using new CSS3 features. One example would be:

If there isn't a strict requirements for UA before supporting :css3 
pseudo class, the feature has no use.

> .sidenote { border: 2px dotted red; padding: 5px; /* no need for
> a large padding */ border-radius: 15px; /* old agents do not
> undestand anything, so no problem here */ }
> .sidenote:css3 { padding: 15px 5px; /* So contents start below
> the rounded circle border */ }

How do you know that UA supports "border-radius: 15px" if it 
supports :css3? Please, see the archives for more discussion about 
this issue.

A more general solution to this problem looks like

/* legacy support here: */
.sidenote { padding: 5px; }

/* apply nothing in this part if even a single property is not 
supported: */
@require-all-properties-supported /* or any other name */
	.sidenote { border-radius: 15px; padding: 15px 5px; }

Examples of this idea can be found from the archives, for example:

This feature requires that UAs would make conservative claims about 
supported features, too. Some believe that it wouldn't be the case.

The problem you're trying to solve isn't querying for a single 
(un)supported property but you really want to query support for 
combination of multiple properties. You might be even querying for 
support of multiple selector types so perhaps you want

@require-all /* the above and all possible new @require-features 
combined */

Received on Monday, 4 April 2005 08:36:34 UTC

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