[development] About CSS3
Steven Wittens
steven at acko.net
Thu Jan 4 02:30:22 UTC 2007
Drupal 5.0 will be the first Drupal that includes some CSS3. Several
people have brought up concerns or 'bug reports' about this.
Facts:
- CSS3 is a huge standard which is still in draft form, although many
parts of it haven't been changed in the past couple of years. It
consists of several modules, which are usually independent from each
other.
- Several parts of CSS3 are already well supported by some (e.g.
'display') or even all the major browsers (e.g. 'opacity').
- CSS has always clearly specified how parsers are to deal with
unknown styles. e.g. Setting "bunnies: fluffy" or "display: foobar"
should not have any effect in any modern browser, as it is not part
of any CSS standard. Both rules are treated as if they weren't there
at all.
- The W3C provides a CSS3 option in their CSS validator, showing that
they promote active use of the spec.
With that in mind, I'd like to set an official policy on CSS3 in
Drupal, namely that we allow it. By definition, it should not cause
any problems in older browsers, and it can be used to provide extra
UI cues (opacity for disabled items) or nice style enhancements (e.g.
text-shadow in Garland, for Safari).
The only big problem for now is that some of the CSS3 throws a
warning in Firefox's debug log (e.g. "display: inline-block" in
core). While annoying, this is IMO Firefox' fault, not ours.
Especially because Firefox is happy to accept the other CSS3 in
Garland (e.g. "opacity: 0.5"). It is also only visible if you have
some sort of development tools active.
It seems most of the reactions against this are knee-jerk: "Drupal
doesn't care about valid CSS" or "What's this scary error message?".
IMO this is the price to pay for progress. Drupal is still sticking
to a standard, and one which has real-world implementations.
Objections? :P
Steven Wittens
More information about the development
mailing list