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

BAU: Prevent Sass mixed declaration warnings #2090

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Conversation

gtvj
Copy link
Collaborator

@gtvj gtvj commented Sep 23, 2024

What

The CSS Working Group has changed the way CSS handles declarations mixed with nested rules. Sass has been updated to reflect this change and any declarations that appear after nested rules are deprecated in Dart Sass distributions > 1.77.7 (See Sass documentation)

As a result of this we have been seeing multiple deprecation warnings when compiling our Sass.

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

This commit simply changes the code in a block that is specific to the password entry component so that a nested rule appears after declarations in the same block.

Screenshot after change

Screenshot of password creation screen

How to review

  1. Code review
  2. Run the branch locally and - with the browser cache disabled - proceed through a sign in or account creation journey until you encounter a password entry field. Check that it looks OK in all its states (empty, not empty, password shown, password hidden) and at different media query breakpoints.

The CSS Working Group has changed the way CSS handles declarations
mixed with nested rules. Sass has been updated to reflect this change
and any declarations that appear after nested rules are deprecated
in Dart Sass distributions > 1.77.7 (See [^1] below)

As a result of this we have been seeing multiple deprecation warnings
when compiling our Sass. This commit simply changes the code so that
a nested rule appears after declarations in the same block.

[^1] https://sass-lang.com/documentation/breaking-changes/mixed-decls/
@gtvj gtvj requested review from a team as code owners September 23, 2024 14:02
Copy link

sonarcloud bot commented Sep 23, 2024

@gtvj gtvj merged commit b03ffcc into main Sep 24, 2024
7 checks passed
@gtvj gtvj deleted the BAU/fix-sass-errors branch September 24, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants