hacks-guide-minimal-mistake.../assets/_scss/_mixins.scss

50 lines
1 KiB
SCSS
Raw Normal View History

2015-01-20 15:25:57 -05:00
/* ==========================================================================
2016-03-10 11:13:54 -05:00
MIXINS
2015-01-20 15:25:57 -05:00
========================================================================== */
2016-03-10 11:13:54 -05:00
%tab-focus {
// Default
outline: thin dotted $warning-color;
// Webkit
outline: 5px auto $warning-color;
2014-07-31 13:09:32 -04:00
outline-offset: -2px;
}
2015-04-17 11:43:36 +01:00
/*
2016-03-10 11:13:54 -05:00
em function
2015-01-20 15:25:57 -05:00
========================================================================== */
2016-03-10 11:13:54 -05:00
@function em($target, $context: $doc-font-size) {
@return ($target / $context) * 1em;
2014-07-31 13:09:32 -04:00
}
2015-01-20 15:25:57 -05:00
2015-04-17 11:43:36 +01:00
/*
2016-03-10 11:13:54 -05:00
Bourbon clearfix
2015-01-20 15:25:57 -05:00
========================================================================== */
2014-07-31 13:09:32 -04:00
2016-03-10 11:13:54 -05:00
// Provides an easy way to include a clearfix for containing floats.
//
// @link http://cssmojo.com/latest_new_clearfix_so_far/
//
// @example scss - Usage
// .element {
// @include clearfix;
// }
//
// @example css - CSS Output
// .element::after {
// clear: both;
// content: "";
// display: table;
// }
2014-07-31 13:09:32 -04:00
2016-03-10 11:13:54 -05:00
@mixin clearfix {
2016-03-11 15:55:06 -05:00
clear: both;
2016-03-21 16:36:24 -04:00
2016-03-10 11:13:54 -05:00
&::after {
clear: both;
content: "";
display: table;
}
}