Closed Bug 174646 Opened 22 years ago Closed 22 years ago

clicking left of div causes BG image to disapear

Categories

(Tech Evangelism Graveyard :: English US, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jmd, Assigned: susiew)

References

()

Details

(Keywords: testcase)

Attachments

(4 files, 1 obsolete file)

Load http://www.w3.org/TR/2000/REC-xhtml1-20000126/
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
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.




click on (or next to) the text
appears to be intentional on Mozilla's part.  It only happens in strict mode.
Attached file css for testcase 2
Attached file testcase 2 - disappearing background (obsolete) —
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"
with inline css, background.  works fine.
oops.  this one actually uses the css.
Attachment #103014 - Attachment is obsolete: true
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?
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?
> 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.
the fix is so straightforward:

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

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

==> 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.
fixed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
v
Status: RESOLVED → VERIFIED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: