We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There's a problem with function "moveImportsToTop": If it converts following CSS:
@charset "UTF-8";@import url(//fast.fonts.net/t/1.css?apiType=...);.aa{display:block}
The resulting (invalid) CSS is this:
@import url(//fast.fonts.net/t/1.css?apiType=...);@charset "UTF-8".aa{display:block}
This is invalid: "UTF-8".aa
"UTF-8".aa
It seems the problem is the (;?) in the regex:
(;?)
preg_match_all('/(;?)(@import (?<url>url\()?(?P<quotes>["\']?).+?(?P=quotes)(?(url)\)));?/', $content, $matches)
This results in $matches[0]:
array(1) { [0]=> string(98) ";@import url(//fast.fonts.net/t/1.css?apiType=...);" }
The prefixed semicolon seems wrong.
The text was updated successfully, but these errors were encountered:
I have the same problem. I solved it using: $Data_CSS = preg_replace('/@charset "(.*?)"/','@charset "$1";', $Data_CSS);
$Data_CSS = preg_replace('/@charset "(.*?)"/','@charset "$1";', $Data_CSS);
Sorry, something went wrong.
As of version 1.3.73, this remains an issue.
@charset "UTF-8"; @import 'https://fonts.googleapis.com/css?family=Open+Sans:300,400italic,400,700'; :root { --max-width: 1280px; }
minifies to become:
@import "https://fonts.googleapis.com/css?family=Open+Sans:300,400italic,400,700";@charset "UTF-8":root{--max-width:1280px;}
which invalidates the :root element.
:root
No branches or pull requests
There's a problem with function "moveImportsToTop":
If it converts following CSS:
The resulting (invalid) CSS is this:
This is invalid:
"UTF-8".aa
It seems the problem is the
(;?)
in the regex:This results in $matches[0]:
The prefixed semicolon seems wrong.
The text was updated successfully, but these errors were encountered: