pharos icon indicating copy to clipboard operation
pharos copied to clipboard

Fix SCSS deprecation warnings

Open daneah opened this issue 1 year ago • 0 comments

The problem

On the latest version of sass, we now get deprecation warnings about certain syntax that is quite present in the code base:

Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.

The solution

Update syntax to fix warnings. Either of the suggested approaches in the warning should be amenable in our code, but may need case-by-case consideration for which is more readable and so on. In very rare cases, changes may create a specificity issue—we should lean on Chromatic to let us know.

Additional information

Sass docs

daneah avatar Jul 22 '24 13:07 daneah