This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
_s/sass/mixins/_mixins-master.scss

66 lines
1.2 KiB
SCSS
Raw Normal View History

@mixin font-1($weight) {
2020-05-08 10:09:13 +00:00
// see functions.php->google_fonts()
// and functions.php->_s_scripts()
font-family:
Montserrat,
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Oxygen-Sans,
Ubuntu,
Cantarell,
"Helvetica Neue",
sans-serif;
@if $weight == regular {
font-weight: 400;
} @else if $weight == bold {
font-weight: 600;
} @else if $weight == extra-bold {
font-weight: 700;
} @else {
@error "font-weight #{$weight} not in valid font-weights for font-1: 'Montserrat'.";
}
}
@mixin font-body($weight: regular) {
2020-05-08 10:09:13 +00:00
@include font-1($weight);
}
@mixin font-title($weight: regular) {
2020-05-08 10:09:13 +00:00
@include font-1($weight);
}
@mixin font-link($weight: regular) {
2020-05-08 10:09:13 +00:00
@include font-1($weight);
}
@mixin font-code($weight: regular) {
2020-05-08 10:09:13 +00:00
font-family: $font__code;
font-weight: $weight;
}
@mixin font-pre($weight: regular) {
2020-05-08 10:09:13 +00:00
font-family: $font__pre;
font-weight: $weight;
}
// Center block
@mixin center-block {
2020-05-08 10:09:13 +00:00
display: block;
margin-left: auto;
margin-right: auto;
}
2017-08-01 13:21:13 +00:00
// Column width with margin
@mixin column-width($numberColumns: 3) {
2020-05-08 10:09:13 +00:00
width:
map-get($columns, $numberColumns) -
(($columns__margin * ($numberColumns - 1)) / $numberColumns);
}