Skip to content

Instantly share code, notes, and snippets.

@RyanRoberts
Created November 4, 2014 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanRoberts/b51b809ff54576f8755a to your computer and use it in GitHub Desktop.
Save RyanRoberts/b51b809ff54576f8755a to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<h1>A lone button</h1>
<p>Etiam porta sen malesuada magna mollis euismod. <a href="#">Donec ullamcorper nulla non meths actor fringilla.</a> Cras justo odapibus ac facilisis in egestas get quam.</p>
<p><a class="btn" href="#">Button</a></p>
<h1>A button within scoped content</h1>
<div class="scopedContent">
<p>Etiam porta sen malesuada magna mollis euismod. <a href="#">Donec ullamcorper nulla non meths actor fringilla.</a> Cras justo odapibus ac facilisis in egestas get quam.</p>
<p><a class="btn" href="#">Button</a></p>
</div>
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
// Global
body
color: grey
font-family: helvetica, arial, sans-serif
a
color: inherit
text-decoration: none
// Button module
// Output the following to an IE8 stylesheet
// .scopedContent .btn
.btn
color: white
background-color: red
padding: 0.5em 1em
border-radius: 0.333em
text-decoration: none
&:hover, &:focus
color: #000
background-color: skyblue
// Scoped stuff
.scopedContent
a:not(.btn)
color: red
text-decoration: underline
&:hover, &:focus
color: blue
text-decoration: none
body {
color: gray;
font-family: helvetica, arial, sans-serif;
}
a {
color: inherit;
text-decoration: none;
}
.btn {
color: white;
background-color: red;
padding: 0.5em 1em;
border-radius: 0.333em;
text-decoration: none;
}
.btn:hover, .btn:focus {
color: black;
background-color: skyblue;
}
.scopedContent a:not(.btn) {
color: red;
text-decoration: underline;
}
.scopedContent a:not(.btn):hover, .scopedContent a:not(.btn):focus {
color: blue;
text-decoration: none;
}
<h1>A lone button</h1>
<p>Etiam porta sen malesuada magna mollis euismod. <a href="#">Donec ullamcorper nulla non meths actor fringilla.</a> Cras justo odapibus ac facilisis in egestas get quam.</p>
<p><a class="btn" href="#">Button</a></p>
<h1>A button within scoped content</h1>
<div class="scopedContent">
<p>Etiam porta sen malesuada magna mollis euismod. <a href="#">Donec ullamcorper nulla non meths actor fringilla.</a> Cras justo odapibus ac facilisis in egestas get quam.</p>
<p><a class="btn" href="#">Button</a></p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment