WebAIM - Web Accessibility In Mind

E-mail List Archives

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

for

From: John Foliot
Date: Jul 28, 2011 1:45PM


John Foliot wrote:
> Jukka K. Korpela wrote:
> >
> > I don't quite see how that matters. Inline styles have their
> problems,
> > but how would it make a difference to set, say, some properties for a
> > single paragraph using <p style="..."> versus using <p id="foo"> and
> > setting the styles for #foo in a style element or in an external
> > stylesheet?
>
> Discoverability mostly (coupled with ease of authoring/ease of use).
>
> 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, as well as
> perhaps
> any helping author (who might be working with the end user to develop
> the
> custom CSS).

Also, the Cascade effect come into play here: inline declarations always
over-rule embedded and linked styles, and embedded styles always over-rule
linked styles. Therefore user stylesheets could not over-rule inline
styles unless you applied the !important declaration as well, which might
introduce other unwanted artifacts... (and often inline styles might not
have a selector [ID or class] available to "hang" your alternate style to)

JF