CSS3 rules contain many interesting features.
Take border-radius , for example. The standard says that if you write this rule:
div.rounded-corners { border-radius: 5px; }
I have to get a border radius of 5px.
But neither mozilla nor webkit implement this. However, they implement the same thing, with the same parameters, with a different name ( -moz-border-radius and -webkit-border-radius , respectively).
To satisfy as many browsers as possible, you will get the following:
div.rounded-corners { border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; }
I see two obvious flaws:
- Copy-paste code. This has obvious risks that I will not discuss here.
- The W3C CSS validator will not validate these rules.
At the same time, I do not see any obvious advantages.
I believe that the people behind mozilla and webkit are smarter than me. There must be some good reason for things to be structured this way. I just do not see them.
So, I have to ask you: why is this?
w3c css3 mozilla webkit w3c-validation
kikito
source share