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

Update mixed declarations in scss files to prepare for future breaking changes #1961

Open
3 tasks
scottqueen-bixal opened this issue Nov 21, 2024 · 0 comments
Open
3 tasks
Assignees
Labels
V1 Final V1 handoff work

Comments

@scottqueen-bixal
Copy link
Collaborator

scottqueen-bixal commented Nov 21, 2024

Description

https://sass-lang.com/documentation/breaking-changes/mixed-decls/

how to expose the warning:

  • uncomment silenceDeprecations in vite.config.mjs file
  css: {
    postcss: poscssConfig,
    preprocessorOptions: {
      scss: {
        api: 'modern-compiler',
        implementation: sassEmbedded,
        // silenceDeprecations: ['mixed-decls'],
      },
    },
  },
  • npm run start

expect to see these warnings:

example:

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 `& {}`.

More info: https://sass-lang.com/d/mixed-decls


121 │ ┌   @media (width >= $desktop) {
122 │ │     font-size: rem(17px);
123 │ │   }
    │ └─── nested rule
... │
138 │     font-size: rem(17px);
    │     ^^^^^^^^^^^^^^^^^^^^ declaration

    ../../../../src/shared/styles/mixins/_index.scss 138:3      list-items()
    ../../../../src/shared/components/Summary/_index.scss 13:7  root stylesheet
  • let's use visual regression to ensure that we are not introducing any issues after the refactor

Acceptance Criteria

  • all warnings are gone
  • no visual style changes are present in regression testing
@scottqueen-bixal scottqueen-bixal self-assigned this Nov 21, 2024
@scottqueen-bixal scottqueen-bixal added the V1 Final V1 handoff work label Dec 6, 2024
@scottqueen-bixal scottqueen-bixal removed their assignment Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V1 Final V1 handoff work
Projects
None yet
Development

No branches or pull requests

2 participants