Ignore percentage values for compare in maps

This commit is contained in:
Roman O 2018-06-08 16:37:33 +03:00 committed by Mark Otto
parent 97eea3b2bf
commit fad49e710e
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@
$prev-key: null;
$prev-num: null;
@each $key, $num in $map {
@if $prev-num == null {
@if $prev-num == null or unit($num) == "%" {
// Do nothing
} @else if not comparable($prev-num, $num) {
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";