You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
plain-ui/src/scss/core/_heading.scss

82 lines
1.6 KiB

3 years ago
/**
* Heading
*
*
* @author Björn Hase, Tentakelfabrik
* @license http://opensource.org/licenses/MIT The MIT License
* @link https://github.com/tentakelfabrik/crispy-css
*
*/
3 years ago
/**
* add font-size for heading as class and element
*
*
*/
@mixin heading-font-size($h, $font-size)
{
#{$h}, .#{$h} {
font-size: $font-size;
}
}
3 years ago
$heading__font-sizes: (
3 years ago
'h1': 2.5rem,
3 years ago
'h2': 2rem,
3 years ago
'h3': 1.75rem,
'h4': 1.5rem,
'h5': 1.25rem,
'h6': 1rem
3 years ago
) !default;
3 years ago
3 years ago
$heading__font-sizes-breakpoints: (
2 years ago
$grid__md: (
3 years ago
'h1': 2.75rem,
'h2': 2.5rem,
'h3': 2rem,
'h4': 1.75rem,
'h5': 1.5rem,
'h6': 1.2rem
)
3 years ago
) !default;
3 years ago
3 years ago
$heading__font-weight: bold!default;
$heading__font-family: $font-family !default;
3 years ago
3 years ago
$heading__line-height: 1.2 !default;
3 years ago
3 years ago
$heading__margin: $margin !default;
$heading__margin-breakpoints: margin-breakpoints !default;
3 years ago
h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
3 years ago
font-family: $heading__font-family;
font-weight: $heading__font-weight;
line-height: $heading__line-height;
3 years ago
3 years ago
margin: $heading__margin;
@include breakpoints('margin', $heading__margin-breakpoints);
3 years ago
3 years ago
&.highlight {
display: table;
}
3 years ago
}
3 years ago
// adding font-size for each
3 years ago
@each $h, $font-size in $heading__font-sizes {
3 years ago
@include heading-font-size($h, $font-size);
}
// adding breakpoints for each breakpoint and each heading
@each $breakpoint, $headings in $heading__font-sizes-breakpoints {
@media only screen and (min-width: $breakpoint) {
@each $h, $font-size in $headings {
@include heading-font-size($h, $font-size);
}
3 years ago
}
}