Skip to content

Instantly share code, notes, and snippets.

@jakearchibald
Created October 14, 2011 10:44
Show Gist options
  • Save jakearchibald/1286795 to your computer and use it in GitHub Desktop.
Save jakearchibald/1286795 to your computer and use it in GitHub Desktop.
<div class="whatever">
<style>
.whatever {
p {
margin: 0;
}
}
/* Or even better... */
:root {
p {
margin: 0;
}
}
/* Where :root would be the style root element, rather than document root element */
</style>
<link rel="stylesheet" href="...">
<div>...More stuff...</div>
</div>
@unscriptable
Copy link

cool. Since the :root method achieves effectively the same thing as scoped, I'd be very happy to put my vote on it (or something similar that's back-compat). thx for gisting this! -- J

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment