Skip to content

Instantly share code, notes, and snippets.

@Snugug
Created April 21, 2015 20:58
Show Gist options
  • Select an option

  • Save Snugug/7c1c6c8dcf657ab55f4c to your computer and use it in GitHub Desktop.

Select an option

Save Snugug/7c1c6c8dcf657ab55f4c to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<a href="#" class="link">Hello World</a>
<div>
<button class="foo">This is a Button</button>
</div>
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
.link {
font-size: 2em;
// Set Outline on Focus
&:focus {
outline: red auto 5px;
}
// The Important Bit, Remove Focus on Hover/Active
&:active,
&:hover {
outline: 0;
}
}
.foo {
background: 0;
border: 1px solid black;
padding: 1em 2em;
// Set Outline on Focus
&:focus {
outline: purple auto 5px;
}
// The Important Bit, Remove Focus on Hover/Active
&:active,
&:hover {
outline: 0;
}
&:active {
background: blue;
}
&:hover {
cursor: pointer;
}
}
.link {
font-size: 2em;
}
.link:focus {
outline: red auto 5px;
}
.link:active, .link:hover {
outline: 0;
}
.foo {
background: 0;
border: 1px solid black;
padding: 1em 2em;
}
.foo:focus {
outline: purple auto 5px;
}
.foo:active, .foo:hover {
outline: 0;
}
.foo:active {
background: blue;
}
.foo:hover {
cursor: pointer;
}
<a href="#" class="link">Hello World</a>
<div>
<button class="foo">This is a Button</button>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment