barebones/scss/generic/_mixins.scss

51 lines
676 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-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) {
2014-02-03 23:10:54 +01:00
@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;
2014-05-08 12:24:17 +02:00
font-size: #{$px / $base-font-size}rem;
2014-05-09 11:00:52 +02:00
}
2014-08-20 19:18:16 +02:00
/*
* Placeholder mixin for <input>
*/
2014-05-09 11:00:52 +02:00
@mixin placeholder {
2014-05-09 11:08:21 +02:00
::-webkit-input-placeholder {
@content;
}
:-moz-placeholder {
@content;
}
::-moz-placeholder {
@content;
}
:-ms-input-placeholder {
@content;
}
2014-06-03 15:32:07 +02:00
}