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

Cannot use constant values #42

Closed
jaehanley opened this issue Sep 18, 2017 · 3 comments
Closed

Cannot use constant values #42

jaehanley opened this issue Sep 18, 2017 · 3 comments

Comments

@jaehanley
Copy link

iOS 11 Safari added support for constant declarations for safe areas, eg constant(safe-area-inset-bottom) which returns a dynamic value for the amount of margin or padding needed to avoid unsafe areas. Currently, when a constant value is used in calc, it causes postcss to fail generating the following error:

Expecting 'SUB', 'LPAREN', 'NESTED_CALC', 'NUMBER', 'CSS_VAR', 'LENGTH', 'ANGLE', 'TIME', 'FREQ', 'RES', 'EMS', 'EXS', 'CHS', 'REMS', 'VHS', 'VWS', 'VMINS', 'VMAXS', 'PERCENTAGE', got 'PREFIX']
message: 'Parse error on line 1:\nconstant(safe-area-i\n^\nExpecting \'SUB\', \'LPAREN\', \'NESTED_CALC\', \'NUMBER\', \'CSS_VAR\', \'LENGTH\', \'ANGLE\', \'TIME\', \'FREQ\', \'RES\', \'EMS\', \'EXS\', \'CHS\', \'REMS\', \'VHS\', \'VWS\', \'VMINS\', \'VMAXS\', \'PERCENTAGE\', got \'PREFIX\'',
showStack: false,
showProperties: true,
plugin: 'gulp-postcss',
 __safety: { toString: [Function: bound ] } }
@jaehanley
Copy link
Author

Seems to be an issue upstream, offhand from reduce-css-calc

@zoosky
Copy link

zoosky commented Aug 2, 2018

Using Framework7 affected by this bug. See framework7io/framework7#2539

@andyjansson andyjansson mentioned this issue Oct 3, 2018
@andyjansson
Copy link
Contributor

Should be fixed in latest release.

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

No branches or pull requests

3 participants