.class:hover should be ignored for non-links in quirks mode

VERIFIED FIXED in mozilla1.3beta

Status

()

Core
CSS Parsing and Computation
P2
normal
VERIFIED FIXED
15 years ago
9 years ago

People

(Reporter: stephend@netscape.com (gone - use stephen.donner@gmail.com instead), Assigned: dbaron)

Tracking

Trunk
mozilla1.3beta
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [technote-needed][patch], URL)

Attachments

(1 attachment)

Build ID: 2002-09-16-08, All OSs.

Summary: On http://search.netscape.com/nscp_index.adp, all of the sub-categories  

Steps to Reproduce:

1. Load http://search.netscape.com/nscp_index.adp.
2. Mouseover any element under a bolded heading (eg. 'Video Games' under 'Games'
category).

Expected Results:

In NS 7.0 RTM and Opera/IE 6 for Windows, this is correct (each element gets
TEXT-DECORATION: underline applied on :hover)

Actual Results:

Using the trunk Mozilla/Netscape 7.x builds, we apply TEXT-DECORATION: underline
to all of the elements when you're only mousing over one.

From http://search.netscape.com/search.css, here are the style rules:

.odpcat {FONT: 12px arial,geneva; TEXT-DECORATION: none}
.odpcat:hover {TEXT-DECORATION: underline}

Here are the table elements:

<td class=odpcat width=25%>
										<a href="nscp_browse.adp?gn=gwd/Top/Arts&source=NSCPIndex"
class=size2b>Arts</a><br>								&nbsp;<a
href="nscp_browse.adp?gn=gwd/Top/Arts/Movies&source=NSCPIndex"
class=odpcat>Movies</a><br>
&nbsp;<a href="nscp_browse.adp?gn=gwd/Top/Arts/Television&source=NSCPIndex"
class=odpcat>Television</a><br>
&nbsp;<a href="nscp_browse.adp?gn=gwd/Top/Arts/Music&source=NSCPIndex"
class=odpcat>Music</a><br>
									</td>

Updated

15 years ago
Blocks: 118291
Summary: Sub-categories shouldn't be underlined on mouseover → netscape.com - Sub-categories shouldn't be underlined on mouseover

Updated

15 years ago
Keywords: evang500

Comment 1

15 years ago
Eric - regression or css coding issue?
Coding issue.  The rules should be:

a.odpcat {FONT: 12px arial,geneva; TEXT-DECORATION: none}
a.odpcat:hover {TEXT-DECORATION: underline}

...or else:

.odpcat a {FONT: 12px arial,geneva; TEXT-DECORATION: none}
.odpcat a:hover {TEXT-DECORATION: underline}

As written, the hover styles are being applied to the 'td' cell (since it has a
class of 'odpcat'), and thus getting pixked up by the entire content of the
cell.  This is another case of "hover applies to more than links" surprising a
designer.  I have an action item to write a DevEdge piece on the topic.

Comment 3

15 years ago
I don't see this in a 11/4 branch build (rv:1.0.2). Eric do you have an old
branch you can try this on?

Assignee: aruner → doron
Whiteboard: [technote-needed]
All my back versions are trunk builds.  My Windows version of Netscape 7.01
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120]
doesn't show the reported behavior, but trunk builds from before 11/20 do.

I still believe this to be a site-design error, because the text is content of
the 'td' element and so should be affected by 'text-decoration' changes to their
parent.  However, I'm cc:ing David Baron and Ian Hickson on this in case I'm
wrong about how text decoration is supposed to be applied to inline elements of
a 'table-cell' element, and this is a bug after all.
(Assignee)

Comment 5

15 years ago
I suspect the change that triggered this was a change to our :hover behavior --
allowing hover to apply to non-links in more cases (we have some quirks to
prevent :hover from applying to non-links in quirks mode).  I weakened them with
the fix to bug 96984, and I'm hesitant to readd quirks just for one site that
could, one hopes, be easily convinced to change (perhaps with a change as small
as changing ".odpcat:hover" to "a.odpcat:hover").

Comment 6

15 years ago
This works for me on 11/20 branch (Netscape 7.01). 
Given the number of sites (small but noticeable) that will have one of the
following two:

  :hover {color: red;}
  .class:hover {color: red;}

...it would make a lot of sense to change quirks mode so that selectors of the
above two forms are applied only to hyperlinks.  In other words, a hover
selector by itself, or in conjunction with a class value but no element, should
not be applied to non-links.  In standards mode and almost-standards we should
continue applying :hover to everything, of course.

I'd like to formally request this behavior, so where would you prefer it go-- a
reopened 96984, a new bug, or right here?
(Assignee)

Comment 8

15 years ago
We already have a quirk for the former, and if you want one for the latter,
reassigning this bug seems fine.
Per comment 8, reassigning bug and changing summary.  See comment 7 for the
proposed change in quirks mode.
Component: US Ecommerce → Style System
OS: Windows 2000 → All
Product: Tech Evangelism → Browser
Hardware: PC → All
Summary: netscape.com - Sub-categories shouldn't be underlined on mouseover → .class:hover should be ignored for non-links in quirks mode
Version: unspecified → Trunk
(Assignee)

Comment 10

15 years ago
Created attachment 111503 [details] [diff] [review]
patch
(Assignee)

Comment 11

15 years ago
Really reassigning.
Assignee: doron → dbaron
Severity: major → normal
Priority: -- → P2
QA Contact: bclary → ian
Whiteboard: [technote-needed] → [technote-needed][patch]
Target Milestone: --- → mozilla1.3beta
(Assignee)

Updated

15 years ago
Attachment #111503 - Flags: superreview?(bzbarsky)
Attachment #111503 - Flags: review?(bzbarsky)
Comment on attachment 111503 [details] [diff] [review]
patch

yeah.... we have far too many evang bugs on this issue...
Attachment #111503 - Flags: superreview?(bzbarsky)
Attachment #111503 - Flags: superreview+
Attachment #111503 - Flags: review?(bzbarsky)
Attachment #111503 - Flags: review+
(Assignee)

Comment 13

15 years ago
Fix checked in to trunk, 2003-01-14 13:50 PDT.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
(Assignee)

Comment 14

15 years ago
*** Bug 189507 has been marked as a duplicate of this bug. ***

Comment 15

15 years ago
*** Bug 191772 has been marked as a duplicate of this bug. ***

Comment 16

15 years ago
*** Bug 159720 has been marked as a duplicate of this bug. ***
*** Bug 192678 has been marked as a duplicate of this bug. ***

Comment 18

15 years ago
verified on linux trunk build 2002-02-17-05

Status: RESOLVED → VERIFIED
...mac, win32?

Comment 20

14 years ago
A bug was just filed which seems like it should have been taken care of by this
bug (at least from the description of this bug).

Bug 199584 notes a page in quirks mode which uses .class:hover.  The :hover
style is still being applied to things like textareas and submit buttons.

Updated

9 years ago
Depends on: 448783
You need to log in before you can comment on or make changes to this bug.