Skip to content

Commit

Permalink
Move properties before nested selector to resolve deprecation warnings
Browse files Browse the repository at this point in the history
SASS has been emitting a deprecation warning because of a coming
change in SASS behaviour:

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

In `NewLexemeForm.vue` we were using the `&` parent selector
before applying additional properties to the `.wbl-snl-form` element.

In this specific case, moving the parent selector after the
property declarations has no effect on the semantics of the SASS or
the generated CSS, and resolves the deprecation warning.

Bug: T372250
  • Loading branch information
codders committed Nov 20, 2024
1 parent eb1b9f2 commit e73c463
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/NewLexemeForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@ export default {
@import '@wikimedia/codex-design-tokens/theme-wikimedia-ui';
.wbl-snl-form {
& > * + * {
margin-top: var( --dimension-layout-xsmall );
}
// Box model
padding: var( --dimension-layout-small );
Expand All @@ -207,6 +203,10 @@ export default {
border-width: $border-width-base;
border-radius: $border-radius-base;
border-color: $border-color-muted;
& > * + * {
margin-top: var( --dimension-layout-xsmall );
}
}
.wbl-snl-copyright {
Expand Down

0 comments on commit e73c463

Please sign in to comment.