27Aug

Fancybox sass compile error “max”

Quick one about fancybox. if you import the library and get an error type env(safe-area-inset-right)” is not a number for `max’. Here is a quick fix

How to solve the SASS compilation error with the new version on fancybox

Here is the error I got

Error in plugin 'sass'
Message:
assets/sass/_fancybox.scss
Error: "env(safe-area-inset-right)" is not a number for `max'
on line 493 of assets/sass/_fancybox.scss
>> padding: 75px max(44px, env(safe-area-inset-right)) max(25px, env(safe

A simple way to fix it is to redefine missing functions. I put them at the top of my fancybox scss file.

@function max($numbers...) {
@return m#{a}x(#{$numbers})
}

@function min($numbers...) {
@return m#{i}n(#{$numbers})
}
Subscribe
Notify of

1 Comment
Oldest
Newest
Inline Feedbacks
View all comments
Thavi Lang
4 years ago

my hero