I’ve found such code in html5boilerplate:
/**
* Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
* Known issue: no IE 6 support.
*/
[hidden] {
display: none;
}
What address? What does it affect? Elements with attribute hidden like following example?
<div hidden></div>
Yes, exactly like your example. The selector will match any element with a
hiddenattribute (there’s an implied universal selector before the attribute selector).The
hiddenattribute is a new addition to the HTML specification, and is therefore not supported in older browsers. By adding that rule to your stylesheet, you effectively polyfill the native behaviour of that attribute (which is, fairly obviously, to hide the element, similar to settingdisplay: none).The “known issue” in IE6 is caused by the fact that it doesn’t support attribute selectors.