Skip to content

Conversation

@Semigradsky
Copy link
Collaborator

Fix #34

@Semigradsky Semigradsky requested a review from ben-eb November 9, 2017 09:21
@Semigradsky
Copy link
Collaborator Author

@andyjansson Hi, could you check changes?

constant/env is not approved yet
w3c/csswg-drafts#1693


(calc) return 'NESTED_CALC';
(var\([^\)]*\)) return 'CSS_VAR';
([a-z]+\([a-z0-9-]+\)) return 'UNKNOW_FUNCTION'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex doesn't seem very resilient to me. Furthermore it might be worth normalising this and the CSS variable stuff to a single thing. \cc @MoOx what do you think?

| css_variable { $$ = $1; }
| css_value { $$ = $1; }
| value { $$ = $1; }
| UNKNOW_FUNCTION { $$ = { type: 'Unknow', value: $1 }; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the name is to be kept, it should be "unknown function". But I'm leaning towards normalisation, so maybe just "function".

@MoOx
Copy link
Owner

MoOx commented Sep 20, 2018

I just saw this pr after merging another workaround. Is this PR still relevant?

@MoOx
Copy link
Owner

MoOx commented Sep 20, 2018

(workaround have constant and env hardcoded, see #48)

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

Successfully merging this pull request may close these issues.

Constant values not supported

4 participants