Bug 64156 - text-decoration:none inside an anchor tag has no effect
Summary: text-decoration:none inside an anchor tag has no effect
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2011-07-08 02:59 PDT by David Vella
Modified: 2011-08-17 09:40 PDT (History)
2 users (show)

See Also:


Attachments
(ignore) (4.62 KB, text/html)
2011-07-08 03:14 PDT, David Vella
no flags Details
Test Case (4.64 KB, text/html)
2011-07-18 11:28 PDT, David Vella
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Vella 2011-07-08 02:59:25 PDT
Elements inside <a> with text-decoration:none, get underlined regardless
Comment 1 David Vella 2011-07-08 03:14:43 PDT
Created attachment 100101 [details]
(ignore)
Comment 2 Fred Liu 2011-07-18 09:41:53 PDT
I think in the reduced case you uploaded, you meant 
"#reduced a:hover span" in the css instead of "#reduced a:hover div" ? since it seems the latter won't be applied to any element whatsoever.  

Even if the style was meant to be "#reduced a:hover span", it's still unclear what the behavior of "text-decoration:none" should be. Should it clear whatever style that the current element (<span>) inherited from its parents? or it should be applied IN ADDITION TO inherited style(s)? If it's the latter case, then the current implementation is working as expected. The specs seems unclear about this issue. Could you provide the reference to the spec specifying the exact expected behavior in this scenario?


(In reply to comment #1)
> Created an attachment (id=100101) [details]
> Reduced test case
Comment 3 David Vella 2011-07-18 11:27:28 PDT
Sincere apologies for that! you're right. Somehow I must have picked up an older version of the testcase. 
I'm uploading the correct one right now with updated text so it's a bit more clear.

I would have expected that any child elements could override the parent styles, but after doing some further digging, the answer is not quite so clear when it comes to text-decoration.

The spec (http://www.w3.org/TR/CSS21/text.html#propdef-text-decoration) seems pretty clear on how the inheritance should work - and Webkit does indeed follow it. But it's not so clear if text-decoration can be overridden by a child element.

Firefox seems to allow this override - but they may have a different interpretation of the spec for this scenario.

Came across this new 'text-decoration-skip' property in the draft of CSS3 which seems to address this issue, although I could be wrong: http://www.w3.org/TR/2010/WD-css3-text-20101005/#text-decoration-skip0

You're welcome to close this bug as Invalid until there's a more defined answer. Thanks.
Comment 4 David Vella 2011-07-18 11:28:36 PDT
Created attachment 101181 [details]
Test Case
Comment 5 Fred Liu 2011-07-18 14:37:46 PDT
Thanks for the update. 

Ya, current spec isn't clear enough, and text-decoration:skip in CSS3 seems to be more clear on this issue.

Also just FYI that Opera and IE is interpreting it in the same way as Webkit, while FF is interpreting differently.


(In reply to comment #3)
> Sincere apologies for that! you're right. Somehow I must have picked up an older version of the testcase. 
> I'm uploading the correct one right now with updated text so it's a bit more clear.
> 
> I would have expected that any child elements could override the parent styles, but after doing some further digging, the answer is not quite so clear when it comes to text-decoration.
> 
> The spec (http://www.w3.org/TR/CSS21/text.html#propdef-text-decoration) seems pretty clear on how the inheritance should work - and Webkit does indeed follow it. But it's not so clear if text-decoration can be overridden by a child element.
> 
> Firefox seems to allow this override - but they may have a different interpretation of the spec for this scenario.
> 
> Came across this new 'text-decoration-skip' property in the draft of CSS3 which seems to address this issue, although I could be wrong: http://www.w3.org/TR/2010/WD-css3-text-20101005/#text-decoration-skip0
> 
> You're welcome to close this bug as Invalid until there's a more defined answer. Thanks.
Comment 6 Tom Zakrajsek 2011-08-17 09:40:26 PDT
Confirmed with Beth Dakin (dethbakin) that this bug seems invalid.  Resolving as such.