WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
64156
text-decoration:none inside an anchor tag has no effect
https://bugs.webkit.org/show_bug.cgi?id=64156
Summary
text-decoration:none inside an anchor tag has no effect
David Vella
Reported
2011-07-08 02:59:25 PDT
Elements inside <a> with text-decoration:none, get underlined regardless
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
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
David Vella
Comment 1
2011-07-08 03:14:43 PDT
Created
attachment 100101
[details]
(ignore)
Fred Liu
Comment 2
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
David Vella
Comment 3
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.
David Vella
Comment 4
2011-07-18 11:28:36 PDT
Created
attachment 101181
[details]
Test Case
Fred Liu
Comment 5
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.
Tom Zakrajsek
Comment 6
2011-08-17 09:40:26 PDT
Confirmed with Beth Dakin (dethbakin) that this bug seems invalid. Resolving as such.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug