Skip to content

Commit

Permalink
Add dollar-variables to order/order Stylelint rule
Browse files Browse the repository at this point in the history
This way we've been able to detect a bug where we were assigning a value
to the `$global-left` variable instead of assigning it to either the
`left` or `right` properties. This, however, was the right behavior,
since adding a `left` indentation to the link wasn't correct because its
parent element already had padding on the sides.
  • Loading branch information
javierm committed Apr 2, 2024
1 parent 2869f53 commit 1eba568
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions .stylelintrc.yml
Expand Up @@ -40,6 +40,7 @@ rules:
shorthand-property-no-redundant-values: true
value-no-vendor-prefix: true
order/order:
- dollar-variables
- type: at-rule
name: extend
- type: at-rule
Expand Down
4 changes: 1 addition & 3 deletions app/assets/stylesheets/layout/skip_to_main_content.scss
Expand Up @@ -8,13 +8,11 @@
}

&:focus {
@include body-colors;

$outline-size: $focus-inner-width + $focus-middle-width + $focus-outer-width;
@include body-colors;

padding: 0.4rem;
position: absolute;
$global-left: $outline-size;
top: $outline-size;
z-index: 1000;
}
Expand Down

0 comments on commit 1eba568

Please sign in to comment.