Ellipsis created by `text-overflow` does not respect CSS properties such as `text-decoration`.




5 years ago
2 years ago


(Reporter: hail2u, Unassigned)


(Blocks: 1 bug)

23 Branch

Firefox Tracking Flags

(Not tracked)



(1 attachment)

1008 bytes, text/html; charset=UTF-8


5 years ago
Created attachment 797615 [details]

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36

Steps to reproduce:

1. create `a` element with a long texts
2. style `a` element with `text-overflow: ellipsis` and `text-decoration: underline`

Actual results:

Ellipsis created by `text-overflow` does not have underline.

Expected results:

Ellipsis should have underline.
Attachment #797615 - Attachment mime type: text/plain → text/html; charset=UTF-8
Component: Layout: View Rendering → Layout: Block and Inline
OS: Windows 7 → All
Hardware: x86_64 → All
I don't see anything in http://dev.w3.org/csswg/css-text/ or http://dev.w3.org/csswg/css-ui/ describing the correct behavior here, except for http://dev.w3.org/csswg/css-ui/#text-overflow saying:

  The ellipsis is styled and baseline-aligned according to the block. 

which probably suggests that the current behavior is correct per the spec.

Comment 2

5 years ago
Yes, the spec does not specify correct behavior of ellipsis's text styling. But I think Firefox should treat `text-*` properties same as `color` or `font-weight`, because there is no way to style ellipsis via CSS.
Fwiw, our current behavior is intentional - we explicitly added code to truncate
text-decorations before the ellipsis.

I'd like to see something explicit about text-decorations in the text-overflow
spec (and at least one other UA committing to implementing it) before changing
our code.  (spec changes should be discussed on www-style@w3.org)

I think our current behavior makes sense as the default (and so did roc@
in bug 312156 comment 143, saying "Other browsers don't apply text-decorations,
which makes sense to me.").  Any new behavior should be opt-in, perhaps using
a separate property.
Severity: normal → enhancement
Duplicate of this bug: 932926


2 years ago
Blocks: 1336680
You need to log in before you can comment on or make changes to this bug.