-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
SASS: Replace @import #21151
Comments
For it to work properly, we'll also need to have PatternFly replace SASS In other words, this could be a big ball of busywork for no gain, just to keep up with the stack. 😒 At least SASS compiles to CSS, and CSS is what we ship, so it should be fine to lock down SASS to 2.x for now. So, for the meantime, I'm suggesting we:
|
Oh, this is also going to affect SASS "global built-in function calls". I'm not sure if that will affect us. The |
More details on a recent blog entry: https://sass-lang.com/blog/import-is-deprecated/ Disabling the warnings is supposed to be done with a |
OK, it looks like SASS is at 1.80.3 currently. https://www.npmjs.com/package/sass The rule should be < 3. Unless 3 is coming out any time soon, I suggest we squash the error from spewing out to the console, lock down SASS to be < 3, and move forward like ostriches with our heads in the sand on this. (That is: Ignore it for now.) It turns out PatternFly did deal with at least similar migration pain @ patternfly/patternfly#4096 (comment), where they even had to get the SASS main dev involved to help them migrate. But that was because of Meanwhile, I'm looking at the SASS code in node_modules and see |
Yep, PatternFly currently has a PR for PF6 to adapt to a lot of breaking changes @ patternfly/patternfly#7150 — it looks like they've mainly migrated away from |
sass 1.80 (and 2.x) introduces tons of "@import rules are deprecated". These are unfixable on our side due to PatternFly using them extensively. We don't need any new sass features, so stick to 1.79.x. Explicitly not ignore 3.x (which will drop @import) to get a reminder in the future to try and clean this up again. Fixes cockpit-project#21151
sass 1.80 (and 2.x) introduces tons of "@import rules are deprecated". These are unfixable on our side due to PatternFly using them extensively. We don't need any new sass features, so stick to 1.79.x. Explicitly not ignore 3.x (which will drop @import) to get a reminder in the future to try and clean this up again. Fixes #21151
Reverts commit ebdef70. See cockpit-project/cockpit#21151 We already configured this in dependabot (commit fac7a38), but that landed too late, after the dependabot run.
Reverts commit ebdef70. See cockpit-project/cockpit#21151 We already configured this in dependabot (commit fac7a38), but that landed too late, after the dependabot run.
See cockpit-project/cockpit#21151 We already configured this in dependabot (commit fac7a3824b), but that landed too late, after the dependabot run.
See cockpit-project/cockpit#21151 We already configured this in dependabot (commit fac7a3824b), but that landed too late, after the dependabot run.
sass 1.80 (and 2.x) introduces tons of "@import rules are deprecated". These are unfixable on our side due to PatternFly using them extensively. We don't need any new sass features, so stick to 1.79.x. Explicitly not ignore 3.x (which will drop @import) to get a reminder in the future to try and clean this up again. Fixes cockpit-project#21151
Building currently shows warnings like this:
I remember I worked with Katerina to try to remove
@import
a while ago, and it wasn't easy (which is why we're still using@import
). There's supposedly an automatic migration now, but I'm guessing we'll hit the same problems we hit back then, where it isn't a 1:1 replacement.This means we might need to completely refactor how our CSS is combined together... which could be a huge pain. We'd need to use the SASS
@use
and@forward
rules instead.Details @ https://sass-lang.com/documentation/breaking-changes/import/#automatic-migration
Note: This isn't about CSS
@import
, which SASS will always support, but the custom version of@import
that SASS implements, which lets you import SASS files for inclusion (more like embedding, with dependency tress), instead of soft linking CSS files together on the browser-level.The text was updated successfully, but these errors were encountered: