Question

The CSS3 Specifications are in the main browsers partly implemented and you get very nice results with less code, but there are many reasons not to use CSS3. E.g. not downwardly compatible, probably not similar renderd views on different browsers, etc.

So I'm asking myself: Which is the best way to use CSS3 anyway with a option to intercept default problems, like I've discribed above?

Was it helpful?

Solution

As long as your site degrades gracefully there's nothing wrong with using CSS3 now. Afterall, if a browser does not understand a particular CSS rule it will just ignore it:

#foo {
    border:1px solid #000; /* shown by all browsers */
    border-radius:5px; /* shown if browser understands border-radius */
    -moz-border-radius:5px; /* Firefox only */
    -webkit-border-radius:5px; /* Safari and Google Chrome */
}

As long as the site does not look broken in browsers that don't support the CSS3 rules you want to use then you should be ok progressively enhancing your site in the browsers that do support them.

OTHER TIPS

You might find "When can I use..." useful for seeing what features you can reasonably use.

If your making a public website then you have to support ie6, which means no css 2.1, let alone 3.

One thing you can try is: lesscss

This will let you use shorthand css notation and "compile" it to valid css on build.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top