On Wed, 15 Feb 2006, Beauregard T. Shagnasty wrote:
Alan J. Flavell wrote:
That's not such a good idea. "transparent" runs much the same risk
of cascading badly with other stylesheets, as not specifying it at
all (in detail its cascading properties would be different, but it's
nevertheless the same principle).
Would depend on how many style sheets are used, of course.
But in the final analysis, the author has no control over whether the
user is applying a user stylesheet or not. That is, after all, one of
the features of *Cascading* style sheets.
Some users might be applying a user stylesheet for accessibility
reasons (e.g due to eyesight problems they prefer to read light
coloured text on a dark ground), so this is a WAI issue too - see the
last sentence of section 9.1
http://www.w3.org/TR/WCAG10-CSS-TECH...color-contrast , although
the sentence omits to explain the background to the advice.
If both participants follow the rule when formulating their respective
stylesheets ("specify either both colours or neither, at each
specificity") then they get the best collective chance of a readable
result, in the face not only of regular CSS cascading, but even in the
face of browser inheritance bugs. The end result of the cascade might
look a bit odd, but at least each text will be presented against a
chosen background colour (assuming that any browser inheritance bugs
would almost certainly affect foreground and background colours
equally).
And this can be done without compromising the appearance for users who
accept the author's stylesheet in its entirety, which is how things
are supposed to work (IMHO, anyway).
If either of them fails to follow the rule, the result *could* be some
black text on a black background (etc.), with the reader being unaware
that they are missing anything. Even if it only ends up with poor
contrast, it's irksome.
[As I said, this agenda isn't always feasible (primarily when
background images are involved), but I'd recommend following the
principle when possible. And not just because it causes the CSS
checker to stop bleating...]
cheers