clicking left of div causes BG image to disapear



17 years ago
4 years ago


(Reporter: jmd, Assigned: susiew)



Firefox Tracking Flags

(Not tracked)




(4 attachments, 1 obsolete attachment)



17 years ago
Scroll down to the green and red boxes in section 4.1
Click (and hold) to the right of eaither box.

All text in on page turns red. I assume this is do to buggy stylesheets. (Why
are all of the W3's stylesheets so screwy? What a terrible example they set)

W3C recommendation banner on the left disapears.

Text changes back, and image reapears when click is released.

Linux 2002101508

Comment 1

17 years ago
Confirming with Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.2b) Gecko/20021015,
build ID 2002101508.

I can make the text turn red by clicking and holding to the right of the text.
Clicking and holding to the right of the blue headings turns them red. For me,
click + hold to the right of *any* box (even the one under "Contents") turns the
text red and makes the W3C logo at the left disappear.

The page works fine with IE 5.1 for Mac OS 9.1.

Comment 2

17 years ago
Created attachment 103010 [details]
testcase for text turning red

click on (or next to) the text
appears to be intentional on Mozilla's part.  It only happens in strict mode.

Comment 3

17 years ago
Created attachment 103012 [details]
css for testcase 2

Comment 4

17 years ago
Created attachment 103014 [details]
testcase 2 - disappearing background

click to the area to the right of the red box.	you have to click in the
<div>'s margin, which is much inflated in the testcase.

when you click in the margin, the body becomes "active", which makes the
background "transparent"

Comment 5

17 years ago
Created attachment 103015 [details]
testcase 2 with inline css

with inline css, background.  works fine.

Comment 6

17 years ago
Created attachment 103016 [details]
testcase 2 - disappearing background

oops.  this one actually uses the css.
Attachment #103014 - Attachment is obsolete: true


17 years ago
Keywords: testcase
So let me see if I follow this.  There is a body:active rule that sets the
background to "transparent".  When you click on the body the rule is triggered.
 What is the bug?

Comment 8

17 years ago
If the CSS went out of its way to hide the image on click, then there is no bug.

That's absolutely rediculous though. What the heck is the W3C /doing/?! Trying
to demonstrate how stupid CSS is?

Comment 9

17 years ago
> When you click on the body the rule is triggered. What is the bug?

so the <div>'s margin is the only part of the window that is the <body>?  I
guess it makes sense, but the question remains why the testcase with inline css
works fine (the background does not disappear).
> so the <div>'s margin is the only part of the window that is the <body>?

More or less, yes. The body shrink-wraps its content in this case; margins are
the only places where it "shows through" (you can see this for top/bottom
margins for all the stuff on the page too).

> the testcase with inline css

:active { foo }
body { bar}

In this case, when both rules apply (you have an active body) the :active rule
has higher weight per the cascade.  So you get foo.

:active { foo }
<body style="bar">

In this case the inline style has higher weight, again per the cascade.

Should we evangelize them, perhaps?  Otherwise this is invalid.

Comment 11

17 years ago
the fix is so straightforward:

+a:active {foo}
-:active {foo}

I seriously doubt they intended that the ":active" apply to anything other than

==> Evang
Assignee: attinasi → susiew
Component: Layout → US General
Product: Browser → Tech Evangelism
QA Contact: petersen → zach
Version: other → unspecified
You mean :link:active, right?

There's one more quirk here, of course.  In CSS_1_, :active applies only to
links.  In CSS2, it applies to all elements.

Comment 13

16 years ago
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 14

16 years ago
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.