CSS text-shadow applied to body tag and not text elements




10 years ago
8 years ago


(Reporter: jacklukic, Unassigned)


1.9.1 Branch
Windows XP

Firefox Tracking Flags

(Not tracked)




(1 attachment)



10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5

When CSS Text shadow rules are placed in body tag it applies to actual body element instead of text elements, and causes layout to break.

This is especially dangerous since a lot of old sites fixed Safari anti-aliasing by setting near transparent text-shadow property to all text, on body tag.

Reproducible: Always

Steps to Reproduce:

For example
body {
 width: 100%;
 height: 100%;
 text-shadow: 1px 1px 1px #FFFFFF

causes horizontal scrollbars.

Actual Results:  
The body tag gets a shadow causing scrollbars to appear.

Expected Results:  
It should apply the rule to all text inside of body, and not the body element itself.
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → style-system
Version: unspecified → 1.9.1 Branch

Comment 1

10 years ago
This bug also applies to text-shadow rules attached to HTML tag.
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20090630 Minefield/3.6a1pre
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5
This is fixed on trunk but broken on branch


10 years ago
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 446693

Comment 4

10 years ago
marked as a duplicate but im not positive its same bug exactly..
It isn't the same bug, that one is still broken on trunk while this one is fixed. Also note, in all of those testcases there's text in the page while in this one there isn't any.
Resolution: DUPLICATE → ---

Comment 6

10 years ago
Thanks Nochum i removed duplicate notice.

Forgive my unfimiliarity, but are you saying its considered fixed, because its fixed in 1.9.2a1pre, or is this still open?
This bug was file against 1.9.1 so I left it open, this is fixed in 1.9.2a1pre in my testing. I'm not sure a fix would be backported to branch at this point, but feel free to nominate it for a branch release (wanted-1.9.1.x flag).


10 years ago
Flags: blocking1.9.1.1?
Opera 10b and WebKit/Safari4 also display a horizontal scrollbar with the testcase.

I think that the nightly Minefield builds may be buggy (and if the testcase has actual content, it does show a horizontal scrollbar).

Fwiw, the behaviour changed between the following changesets:


Bug 495385 ?

Comment 9

10 years ago
Created attachment 386164 [details]
new testcase unique to F3.5

new usecase, shows scrollbars in FF3.5, no scrollbars in webkit/safari, ie7+(barf), or F3.0.x

Breaks sites with text shadow on body and relative widths.
We don't typically block on unconfirmed bugs... Even if we did, this issue isn't a critical one that we'd block a maintenance release on, though we'll consider a patch should one appear.
Flags: blocking1.9.1.1?
You need to log in before you can comment on or make changes to this bug.