overthesun / simoc-web

This is the web interface to SIMOC
https://ngs.simoc.space/
Other
3 stars 0 forks source link

Replace deprecated `@import` rules with `@use` #868

Closed ezio-melotti closed 6 days ago

ezio-melotti commented 6 days ago

This PR fixes a series of deprecation warnings that look like:

Deprecation Warning: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import

  ╷
2 │     @import '../../sass/components/configuration-input';
  │             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
    src/components/configuration/Greenhouse.vue 2:13  root stylesheet

by replacing @import with @use. @use creates a namespace, which means variables defined in the CSS being imported need to be prefixed, but since we don't have any variable, a regular replace worked. While I was at it, I also fixed the style conventions of the affected files to make them more consistent.

This PR fixes all the remaining deprecation warnings, following up on: