Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env() breaks libsass #2521

Closed
danwood opened this issue Jan 2, 2018 · 3 comments
Closed

env() breaks libsass #2521

danwood opened this issue Jan 2, 2018 · 3 comments

Comments

@danwood
Copy link

danwood commented Jan 2, 2018

Libsass doesn’t understand the new “env” that Apple has introduced into the syntax.

/* Use @supports per https://webkit.org/blog/7929/designing-websites-for-iphone-x/ */
@supports(padding: max(0px)) {
    .post {
        padding-left: max(1em, env(safe-area-inset-left));
        padding-right: max(1em, env(safe-area-inset-right));
    }
}

Actual results

Libsass: Error: "env(safe-area-inset-left)" is not a number for `max'
      on line 231 of /path/to/css/main.scss
      padding-left: max(1em, env(safe-area-inset-left));
 ----------------------^

Expected result

There should be no error.

version info:

Sass 3.5.1 (Bleeding Edge)

@mgreter
Copy link
Contributor

mgreter commented Jan 11, 2018

IMO this is also not supported by ruby sass, tested with Sass 3.5.5 (Bleeding Edge).

Error: "env(safe-area-inset-left)" is not a number for `max'

@mgreter
Copy link
Contributor

mgreter commented Jan 11, 2018

This should probably be reported upstream //CC @nex3 @chriseppstein

@nex3
Copy link
Contributor

nex3 commented Jan 12, 2018

This is a duplicate of sass/sass#2378. The issue here isn't really env(), it's that CSS introduced max() and min() functions that work very differently than the existing Sass functions with the same names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants