You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pagespeed.apache.org by GitBox <gi...@apache.org> on 2019/12/25 10:22:38 UTC

[GitHub] [incubator-pagespeed-mod] andreiglingeanu opened a new issue #1971: rewrite_css filter minifies CSS Custom Properties

andreiglingeanu opened a new issue #1971: rewrite_css filter minifies CSS Custom Properties
URL: https://github.com/apache/incubator-pagespeed-mod/issues/1971
 
 
   Hello,
   
   With the `rewrite_css` filter enabled, [CSS Custom Property](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) definitions are broken -- their definition is lowercased. This is wrong because the css variables [are case sensitive](https://drafts.csswg.org/css-variables/#apis). That is variables `--test` and `--Test` are two different variables.
   
   Inline `<style>` tag before:
   
   ```
   <style>
   	:root {
   		--testMeNow: 123px;
   	}
   </style>
   ```
   
   Inline `<style>` after:
   
   ```
   <style>:root{--testmenow:123px}</style>
   ```
   
   This obviously brokes the page because in actual CSS files the variables are referenced with `var(--testMeNow)` (no lowercase).
   
   Now I understand that this issue might be caused by the [`css_parser`](https://github.com/apache/incubator-pagespeed-mod/tree/master/third_party/css_parser/src) and please let me know if I have to redirect the report somewhere else -- I don't mind doing the legwork.
   
   The mod-pagespeed version is `1.13.35.2-0` (checked from the `X-Mod-Pagespeed` response header).
   
   Please advice on how to better move forward with this. Obviously, I would love to keep the `rewrite_css` filter enabled but because of this issue I have to keep it off for now.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-mod] oschaaf commented on issue #1971: rewrite_css filter minifies CSS Custom Properties

Posted by GitBox <gi...@apache.org>.
oschaaf commented on issue #1971: rewrite_css filter minifies CSS Custom Properties
URL: https://github.com/apache/incubator-pagespeed-mod/issues/1971#issuecomment-569552147
 
 
   Thanks for the report; I guess someone will have to dive into the css parser to figure out how to fix this.
   Contributions welcome! :-)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services