Skip to content

Instantly share code, notes, and snippets.

View snowman-repos's full-sized avatar

James snowman-repos

View GitHub Profile
@snowman-repos
snowman-repos / Roll Link
Last active October 12, 2015 04:48
CSS: Roll Link
@snowman-repos
snowman-repos / Remove whitespace around text fields
Last active October 12, 2015 03:58
CSS: remove whitespace around text fields
input,
textarea {
margin:0;
vertical-align:bottom;
}
@snowman-repos
snowman-repos / Word wrap
Last active July 12, 2017 21:34
SASS: Word Wrap
// Word Wrapping
@mixin word-wrap() {
-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
.word-wrap {
@snowman-repos
snowman-repos / Ellipses
Last active October 11, 2015 09:27
SASS: Ellipses
// Overflow Ellipsis
@mixin ellipsis() {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ellipsis {
@include ellipsis;
}
@snowman-repos
snowman-repos / Accessible hidden text
Last active June 12, 2016 11:59
SASS: Accessible Hidden Text
// Accessible hiding
@mixin screen-reader-text() {
position: absolute;
top: -9999px;
left: -9999px;
}
.screen-reader-text {
@include screen-reader-text;
}
@snowman-repos
snowman-repos / Animation mixin
Last active October 11, 2015 09:27
SASS: Animation Mixin
@mixin keyframes($name) {
@-webkit-keyframes #{$name} {
@content
}
@-moz-keyframes #{$name} {
@content
}
@-ms-keyframes #{$name} {
@content
}
@snowman-repos
snowman-repos / Media queries mixin
Last active October 11, 2015 09:28
SASS: Media Queries
@mixin breakpoint($point) {
@if $point == mama-bear {
@media (max-width: 1250px) { @content; }
}
@if $point == baby-bear {
@media (max-width: 800px) { @content; }
}
@if $point == reverso-baby-bear {
@media (min-width: 800px) { @content; }
}
@snowman-repos
snowman-repos / gist:3838104
Created October 5, 2012 04:31
SASS: Font Stack
@mixin font-stack-brand {
font-family: 'Gotham Rounded A', 'Gotham Rounded B', "proxima-nova-soft", sans-serif;
}
@mixin font-stack-headers {
font-family: 'Whitney Cond A', 'Whitney Cond B', "ronnia-condensed", sans-serif;
font-weight: 700;
font-style: normal;
}
@mixin font-stack-body {
font-family: 'Whitney SSm A', 'Whitney SSm B', "ff-meta-web-pro", sans-serif;
@snowman-repos
snowman-repos / gist:3838095
Created October 5, 2012 04:28
SASS: Emboss Text
@mixin box-emboss($outerOpacity, $innerOpacity) {
box-shadow:
rgba(white, $outerOpacity) 0 1px 0,
rgba(black, $innerOpacity) 0 1px 0 inset;
}
.module, header[role="banner"] {
@include box-emboss(0.3, 0.6);
}
@snowman-repos
snowman-repos / gist:3832202
Created October 4, 2012 08:26
CSS: CSS Shapes
/*
SQUARE
*/
#square {
width: 100px;
height: 100px;
background: #000;
}