Skip to content

Instantly share code, notes, and snippets.

View ogbaoghene's full-sized avatar

Ogbaoghene ogbaoghene

View GitHub Profile
@ogbaoghene
ogbaoghene / Monotone Palette
Last active August 29, 2015 14:03
Returns a tint or shade of a color in increments - 8%, 20%, 50%, or 75%.
@function shade($color, $percent) {
@return mix(black, $color, $percent);
}
@function tint($color, $percent) {
@return mix(white, $color, $percent);
}
@function mono-palette($color, $mix: null) {
@if $mix == tint1 {
@ogbaoghene
ogbaoghene / rem Fallback
Last active August 29, 2015 14:02
Convert px values for multiple property-values pairs to rem values with px fallbacks.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
$baseFontSize: 16;
@function stripUnit ($num) {
@return $num / ($num * 0 + 1);
}