-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Broken auto prefixing #330
Comments
I've found an option I think this library should take into account, that there can be variables in place of values, with any variable name, and they should not match regular expressions. |
PRs are welcome. |
Of course, if I were fluent in CSS and differences in browser ._. This library's code looks like maintainers put a significant efforts into its minimal size, and it is not always obvious what was ment by one thing or another. Regarding this issue, it is only my guess, that regular expression I dare say that this library is not very friendly for external contributors, who are unfamiliar with existing code base and chosen solutions. |
I apologize, if my messages may looks like demands or requirements. They are not :) I just maybe a bit frustrated, but mostly on Linaria library, whose developers have chosen Stylis without proper investigation and without opt-in way to disable vendor prefixing. I'm sure this library is great, as well as Linaria, they maybe just don't fit each other completely, with a way Linaria works. And of course I understand that open source is not paid work. |
Well, Stylis is a popular choice for CSS-in-JS libraries. A dependent can't ever predict all the interactions with its dependencies so I wouldn't blame Linaria maintainer here for not doing "a proper investigation". This looks like a bug and nothing more than that - those will always happen in the software.
Yeah, this ☝️ I don't have great incentives to work on fixing this right now - my mind is just elsewhere. If your company cares about fixing this they could sponsor Sultan/me/Stylis to get this job done. |
Hello!
I'm using Linaria, which uses Stylis under the hood for auto prefixing.
Linaria is a zero-runtime CSS in JS, works by transforming it to CSS variables.
CSS variables are generated.
After some updates my build become broken, it generates line like:
note that
-mjustify;
which is incorrect.After hours of investigating I've narrowed issue to Styles, exactly this lines
stylis/src/Prefixer.js
Lines 78 to 79 in 0990417
First (inner)
replace
generates stringSecond (outer)
replace
generates this broken linebecause regular expression
/s.+-b[^;]+/
(which I assume should matchspace-between
value) matchess-flex-pack:var(--b
part of first string.The text was updated successfully, but these errors were encountered: