scss: fix check for positive $cell-border-radius (#39883)

This commit is contained in:
Thomas Jund 2020-02-27 15:44:47 +01:00 committed by Frédéric Péters
parent 8ac1d03e3e
commit d2b35d452f
2 changed files with 6 additions and 1 deletions

View File

@ -73,7 +73,7 @@ div.block {
color: $cell-color;
box-sizing: border-box;
border: $cell-border;
@if $cell-border-radius {
@if is-positive-number($cell-border-radius) {
border-radius: $cell-border-radius;
overflow: hidden;
}

View File

@ -33,3 +33,8 @@ $black: #000000 !default;
@if type-of($part) == number { @return $part; } }
@return 0;
}
// Check if value is a number > 0;
@function is-positive-number($value) {
@return type-of($value) == 'number' and $value > 0;
}