WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Interesting cause: http://contrastrebellion.com


From: Jukka K. Korpela
Date: Jul 28, 2011 2:24PM

28.07.2011 22:46, John Foliot wrote:

>> While most user style-sheets will be highly generic, there could exist
>> cases where a more defined style-sheet that was site specific (think
>> intranet for example) could be developed for specific users. Having all
>> those style declarations inside one document (rather than having to
>> hunt out and address inline styles) benefits the end user

That's a rather rare case, and not particularly significant even in
those rare cases. It's generally the overall complexity of style sheets
that makes it difficult to design a user style sheet that works with a
page (author) style sheet. People can write highly confusing and complex
style sheets in style elements or external stylesheets. Compared to
that, inline styles are mild-mannered animals.

> Also, the Cascade effect come into play here: inline declarations always
> over-rule embedded and linked styles,

Only when other things are equal, and in this discussion they aren't.

> Therefore user stylesheets could not over-rule inline
> styles unless you applied the !important declaration as well,

User stylesheets cannot overrule _any_ page (author) stylesheets without
!important. Inline declarations have high specificity, but that doesn't
matter when considering user vs. page stylesheets. Page stylesheet
always wins, unless there's !important. Specificity doesn't affect this.

Yucca, http://www.cs.tut.fi/~jkorpela/