Skip to content

Instantly share code, notes, and snippets.

@kapowaz
Created March 6, 2012 10:52
Show Gist options
  • Select an option

  • Save kapowaz/1985666 to your computer and use it in GitHub Desktop.

Select an option

Save kapowaz/1985666 to your computer and use it in GitHub Desktop.
An idea for an alternative syntax for scoped styles
<html>
<head>
<style>
@scope 'body > div:nth-child(2)' {
div { color: red; }
span { color: green; }
}
</style>
</head>
<body>
<div>a div! <span>a span!</span></div>
<div>a div! <span>a span!</span></div>
<div>a div! <span>a span!</span></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment