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

CSS/Style tags minification/whitespace control #228

Open
gxtaillon opened this issue Jun 26, 2021 · 1 comment
Open

CSS/Style tags minification/whitespace control #228

gxtaillon opened this issue Jun 26, 2021 · 1 comment
Labels
css3-parser At css3 parser enhancement New feature or request html5-parser At html5 parser

Comments

@gxtaillon
Copy link

Hello,

I'm trying to remove whitespace from a <style></style> tag inside an hbs file and only the transformation seems to be a trim, even with ~~[0].

eg:
Source:

<style>
@media (prefers-color-scheme: dark) {
body {
  color:#fff;
  background:#333
}
a:visited {
  color: #BB86FC !important
}
}
</style>

Target:

<style>@media(prefers-color-scheme:dark){body{color:#fff;background:#333}a:visited{color:#BB86FC!important}}</style>

Thank you

[0] https://yarte.netlify.app/templating/whitespace_control.html

@zzau13
Copy link
Owner

zzau13 commented Jun 27, 2021

It does not have support for minifying css. You can remove blanks with comments. Or you can use another tool to minify it earlier.

In the future you will have support for it. I leave the issue open.

@zzau13 zzau13 added enhancement New feature or request html5-parser At html5 parser css3-parser At css3 parser labels Jun 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css3-parser At css3 parser enhancement New feature or request html5-parser At html5 parser
Projects
None yet
Development

No branches or pull requests

2 participants