Normalize the template element display

The `template` element shipped in Firefox 22 and Chrome 26. Browsers
without HTML template support should at least hide the element.
This commit is contained in:
Nicolas Gallagher 2013-07-01 23:54:45 -07:00
parent 37b483c1e1
commit 77982e20d8
2 changed files with 10 additions and 2 deletions

6
normalize.css vendored
View File

@ -44,10 +44,12 @@ audio:not([controls]) {
}
/**
* Address styling not present in IE 8/9.
* Address `[hidden]` styling not present in IE 8/9.
* Hide the `template` element in IE, Safari, and Firefox < 22.
*/
[hidden] {
[hidden],
template {
display: none;
}

View File

@ -96,6 +96,12 @@
The <var>var element</var> example
</p>
<h1>Template content</h1>
<template>
<h1>{{title}}</h2>
<content></content>
</template>
<h1>Embedded content</h1>
<h3>audio</h3>