box-shadow rendering behavior on multiline span varies between Firefox and other browsers (Chrome and IE)

NEW
Unassigned

Status

()

defect
5 years ago
5 years ago

People

(Reporter: nirvn.asia, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
The drop-shadow CSS property seems to be mis-rendering under Firefox (or at the very least differs from the rendering by Chrome/Chromium and IE)

Basically, when a <span> element reflows to several lines, the CSS drop-shadow attribute is only applied to the first and last line. It's a bit hard to explain, but the attached testcase will hopefully make it very obvious.

I spotted this in the wild on www.vox.com (see attached screenshot).
(Reporter)

Comment 1

5 years ago
http://dev.w3.org/csswg/css-backgrounds/#shadow-layers says:

If an element has multiple boxes, all of them get drop shadows, but shadows are only drawn where borders would also be drawn; see ‘box-decoration-break’.

The initial value of http://dev.w3.org/csswg/css-break/#break-decoration is slice, which says not to draw the borders at slices.

This means our behavior matches the current spec and the Chrome/IE behavior does not.



That said, did we change this recently?  (I feel like Mats did some work on it.)  Should we actually be following the spec on this point if it's not what Web content expects?
Flags: needinfo?(mats)
Summary: drop-shadow rendering behavior on multiline span varies between firefox and other browsers (chrome and ie) → box-shadow rendering behavior on multiline span varies between Firefox and other browsers (Chrome and IE)
(In reply to David Baron [:dbaron] from comment #2)
> That said, did we change this recently?

Yes, the layout per spec was implemented as part of bug 613659.

> Should we actually be following the spec on this point if it's not
> what Web content expects?

Fwiw, we did discuss it at the time:
https://bugzilla.mozilla.org/show_bug.cgi?id=613659#c17

For 'box-shadow' the difference is an minor esthetic issue that the author
can easily fix by adding b-d-b:clone if they feel it's needed.
Also, I suspect that box-shadow is still relatively rare on inlines.

IMO, there is significant value in having 'box-decoration-break'
affect all the relevant properties in the same way.
Flags: needinfo?(mats)
Duplicate of this bug: 1062761
Duplicate of this bug: 1065360
You need to log in before you can comment on or make changes to this bug.