Skip to content
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

Consider special-casing properties where slash-separated numbers are common #213

Open
jathak opened this issue Nov 9, 2021 · 2 comments
Labels
division Part of the division migrator enhancement New feature or request

Comments

@jathak
Copy link
Member

jathak commented Nov 9, 2021

The division migrator errs on the side of overcorrecting /-separated values to math.div, since math.div still supports concatenation for non-numerical values.

Since these values most commonly occur inside grid and similar properties, we may want to consider special-casing them in the migrator to leave them alone.

@jathak jathak added the division Part of the division migrator label Nov 9, 2021
@dahei
Copy link

dahei commented Nov 29, 2021

I faced exactly that issue after running sass-migrator division on my sass files.

CleanShot 2021-11-29 at 14 08 09@2x

@BPScott
Copy link

BPScott commented Jan 21, 2022

Another edge case where / is used as a separator that triggers a migration that should not occur

.foo {
  background: repeating-conic-gradient(
      var(--p-surface) 0% 25%,
      var(--p-surface-neutral-subdued) 0% 50%
    )
-    50% / var(--p-space-4) var(--p-space-4);
+    math.div(50%, var(--p-space-4)) var(--p-space-4);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
division Part of the division migrator enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants