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

Could not minify CSS with container query #62

Open
MattiasJa opened this issue Aug 30, 2023 · 0 comments
Open

Could not minify CSS with container query #62

MattiasJa opened this issue Aug 30, 2023 · 0 comments

Comments

@MattiasJa
Copy link

MattiasJa commented Aug 30, 2023

Hi,
fail trying to minify css with some container queries.

Reproduce by adding this minimal css :

@container small (width < 768px) {
h2 {
width: 100%;
}
}

while this empty query pass :

@container small (width < 768px) {
}

Stack:

 [babel-plugin-template-html-minifier] Could not minify CSS: Unexpected '}' at 6:8., Invalid character(s) '}' at 6:8. Ignoring., Invalid property name 'h2 {
            width' at 2:10. Ignoring.
  4 |     return [
  5 |         style,
> 6 |         css`@container small (width < 768px) {
    |         ^
  7 |           h2 {
  8 |             width: 100%;
  9 |           }
    at File.buildCodeFrameError (...path...node_modules\@babel\core\lib\transformation\file\file.js:205:12)
    at NodePath.buildCodeFrameError (...path...node_modules\@babel\traverse\lib\path\index.js:101:21)
    at minify (...path...node_modules\babel-plugin-template-html-minifier\lib\index.js:85:15)
    at handleSimple (C:\Users\MattiasJ\git\sccc\node_modules\babel-plugin-template-html-minifier\lib\index.js:114:3)
    at PluginPass.TaggedTemplateExpression (...path...node_modules\babel-plugin-template-html-minifier\lib\index.js:211:6)
    at newFn (...path...node_modules\@babel\traverse\lib\visitors.js:159:14)
    at NodePath._call (...path...node_modules\@babel\traverse\lib\path\context.js:46:20)
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

1 participant