This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19832 - "mark { background: yellow; color: black; } /* this color is just a suggestion and can be changed based on implementation feedback */" - remove the comment based on https://twitter.com/zcorpan/status/264305739550576640
Summary: "mark { background: yellow; color: black; } /* this color is just a suggestio...
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-02 16:36 UTC by contributor
Modified: 2012-11-06 19:11 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2012-11-02 16:36:32 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html
Multipage: http://www.whatwg.org/C#phrasing-content-1
Complete: http://www.whatwg.org/c#phrasing-content-1

Comment:
"mark { background: yellow; color: black; } /* this color is just a suggestion
and can be changed based on implementation feedback */" - remove the comment
based on https://twitter.com/zcorpan/status/264305739550576640

Posted from: 91.217.168.220
User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.7.4; U; en) Presto/2.10.289 Version/12.02
Comment 1 Simon Pieters 2012-11-02 16:38:24 UTC
quoting:
[[
@zcorpan
The default style for <mark> is mark { background: yellow; color: black; } - should this be changed to something else? #whatwg

@theophani 
@zcorpan @WHATWG No.

@turmfalkenruf 
@zcorpan No, I think it's exactly right. What, did you want to add blinking? ;-)

@AurelioDeRosa 
@zcorpan I don't see a reason to change that style.

@divya 
@zcorpan STOP BIKESHEDDING!
]]
Comment 2 Ian 'Hixie' Hickson 2012-11-02 21:37:52 UTC
_Implementation_ feedback. :-)

Do people use it? If there are pages I could look at that use it and browsers that support it, that would be useful.
Comment 3 Simon Pieters 2012-11-02 22:31:19 UTC
http://fr.ning.com/ has <mark> for all text basically, presumably a misguided SEO thing.

http://www.stumbleupon.com/
http://www.bt.dk/
http://www.womansday.com/
use <mark> but override the style.

That's basically what I could find from http://www.paciellogroup.com/blog/2012/04/html5-accessibility-chops-data-for-the-masses/ . web200904 has no instances of <mark>.

Opera/Firefox/Chrome/Safari appear to have implemented the spec's styling already and I have not seen any feedback about it from what I recall. I don't know about IE.
Comment 4 Kang-Hao (Kenny) Lu 2012-11-03 13:48:55 UTC
I wonder why there's 'color: black' though. An author would always need write an redundant 'color' declaration when he/she wants to override the style, instead of relying on 'color' inheritance.

What's the benefit of such a declaration in the UA?

Ditto for dialog { color: black; }.
Comment 5 Ian 'Hixie' Hickson 2012-11-05 20:15:06 UTC
You have to always set background and colour together otherwise you can make text invisible (e.g. if the page is yellow-on-black, and your <mark> style just sets the background to yellow, the text is now yellow-on-yellow).


Based on the notes above, I think the comment still applies.
Comment 6 Kang-Hao (Kenny) Lu 2012-11-05 20:29:24 UTC
(In reply to comment #5)
> You have to always set background and colour together otherwise you can make
> text invisible (e.g. if the page is yellow-on-black, and your <mark> style
> just sets the background to yellow, the text is now yellow-on-yellow).

"always" is just not true. Suppose I have dark gray on white and I am fine seeing dark gray on yellow, why do I have to bother to do 'mark { color: <dark gray>;'?
Comment 7 Ian 'Hixie' Hickson 2012-11-06 19:11:37 UTC
Browsers have to set the background because authors and users might be setting the foreground, and they can't control that. The problem isn't people who write pages that are dark gray on white, the problem is people who write pages that are yellow on black.

BTW, as a page author you're better off always setting a background color and color together too. After all, you never know when the user will have set one or the other in their user style sheet.