You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invocations of `z-index` within an arithmetic expression will be appended with a comment for review and manual migration.
194
+
Generally in these instances you'll want to wrap the suggested code change in a `calc` however this may defer on a case by case basis in your codebase.
195
+
196
+
```diff
197
+
.decl-3 {
198
+
+ /* polaris-migrator: Unable to migrate the following expression. Please upgrade manually. */
199
+
+ /* z-index: var(--p-z-1) + 1 */
200
+
z-index: z-index(content) + 1
201
+
}
202
+
```
203
+
204
+
Invocations of `z-index` with a custom sass map property, will also be appended with a comment for review and manual migration.
205
+
206
+
```diff
207
+
.decl-3 {
208
+
+ /* polaris-migrator: Unable to migrate the following expression. Please upgrade manually. */
209
+
+ /* z-index: map.get($custom-sass-map, modal) */
210
+
z-index: z-index(modal, $custom-sass-map)
211
+
}
212
+
```
213
+
214
+
In these cases you may also want to run `npx sass-migrator module <path> --migrate-deps --load-path <load-path>` to ensure that
215
+
`map.get` is in scope\*\*.
216
+
217
+
Be aware that this may also create additional code changes in your codebase, we recommend running this only if there are large number of instances of migrations from `z-index` to `map.get`. Otherwise it may be easier to add `use 'sass:map'` to the top of your `.scss` file manually.
0 commit comments