Suggestion for generic CSS vendor prefix

I wrote this by recommendation from Daniel Glazman. I hope you will 
excuse my French : this is the first time I do this kind of contribution.

Problem :

Lot of properties are still in the infancy of the validation, other ones 
are waiting for the definitive approval of the CSS standard 2.1 or 3. So 
if you want to use an experimental property, each declaration should 
have the vendor prefix, with all the problems :

-moz-box-shadow: #f00 0 0px 2px;
-webkit-box-shadow: #f00 0 0px 2px;

Here, you can see that I completely forgot browsers like MSIE, Opera or 
Konqueror. A more complete example would be :

-moz-box-shadow: #f00 0 0px 2px;
-webkit-box-shadow: #f00 0 0px 2px;
-opera-box-shadow: #f00 0 0px 2px;
-ms-box-shadow: #f00 0 0px 2px;
-khtml-box-shadow: #f00 0 0px 2px;

But if I wish to write my own browser and implement those properties, my 
browser will always be forgotten wy CSS writers.
The other problems is the bloating of the CSS for every declaration, and 
stability in the future.

Proposal :

Using a wildcard like a star to explain that the experimental property 
is common to every browser that can understand it :

-*-box-shadow: #f00 0 0px 2px;

If the star is a problem to parse, another suggestion is to prefix with 
two hyphens, a little bit like an unix parameter :

--box-shadow: #f00 0 0px 2px;

Main advantage is browser neutrality, simplicity in the CSS and 
portability. And we can still target a kind of browser by its vendor-prefix.

Thank you for reading me.

A more complete page in French is on my blog : 
http://dascritch.net/blog.php/post/2010/03/22/Proprietes-en-tests-et-prefixes-de-vendeurs 

-- 
da scritch com works <http://dascritch.com/>

*Xavier Mouton-Dubosc*
Développeur web freelance <http://dascritch.com>





------------------------------------------------------------------------

Received on Monday, 22 March 2010 14:41:54 UTC