The W3C describes it as:
If the "scoped" attribute is present, the styles only apply to the style elements parent element and its child elements.
Which to me means:
- Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css" media="screen">
p {
color:red;
}
</style>
</head>
<body>
<p>red</p>
<div>
<style type="text/css" media="screen" scoped="true">
p {
color: blue ;
}
</style>
<p>blue</p>
</div>
<p>red</p>
</body>
</html>
should work. But it doesn't.
Is this implemented in any browsers yet? What is the syntax/intended usage. I can't find anything.
Tips?