Skip to content

Instantly share code, notes, and snippets.

View jasonkmccoy's full-sized avatar

Jason McCoy jasonkmccoy

View GitHub Profile
button {
background: #e5ac8e;
color: #fff;
font-size: 14px;
border-radius: 0.5em;
padding: 0 1em;
position: relative;
overflow: hidden;
line-height: 32px;
}
/* CSS Output */
li {
list-style: none;
background: #d1703c;
color: #fff;
height: 0;
line-height: 2em;
margin: 0;
padding: 0 0.5em;
@jasonkmccoy
jasonkmccoy / _hidden.sass
Created February 18, 2015 22:17
Hidden Mixins
// Hide from both screenreaders and browsers: h5bp.com/u
// Probably don't use this one
.hidden {
display: none !important;
visibility: hidden;
}
// Hide only visually, but have it available for screenreaders: h5bp.com/v
@jasonkmccoy
jasonkmccoy / _clearfix.sass
Created February 18, 2015 22:15
Clearfix Mixin
// Clearfix: contain floats
// For modern browsers
// 1. The space content is one way to avoid an Opera bug when the
// `contenteditable` attribute is included anywhere else in the document.
// Otherwise it causes space to appear at the top and bottom of elements
// that receive the `clearfix` class.
// 2. The use of `table` rather than `block` is only necessary if using
// `:before` to contain the top-margins of child elements.
@jasonkmccoy
jasonkmccoy / _print.sass
Created February 18, 2015 22:11
Sass Print Styles
@media print {
* {
background-color: transparent !important;
box-shadow: none !important;
color: #000 !important; // Black prints faster: h5bp.com/s
text-shadow: none !important;
}
a,
a:visited {
@jasonkmccoy
jasonkmccoy / _reset.sass
Last active August 29, 2015 14:15
Sass Reset
@charset "UTF-8";
/*
FLUIDITY v0.1.0
@mrmrs • http://mrmrs.cc
MIT
*/
/*
Responsive Utilities
@jasonkmccoy
jasonkmccoy / sass-bem-mixin.css
Last active August 29, 2015 14:15
Sass BEM (BlockElementModifier) Mixin
/* CSS Output */
.block {
color: red;
}
.block__element {
color: green;
}
.block__element--modifier {
color: blue;
@jasonkmccoy
jasonkmccoy / sass-variables.css
Created February 18, 2015 20:26
Sass Variables: Sass Bites Podcast #10
/* CSS Output */
/* Example #1 */
.blog {
color: #555;
background: tan;
width: 800px;
height: auto;
}
.blog__article {
@jasonkmccoy
jasonkmccoy / sass-nesting.css
Last active August 29, 2015 14:15
Sass Nesting: Sass Bites Podcast #9
/* CSS Output */
ul {
list-style: none;
font-size: 16px;
line-height: 1.6;
}
a {
text-decoration: none;
color: pink;
@jasonkmccoy
jasonkmccoy / [email protected]
Last active August 29, 2015 14:15
The @for directive (Sass Bites Podcast #8)
/* CSS Output */
h1, h2, h3, h4, h5, h6 {
display: inline;
}
/* Example 1: simple @for example */
h1 {
font-size: 1em;
padding: 20px;
}