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

and another one :) #4

Open
tjmcewan opened this issue Jan 12, 2018 · 4 comments
Open

and another one :) #4

tjmcewan opened this issue Jan 12, 2018 · 4 comments

Comments

@tjmcewan
Copy link

Could we maybe have a template.conf flag to disable parsing of plain CSS?

site:14728      -webkit-backdrop-filter: saturate(200%) blur(10px)

ExecuteError ARG_COUNT: Function saturate requires at least 2 args, found 1 

Thanks!

@phensley
Copy link
Contributor

LESS has its own saturate function which takes 2 arguments: a color value and a percentage. To bypass this and use CSS saturate you can escape:

#elem {
  color: saturate(#abc, 150%);
  -webkit-backdrop-filter: ~'saturate(200%)' blur(10px)
}

Will output:

#elem {
  color: #7bf;
  -webkit-backdrop-filter: saturate(200%) blur(10px);
}

@tjmcewan
Copy link
Author

ok. seems like I should just wrap my entire file with ~' '. thanks.

@phensley
Copy link
Contributor

@tjmcewan The compiler currently doesn't support passing through uses of the CSS saturate function without escaping. If that function is widely used in your file, escaping every instance could be a bit of a hassle...

Specifying a workaround in template.conf by itself wouldn't completely solve the issue since the compiler is also used to parse and minify plain CSS stylesheets. I'll open a ticket for the application and see if there is a quicker way the LESS bypass in template.conf could be implemented.

@adamhake
Copy link

@phensley any update on this? It would be really great to bypass LESS compilation given the wealth front-end build tooling out there.

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