Skip to content

Commit

Permalink
refactor: Simplify SCSS imports and usage for better clarity and cons…
Browse files Browse the repository at this point in the history
…istency
  • Loading branch information
dlnr committed Dec 13, 2024
1 parent 74af110 commit d60b7e8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/css/src/components/margin/margin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*/

@use "sass:map";
@use "../../common/size";
@use "../../common/size" as *;

@each $size in map.keys(size.$ams-sizes) {
@each $size in map.keys($ams-sizes) {
@if $size != "no" {
.ams-mb--#{$size} {
margin-block-end: var(--ams-margin-#{$size}) !important;
Expand Down
8 changes: 4 additions & 4 deletions packages/css/src/components/radio/radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/input-label-focus";
@use "../../common/hide-input";
@use "../../common/input-label-focus" as *;
@use "../../common/hide-input" as *;
@use "../../common/text-rendering" as *;

.ams-radio__input {
@include hide-input.hide-input;
@include input-label-focus.input-label-focus;
@include hide-input;
@include input-label-focus;
}

// Default
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/row/row.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/size";
@use "../../common/size" as *;

.ams-row {
display: flex;
flex-direction: row;
gap: var(--ams-row-gap-md);
}

@each $size, $label in size.$ams-sizes {
@each $size, $label in $ams-sizes {
@if $size != "md" {
.ams-row--gap-#{$label} {
gap: var(--ams-row-gap-#{$size});
Expand Down
8 changes: 4 additions & 4 deletions packages/css/src/components/switch/switch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* Copyright Gemeente Amsterdam
*/

@use "../../common/input-label-focus";
@use "../../common/hide-input";
@use "../../common/input-label-focus" as *;
@use "../../common/hide-input" as *;

.ams-switch__input {
@include hide-input.hide-input;
@include input-label-focus.input-label-focus;
@include hide-input;
@include input-label-focus;
}

.ams-switch__label {
Expand Down

0 comments on commit d60b7e8

Please sign in to comment.