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

Default values for CSS vars fails #3190

Closed
eloypastor opened this issue Dec 11, 2015 · 3 comments
Closed

Default values for CSS vars fails #3190

eloypastor opened this issue Dec 11, 2015 · 3 comments
Assignees
Labels

Comments

@eloypastor
Copy link

Default values for CSS vars fails when a default value es complex, like a gradient for example.

See this project

For this style

background: var(--fx-webkit-background, -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,0,0,.65)), color-stop(100%,rgba(0,0,255,.65))));

the style result is

background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,0,0,.65)), color-stop(100%,rgba(0,0,255,.65)))));

The last two parenthesis will be removed.

@zoechi
Copy link

zoechi commented Dec 19, 2015

probably a dup of #3221

@dfreedm
Copy link
Member

dfreedm commented Jun 15, 2016

Looks like this case is still a problem.

@dfreedm dfreedm added the p2 label Jun 15, 2016
@dfreedm
Copy link
Member

dfreedm commented Jun 17, 2016

The variable matcher regex is at fault here, as it will match up until the comma between color stops. This regex is at peak complexity, so I think we will have to make a small custom state machine to replace it.

Visualization: http://regexr.com/3dl9j

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

No branches or pull requests

5 participants