container-query-polyfill
container-query-polyfill copied to clipboard
'container-type' is overwritten
My container Class is using:
container-type: inline-size;
container-type: style;
but if this plugin is active the first instance is always changed to
container: inline-size;
the plugin is still working somehow, despite it is throwing an error,
but changing container-type: size
to contain: size
can cause
some serious problems (and in my case it does).
https://developer.mozilla.org/en-US/docs/Web/CSS/contain
Can you give me a small reproduction case in a gist or something where the results are different with the polyfill than with native CQs in Chrome Canary or something?
Yup
.c-features {
container-type: size;
}
@container (min-width: 768px) {
.c-features {
& > li {
max-width: 500px;
}
}
}
Oh, I read it again and I'll prepare it soon - but for now you can test this one. Even this is enough to see the overwrite.
Here it is: https://gist.github.com/343f39faf18dd0c009adb9d326c0fe85#file-index-html
This issue should be resolved by the newest version of the polyfill (currently in alpha). Please give it a try and let me know if you run into any further issues.
Thank you!