Skip to content

Instantly share code, notes, and snippets.

View martine-dowden's full-sized avatar
😀

Martine Dowden martine-dowden

😀
View GitHub Profile
@mixin text-contrast($n) {
$color-brightness: round((red($n)*299)+(green($n)*587)+(blue($n)*114)/1000);
$light-color: round((red(#ffffff)*299)+(green(#ffffff)*587)+(blue(#ffffff)*114)/1000);
@if abs($color-brightness) < ($light-color/2){
color: white;
} @else {
color: black;
}
}
@mirisuzanne
mirisuzanne / one-mixin.scss
Created September 13, 2012 18:36
THE MOST POWERFUL SASS MIXIN EVAR.
// Apply any css property/value pair.
@mixin css(
$azimuth: null,
$background: null,
$background-attachment: null,
$background-color: null,
$background-image: null,
$background-position: null,
$background-repeat: null,
$border: null,