enketo / enketo

Enketo web forms monorepo
Apache License 2.0
9 stars 15 forks source link

SCSS deprecation warning for / outside of calc(...) #12

Open hansmbakker opened 7 months ago

hansmbakker commented 7 months ago

Describe the bug When consuming the enketo-core SCSS using Vite, I get a lot of deprecation warnings about / being used in SCSS as a division operator outside calc(...).

Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

The explanation for this breaking change is here.

An overview of all occurrences is here.

To Reproduce

  1. Create a Vite project using npm create vite@latest
  2. Add enketo-core and sass as dependencies to package.json
  3. Run npm install and npm run dev
  4. Add <link rel="stylesheet" href="/node_modules/enketo-core/src/sass/plain/plain.scss" /> to your index.html

Expected behavior No deprecation warnings when consuming enketo-core

Screenshots If applicable, add screenshots to help explain your problem.

image
hansmbakker commented 7 months ago

I created a start at https://github.com/hansmbakker/enketo/tree/fix/scss-math-div but I believe there are more occurrences across enketo. Feel free to use my branch.

lognaturel commented 7 months ago

Thank you!

hansmbakker commented 5 months ago

A possible solution could be to run sass-migrator, for example like

sass-migrator division packages/enketo-core/src/**/*.scss