Skip to content

Instantly share code, notes, and snippets.

View babsgosgens's full-sized avatar
🤡
Life’s a parade

Babs Gösgens babsgosgens

🤡
Life’s a parade
  • Rosmalen, Netherlands
View GitHub Profile
@babsgosgens
babsgosgens / usage-example-2a-markup
Last active December 20, 2015 21:49
Example of combining classes at markup level and using @extend
<div class="my-collection">
<div class="third column">1</div>
<div class="third column">2</div>
<div class="third column">3</div>
</div>
@babsgosgens
babsgosgens / usage-example-3a-markup
Last active December 20, 2015 21:49
Example using a combination of classes in markup and mixins
<div class="my-collection">
<div>1</div>
<div>2</div>
<div>3</div>
</div>
// Import some default type families
@import "fonts/serif";
@import "fonts/sans-serif";
@import "fonts/monospace";
@mixin debug-rhythm
{
$to: transparent;
$from: rgba(226, 255, 255, .5);
background-image: -webkit-linear-gradient($from 50%, $to 50%);
background-image: linear-gradient($from 50%, $to 50%);
background-size: rhythm(2) rhythm(2);
* { background-color: transcontainer !important; background-image: none !important; outline: rgba(255,0,255,.1) dotted 1px; outline: lighten( rgb(255,0,255), .1 ) dotted 1px \9; }
}
@if $debug-baseline {
html {
@extend .debug;
}
}
.debug {
@include debug-rhythm;
}
@mixin reset-text-rendering
{
/*
* See: http://www.usabilitypost.com/2012/11/06/optimize-legibility/
*/
text-rendering: optimizeLegibility;
/*
* Prevents the browser from using synthesized font-weights.
@mixin reset-box-sizing {
@include box-sizing(border-box);
}
@mixin reset-input
{
/**
* 1. Prepare for easy styling
* 2. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
* 3. Correct font family not being inherited in all browsers.
* 4. Correct font size not being inherited in all browsers.
*/
button,
@if $reset-box-model OR $reset-box-sizing OR $reset-font OR $reset-text-rendering {
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
@if $reset-anchor {
a {
background: transparent;
&:focus {
outline: thin dotted;
}
&:active,
&:hover {
@include reset-focus
}