zzau13 / yarte

Yarte stands for Yet Another Rusty Template Engine
https://yarte.netlify.com
Apache License 2.0
279 stars 15 forks source link

CSS/Style tags minification/whitespace control #228

Open gxtaillon opened 3 years ago

gxtaillon commented 3 years ago

Hello,

I'm trying to remove whitespace from a 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 commented 3 years ago

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.