d974ac47d9
Fix css fallback of max function in chrome 76. Original-merge: d4b55ec67a7e749ba60597cda52e922ce45e3d87 Merged-by: thornbill <thornbill@users.noreply.github.com> Backported-by: thornbill <thornbill@users.noreply.github.com>
13 lines
453 B
SCSS
13 lines
453 B
SCSS
// This mixin is used to provide a fallback for `max()` function in older browsers
|
|
// (e.g. Chrome 76 that is found in devices like Samsung 2021 TVs). The mixin ensures
|
|
// a default value is applied to a property while using `max()` only if supported.
|
|
@mixin conditional-max($property, $default, $max-value) {
|
|
& {
|
|
#{$property}: $default;
|
|
}
|
|
|
|
@supports (width: max(1px, 1px)) {
|
|
#{$property}: max($max-value, $default);
|
|
}
|
|
}
|