W3C home > Mailing lists > Public > www-style@w3.org > July 2002

Re: a:hover and a:active and named anchors

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Fri, 26 Jul 2002 11:40:18 -0400
To: Stuart Ballard <sballard@netreach.com>
Cc: www-style@w3.org
Message-ID: <20020726114018.A29394@is09.fas.harvard.edu>

On Friday 2002-07-26 11:27 -0400, Stuart Ballard wrote:
> What *did* occur to me though is that it would be possible for the 
> default user-agent stylesheet to workaround these issues. For example:
> a:not(:link):hover, a:not(:link):active {
>    font: initial;
>    background-color: initial;
>    color: initial;
>    list-style-item: initial;
> }

This wouldn't work, for two reasons:

First, these styles would not override any styles in an author
stylesheet, unless they were !important (in a way that override author
stylesheets -- !important in UA stylesheets isn't technically defined).
This is because the weight & origin sort in the cascading order is a
higher priority sort than any other.

Second, if they did override author stylesheets (due to !important or
something like it), they would also override the non-:hover/:active
styles in the user stylesheets, and the author's link styles that didn't
have event state selectors would be overridden with the default when the
element was in the :hover or :active state.


L. David Baron        <URL: http://www.people.fas.harvard.edu/~dbaron/ >
Received on Friday, 26 July 2002 11:40:21 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:02 UTC