Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
markup
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Aug 2012 at 11:35 UTC
Updated:
29 Jul 2014 at 20:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
webchickTagging.
Comment #2
lewisnymanIt's a non-standard tag for a non-standard browser. I liken it to a prefixed CSS property. It's not technically in the spec but it's common sense to include it.
Comment #3
dcmouyard commentedI agree with lewisnyman.
Comment #4
BarisW commentedAs it's an IE Mobile specific vendor fix, we could add conditional comments around it, just like done here: https://github.com/h5bp/mobile-boilerplate/commit/feb59c52ae77bb80a2a76d...
Patch attached.
Comment #5
BarisW commentedAdded the Conditional Comment on the wrong tag.
Comment #6
barrapontoAnd it gets rid of a trailing space :D
We should really take html5-boilerplate as a reference.
Comment #7
webchickWell if this is copasetic, this would be a great fix!
However, the pointer to html5-boilerplate shows that they're not using this cleartype property at all, within conditional comments or no. https://github.com/h5bp/html5-boilerplate/blob/master/index.html
Marking back down to needs review so we can discuss this a little bit more.
Comment #8
barrapontoSo, upon closer inspection, HTML5 Mobile Boilerplate does not surround http-equiv in conditional comments, and I can't find the mentioned commit in a fresh checkout of the project (weird). But I guess the approach is better than just leaving it there and even better than actually removing it.
@webchick: you were looking at HTML5 regular boilerplate. I wasn't aware there was a mobile boilerplate, but there is https://github.com/h5bp/mobile-boilerplate/blob/master/index.html#L11
Comment #9
barrapontoFound it: https://github.com/h5bp/mobile-boilerplate/pull/109
TL;DR that's all that stops H5BP from validating, but it's not something they care about. I think we're not discussing whether we should care, at least not in this issue. So I do believe this is copasetic.
Comment #10
webchickHm. That discussion (sorta) seems to imply we should "won't fix" rather than commit this patch.
Moving back down to needs review for discussion. I'd love to hear from lewisnyman, JohnAlbin, etc. .. some of the people involved in #1468582: Add mobile friendly meta tags to the html.tpl.php.
Comment #11
johnalbinSo I don't think we've had a "should we do validation for validation's sake?" discussion in the Drupal community. I think it's a very useful tool, but I don't believe we need to jump through hoops when the validator is over-aggressive. A "broken tag" like this does not cause any breakage in any browser, so I'm fine with leaving the tag as-is and not validating.
Comment #12
barrapontoOK, if we're ever into validation, we should just open an issue for that. Closing.
Comment #13
BarisW commentedThanks John. But on the other hand; is there a reason NOT to include this conditional comment? I don't know if this is the same for other countries, but in the Netherlands governmental websites must pass W3 validation. As it's a TPL file it's easy to fix, but wouldn't it be great if Drupal passes out-of-the-box?
Comment #14
lewisnymanThe latest version of Internet Explorer (10) is dropping support for conditional comments. We should check to see if the cleartype switch is even supported in modern IE. I can't find any evidence to confirm it is supported in anything other than Windows Mobile 6.5 but let's confirm this.
Comment #15
barrapontooh IE, can't you just die?
Comment #16
webchick+1 #15 ;)
Comment #17
BarisW commentedTo summarize:
- The cleartype tag is added to improve display on Windows browsers (Windows Mobile). Other browsers ignore this tag.
- This tag makes Drupal not validate anymore, which is a bad thing.
- We can simply overcome this by adding a conditional comment. This one is still ignored by other browsers, and Windows Mobile will still use it. No drawbacks, and validation passes again.
The reason that it hasn't made it to the Mobile Boilerplate repository is the lack of response of the original issue poster. This doesn't say there isn't a good reason to implement it :)
Or, else, can we just remove the tag instead of leaving it as is?
Comment #18
johnalbinI have the opposite opinion. Validation for validation's sake, as Paul Irish says, is silly. We _know_ that this tag is ignored by browsers that don't understand it. And we know that it is validly written for IE. Adding extra code weight (e.g. it's is a tiny front-end performance hit) of a conditional comment is superfluous. And we can find no project that is wrapping this tag in a conditional comment.
Comment #19
barrapontoAdding 8 characters is the tiniest front-end performance I can imagine (short of adding 7- characters). We'd be removing a node from the DOM tree, so I bet we're even.
Now, IE10 dropping the conditional comments means it would be ignoring the cleartype, introducing a bug. I guess we better leave it like that and anyone requiring W3C-validation can remove it from their theme specific html preprocess. At least it's dead easy.
Comment #20
mcjim commentedI think #18 and #19 sum up nicely why we should close this.
We should open a "validation for validation's sake" issue if we feel it needs to be discussed further as that would determine whether this issue should be reopened.
Comment #21
damien tournoud commentedReopening. Windows phone has a nearly insignificant market share, and no public documentation that I could find explains which browser supports the cleartype meta tag. Cleartype seems to have been disabled by default in the past, but it is very obvious that it is going to be enabled by default in the future (it is enabled by default on iPhone and Android since basically forever).
Let's drop this tag, please.
Comment #22
lewisnymanYes, I don't think we need this tag when we don't actually support old windows phones.
Comment #23
johnalbinOk. Works for me.
The next patch should remove the metatag.
Comment #24
BarisW commentedGreat! There goes.
Comment #26
barrapontoreroll, this time removing it from tests as well.
Comment #27
lewisnymanPatch applies and the tag is removed, code looks good.
Comment #28
webchickYay, less code, more validation! :)
Committed and pushed to 8.x. Thanks!