mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Adjusted error handling in px2em
This commit is contained in:
parent
f5ad733181
commit
841b493df6
@ -35,9 +35,13 @@
|
||||
///
|
||||
@function px2em($size, $base: 16px) {
|
||||
@if unit($size) == px {
|
||||
@return ($size / $base) * 1.0em;
|
||||
@if unit($base) == px {
|
||||
@return ($size / $base) * 1.0em;
|
||||
} @else {
|
||||
@error "Invalid base: #{$base} - unit must be 'px'";
|
||||
}
|
||||
} @else {
|
||||
@error "Invalid unit: #{$size} - must be px";
|
||||
@error "Invalid size: #{$size} - unit must be 'px'";
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,8 +56,12 @@
|
||||
///
|
||||
@function px2rem($size, $base: 10px) {
|
||||
@if unit($size) == px {
|
||||
@return ($size / $base) * 1.0rem;
|
||||
@if unit($base) == px {
|
||||
@return ($size / $base) * 1.0rem;
|
||||
} @else {
|
||||
@error "Invalid base: #{$base} - unit must be 'px'";
|
||||
}
|
||||
} @else {
|
||||
@error "Invalid unit: #{$size} - must be px";
|
||||
@error "Invalid size: #{$size} - unit must be 'px'";
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
// Theme colors
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Headlines
|
||||
// $md-theme-h1-color: $md-color-black--light;
|
||||
// $md-theme-h2-color: $md-color-black;
|
||||
// $md-theme-h3-color: $md-color-black;
|
||||
// $md-theme-h4-color: $md-color-black;
|
||||
// $md-theme-h5-6-color: $md-color-black--light;
|
||||
//
|
||||
// $md-theme-hr-color: $md-color-black--lighter;
|
Loading…
Reference in New Issue
Block a user