Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
What about including the conditionals around the tag like is the growing trend?
Comment | File | Size | Author |
---|---|---|---|
#12 | html5_tools-7.x-1.x-1719650-12.patch | 4.13 KB | seandunaway |
#11 | RDFa-1.1-Validator---WITHOUT-namespaces.png | 23.11 KB | seandunaway |
#11 | RDFa-1.1-Validator---WITH-namespaces.png | 32.87 KB | seandunaway |
#4 | index.html_.txt | 1.21 KB | seandunaway |
#1 | html5_tools-7.x-1.x-1719650-2.patch | 1.2 KB | seandunaway |
Comments
Comment #1
seandunaway CreditAttribution: seandunaway commentedFirst attempt...
I borrowed the formatting from HTML5Boilerplate but clearly not in line with drupal coding standards.
Also, sure is ugly when RDF is enabled.
Comment #2
seandunaway CreditAttribution: seandunaway commentedComment #3
seandunaway CreditAttribution: seandunaway commentedPreview with and without RDF:
Comment #4
seandunaway CreditAttribution: seandunaway commentedMaybe this issue is instead about adapting a tried and true boilerplate html5 template...
Because I'd also like to see:
HTML5Boilplate/Initilizr bare bones html5 template attached.
Comment #5
ruplMost Drupal theme implementations of conditional classes make sure not to overload the document with RDFa attributes within conditional comments because RDFa is for non-IE consumers of the data.
Furthermore, by printing the redundant data, you sacrifice the ability to use certain meta tags (such as charset) because they must be present within the first 1024 bytes of the HTML document.
Further reading can be found in the Drupal core queue: #1471382-11: Add IE-conditional classes to html.tpl.php
Comment #6
seandunaway CreditAttribution: seandunaway commentedhmm, and apparently its best to have the conditionals on html versus say body: http://webforscher.wordpress.com/2010/05/20/ie-6-slowing-down-ie-8/
Is there another way to define rdf:document? I couldn't spend much time browsing right now but I did see an RDF specification doc that basically said is totally appropriate... does it even need all that gibberish?
Comment #7
seandunaway CreditAttribution: seandunaway commentedhttp://dev.w3.org/html5/rdfa/#document-conformance
Comment #8
ruplThe best people to discuss this issue with would be @scor or @linclark - they are both semantic web experts.
Comment #9
seandunaway CreditAttribution: seandunaway commentedChatted up @linclark,
Basically we'd have throw the RDFa declarations twice, for head and then for body if we don't define in html, as both can contain data.
Looking at the other HTML5 themes, such as Zen, jthey ust skip the RDF all together.
The conditional styles are definitely not worth the cruft.
Comment #11
seandunaway CreditAttribution: seandunaway commentedOkay, so plugged in with and without namespaces into http://www.w3.org/2012/pyRdfa/Validator.html
Both pass validation... but the html tag without namespaces actually generates 2/3rds less warnings (because xmlns is depreciated)
Comment #12
seandunaway CreditAttribution: seandunaway commentedQuick patch after adjusting the template to be like HTML5Boilerplate
Only thing missing is Modernizr or html5shiv but we have an existing and excellent module for that :)
Comment #13
ericduran CreditAttribution: ericduran commentedA couple of comments on this patch. I know it's been a while but it's still open.
- You don't need the "X-UA-Compatible" meta tag. We already add it via the headers which is better and the recommended approach.
- We shouldn't add the viewport. This isn't always the same across all site. The last thing I want to do is complicates someones life as they try to figure out how to replace the problem incorect viewport we're putting on the page for them. I suspect anyone that needs the viewport would know they need it and would easily be able to add it.
So this leaves the patch down to the IE conditional comments. Personally I just usually avoid this being that I'm really against specific ie styling which is what this is really for.
So not sure if we should add the conditional comments. Mind you most themes are probably overriding this html.tpl.php anyways.
Comment #14
nikhilsukul CreditAttribution: nikhilsukul commentedWhy we are not considering Mobile HTML5Boilerplate: http://html5boilerplate.com/html5boilerplate.com/dist/mobile/
Comment #15
hass CreditAttribution: hass commentedI normally use
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
theinitial-scale=1.0
is missing in the patch.Per Erics feedback this needs work.
What the heck is this? I do not like to see this added to my templates. Make this optional and do not enable this by default if there is really a need for this, please.
Remove
Can be removed.
Comment #16
hass CreditAttribution: hass commentedIf I read https://github.com/h5bp/html5-boilerplate/issues/1187 I must say, there is no need for this at all as we push the header out. This way IE knowns that it should render HTML5. So this boilertemplate stuff can be removed.
Changing title as we are down to only this part of the patch.
Comment #17
mgiffordApple's has some docs on Viewport definitions.
But there are a few blogs talking about the importance of properly setting the Viewport so that users can continue to control the Zoom on their device. Viewport : adieu width=device-width and Five Fundamentals of Accessible Responsive Web Design.
From this, the optimal RWD code looks like this:
<meta name="viewport" content="width=device-width, initial-scale=1.0" />