barebones/assets/styles/config/_mixins.scss

57 lines
779 B
SCSS
Raw Normal View History

2014-08-20 19:18:16 +02:00
/*
* Media query to respond to a minimum size (mobile first)
*/
2014-06-20 16:59:08 +02:00
@mixin resp-min($size) {
@media screen and (min-width: $size) {
@content;
}
2014-06-20 16:59:08 +02:00
}
2014-08-20 19:18:16 +02:00
/*
* Media query to respond to a maximum size
*/
2014-06-20 16:59:08 +02:00
@mixin resp-max($size) {
@media screen and (max-width: $size) {
@content;
}
2014-01-30 12:20:51 +01:00
}
2014-08-20 19:18:16 +02:00
/*
* Output font size in px/rem
*/
2014-02-03 23:10:54 +01:00
@mixin font-size($px) {
font-size: $px + px;
font-size: #{$px / 16}rem;
2014-05-09 11:00:52 +02:00
}
2014-08-20 19:18:16 +02:00
/*
* Placeholder mixin for <input>
*/
2015-10-14 13:35:18 +02:00
@mixin placeholder {
$placeholders: ":-webkit-input" ":-moz" "-moz" "-ms-input";
@each $placeholder in $placeholders {
&:#{$placeholder}-placeholder {
@content;
2014-09-05 16:36:38 +02:00
}
}
2014-06-03 15:32:07 +02:00
}
2015-04-01 18:32:10 +02:00
/**
* Clearfix
*/
2015-10-14 13:35:18 +02:00
@mixin clearfix {
&:before,
&:after {
content: " ";
display: table;
}
&:after {
clear: both;
}
2015-07-31 16:46:02 +02:00
}