Closed
Bug 205640
Opened 21 years ago
Closed 21 years ago
Children can't chage the line color of text-decoration: line-through;
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: masayuki, Unassigned)
References
()
Details
(Whiteboard: INVALID)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030513 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030513 if child element has text-decoration: inherit; or text-decoration: line-through;, the line color of child content is forground color of child element. span#parent{ text-decoration: line-through; color: blue; } span#child{ text-decoration: inherit; color: red; } <span id="parent"><span id="child">this text have a red line</span></span> Reproducible: Always Steps to Reproduce: 1.see http://bugzilla.mozilla.gr.jp/attachment.cgi?id=1615&action=view 2. 3. Actual Results: the line through is red on child content. Expected Results: the line through should be rendered blue on child content. # underline and overline are good.
Comment 1•21 years ago
|
||
The line-through is "owned" by the element that it is set on, and thus has its colour. If you set another line-through on the child element, it would have the child element's colour. INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 2•21 years ago
|
||
Wait, see the test case. the underline and overline colors are red when child element has text-decoration: inherit; or text-decoration: underline overline; Do you say a bug is underline and overline?
Summary: Children can't chage the line color of text-decoration: line-througe; → Children can't chage the line color of text-decoration: line-through;
Reporter | ||
Comment 3•21 years ago
|
||
> the underline and overline colors are red when child element has
> text-decoration: inherit; or text-decoration: underline overline;
the underline and overline colors are "blue" when child element has
text-decoration: inherit; or text-decoration: underline overline;
Comment 4•21 years ago
|
||
The line-through of the parent is drawn over the top of the children; overline and underline are drawn under the children. Thus if you want to see the child overline, change vertical-align a bit and you'll see it is there.
Reporter | ||
Comment 5•21 years ago
|
||
> The line-through of the parent is drawn over the top of the children; overline
> and underline are drawn under the children.
I can't find the reason in the CSS2 Spec.
Why does line-through differ from underline and overline?
I think, mozilla should render the steps.
1. draw the parent text.
2. draw the child text.
3. draw the parent line-through.
4. (If child element has text-decoration)draw the child line-through.
Comment 6•21 years ago
|
||
That would be a bit harder. Our algorithm is: . | ,----. \|/ \|/ | do underline | do overline | do text | do children ---' do overline | \|/ The spec doesn't explicitly say yet, but I am proposing the algorithm above to the working group.
Reporter | ||
Comment 7•21 years ago
|
||
> The spec doesn't explicitly say yet, I see. > but I am proposing the algorithm above to > the working group. You are proposing it, now? If it is, INVA is unsuitable. REOPEN. # Opera7.10 render with the same color in underline,overline and line-through.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Reporter | ||
Comment 8•21 years ago
|
||
I think... . | ,----. \|/ \|/ | do underline | do overline | do text | do children ---' | do line through<-----------------. do children(line through only) --' | \|/ Is this impossible?
Comment 9•21 years ago
|
||
It's not impossible. It's just tedious. What's the advantage of your complicated painting order? I'd have thought the current order made more sense.
Whiteboard: INVALID
Reporter | ||
Comment 10•21 years ago
|
||
Wmm...you are right.
But, mozilla's rendering is unnatural.
* underline and overline are able to be overrided by children.
* line-through are not able to be overrided by children.
* CSS Spec doesn't say to be able to override by children.
* CSS Spec doesn't say what should it carry out.(when it is overrided by children).
e.g. case of different font size children, different width of lines...
If it is out of spec, CSS Spec should say so...
#Will CSS3 say?
> When a text decoration could result in text being unintentionally overdrawn
> by the text decoration style, the user agents MAY chose to skip
> the text decoration over the intersecting area by using
> 'text-underline-mode', 'text-line-through-mode' or
> 'text-overline-mode' with the appropriate values.
>
> In determining the position of and thickness of text decoration lines,
> user agents MAY consider the font sizes of and dominant baselines of children.
> Of course, user agents MAY ignore children in these determinations.
> Such an averaging is done on a line per line basis.
Comment 11•21 years ago
|
||
No, underline may not be overridden any more than overline. It's just that the parent's underline is under the underline of the child, but the line through is over the line through of the child. Try it: .a { color: blue; text-decoration: underline line-through overline; } .b { color: aqua; text-decoration: underline line-through overline; vertical-align: -2em; } <span class="a"> A <span class="b"> B </span> </span> Add backgrounds to see what I mean. It's just that the rendering, seen sideways, is like this: background | # o | <-- overline # | | # | | o # | | # | | # | | # o | <-- underline | ^ ^ ^ | | '-- text | '----- children '-------- line-through If you start introducing multiple times to look at the children, it gets really hard to paint.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 12•21 years ago
|
||
New test case. http://bugzilla.mozilla.gr.jp/attachment.cgi?id=1617&action=view I see the z order of text,under(over)line,line-through, and child. But, I am not convinced to a rendering. I hope that this isssue is said by CSS Spec. Thank you, Ian.
You need to log in
before you can comment on or make changes to this bug.
Description
•