Previous Message
Next Message

Test on box-shadow and border-radius

Sent by Philippe Wittenbergh on 26 June 2010 05:05


On Jun 26, 2010, at 1:28 PM, Gabriele Romanato wrote:

> http://onwebdev.blogspot.com/2010/06/test-on-css3-box-shadow-and-border.html

Raining on your parade:

You really, I mean really, should change the order in which you list the properties, to take the
cascade into account.

You currently have:
>  border-radius: 8px;  
> -moz-border-radius: 8px;

You should turn that around, list the -vendor- properties first, and _then_ the css3 property /
notation. That way, you're sure that a UA that currently uses a -vendor-prefixed notation, but in
the near future upgrades to use the CSS3 notation will use the 'real' thing, rather than fall back
on the -vendor prefixed one. The 'real thing' might be more powerful or more correct or more…  etc.

Here is a quick & dirty example, to be viewed with WebKit (and View source):
<http://dev.l-c-n.com/CSS3_border-background/border-radius_vendor-cascade.html>

Safari 5 and recent Chrome builds support the CSS3 notation, but also support the -vendor-prefixed
one. The 2 boxes have the same properties listed. In the second box, the '-webkit-' one wins because
it comes last in the code.
(the same will happen when Gecko supports the CSS3 notation in Firefox 4).

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: