Skip to content

Commit

Permalink
refactor(scss): ♻️ rename reset mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenSibon committed Nov 1, 2024
1 parent 7fa06e6 commit ae1acf2
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions packages/css/src/components/blockquote/blockquote.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@import "../../common/hyphenation";
@import "../../common/text-rendering";

@mixin reset {
@mixin reset-blockquote {
box-sizing: border-box;
margin-block: 0;
margin-inline: 0;
Expand All @@ -23,7 +23,7 @@

@include hyphenation;
@include text-rendering;
@include reset;
@include reset-blockquote;

&::before {
content: open-quote;
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/breadcrumb/breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@import "../../common/text-rendering";

@mixin reset {
@mixin reset-list {
box-sizing: border-box;
margin-block: 0;
padding-inline: 0;
Expand All @@ -23,7 +23,7 @@
break-inside: avoid;

@include text-rendering;
@include reset;
@include reset-list;
}

.ams-breadcrumb__item {
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/date-input/date-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@import "../../common/text-rendering";

@mixin reset {
@mixin reset-input {
-webkit-appearance: none; // Reset appearance for Safari < 15.4
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
border: 0;
Expand Down Expand Up @@ -36,7 +36,7 @@
touch-action: manipulation;

@include text-rendering;
@include reset;
@include reset-input;

&:hover {
box-shadow: var(--ams-date-input-hover-box-shadow);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@import "../../common/breakpoint";
@import "../../common/text-rendering";

@mixin reset {
@mixin reset-ol {
box-sizing: border-box;
margin-block: 0;
}
Expand All @@ -20,7 +20,7 @@
line-height: var(--ams-description-list-line-height);
row-gap: var(--ams-description-list-row-gap);

@include reset;
@include reset-ol;
@include text-rendering;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/error-message/error-message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@import "../../common/text-rendering";

@mixin reset {
@mixin reset-paragraph {
box-sizing: border-box;
margin-block: 0;
}
Expand All @@ -18,5 +18,5 @@
line-height: var(--ams-error-message-line-height);

@include text-rendering;
@include reset;
@include reset-paragraph;
}
4 changes: 2 additions & 2 deletions packages/css/src/components/field-set/field-set.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@import "../../common/hyphenation";
@import "../../common/text-rendering";

@mixin reset {
@mixin reset-fieldset {
border: 0;
margin-inline: 0;
padding-block: 0;
Expand All @@ -16,7 +16,7 @@
.ams-field-set {
break-inside: avoid;

@include reset;
@include reset-fieldset;
}

.ams-field-set--invalid {
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/heading/heading.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@import "../../common/hyphenation";
@import "../../common/text-rendering";

@mixin reset {
@mixin reset-heading {
box-sizing: border-box;
margin-block: 0;
}
Expand All @@ -20,7 +20,7 @@

@include hyphenation;
@include text-rendering;
@include reset;
@include reset-heading;
}

.ams-heading--level-1 {
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/icon-button/icon-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@mixin reset {
@mixin reset-button {
border: 0;
margin-block: 0; // [1]
margin-inline: 0; // [1]
Expand All @@ -20,7 +20,7 @@
outline-offset: var(--ams-icon-button-outline-offset);
touch-action: manipulation;

@include reset;
@include reset-button;

&:hover {
background-color: var(--ams-icon-button-hover-background-color);
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/ordered-list/ordered-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@import "../../common/text-rendering";

@mixin reset {
@mixin reset-ol {
box-sizing: border-box;
list-style-type: none;
margin-block: 0;
Expand All @@ -17,7 +17,7 @@
gap: var(--ams-ordered-list-gap);

@include text-rendering;
@include reset;
@include reset-ol;
}

.ams-ordered-list:not(.ams-ordered-list--no-markers) {
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/page-heading/page-heading.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@import "../../common/hyphenation";
@import "../../common/text-rendering";

@mixin reset {
@mixin reset-h1 {
box-sizing: border-box;
margin-block: 0;
}
Expand All @@ -22,7 +22,7 @@

@include hyphenation;
@include text-rendering;
@include reset;
@include reset-h1;
}

.ams-page-heading--inverse-color {
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/paragraph/paragraph.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@import "../../common/text-rendering";

@mixin reset {
@mixin reset-paragraph {
box-sizing: border-box;
margin-block: 0;
}
Expand All @@ -18,7 +18,7 @@
line-height: var(--ams-paragraph-line-height);

@include text-rendering;
@include reset;
@include reset-paragraph;
}

.ams-paragraph--small {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@import "../../common/text-rendering";

@mixin reset {
@mixin reset-input {
-webkit-appearance: none; // Reset appearance for Safari < 15.4
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
border: 0;
Expand All @@ -29,7 +29,7 @@
touch-action: manipulation;

@include text-rendering;
@include reset;
@include reset-input;

&:hover {
box-shadow: var(--ams-password-input-hover-box-shadow);
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/screen/screen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@mixin reset {
@mixin reset-div {
box-sizing: border-box;
}

Expand All @@ -12,7 +12,7 @@
margin-inline: auto;
position: relative;

@include reset;
@include reset-div;
}

.ams-screen--full-height {
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/select/select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright Gemeente Amsterdam
*/

@mixin reset {
@mixin reset-select {
appearance: none; // Reset native appearance to hide default chevron
border: 0;
border-radius: 0; // Reset rounded borders for Safari on MacOS
Expand All @@ -23,7 +23,7 @@
padding-inline: var(--ams-select-padding-inline);
touch-action: manipulation;

@include reset;
@include reset-select;

&:not([multiple]) {
background-image: var(--ams-select-background-image);
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/switch/switch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@import "../../common/input-label-focus";
@import "../../common/hide-input";

@mixin reset {
@mixin reset-label {
box-sizing: border-box;
}

Expand All @@ -29,7 +29,7 @@
outline-offset: var(--ams-switch-outline-offset);
transition: background-color 0.2s ease-in-out;

@include reset;
@include reset-label;
}

.ams-switch__label::before {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@import "../../common/text-rendering";

@mixin reset {
@mixin reset-list {
box-sizing: border-box;
margin-block: 0;
padding-inline: 0;
Expand All @@ -28,7 +28,7 @@
list-style: none;

@include text-rendering;
@include reset;
@include reset-list;

.ams-table-of-contents__list {
padding-block-start: var(--ams-table-of-contents-list-list-padding-block-start);
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/text-area/text-area.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@import "../../common/text-rendering";

@mixin reset {
@mixin reset-text-area {
-webkit-appearance: none; // Reset appearance for Safari < 15.4
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
border: 0;
Expand All @@ -31,7 +31,7 @@
touch-action: manipulation;

@include text-rendering;
@include reset;
@include reset-text-area;

&:hover {
box-shadow: var(--ams-text-area-hover-box-shadow);
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/text-input/text-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@import "../../common/text-rendering";

@mixin reset {
@mixin reset-input {
-webkit-appearance: none; // Reset appearance for Safari < 15.4
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
border: 0;
Expand All @@ -29,7 +29,7 @@
touch-action: manipulation;

@include text-rendering;
@include reset;
@include reset-input;

&:hover {
box-shadow: var(--ams-text-input-hover-box-shadow);
Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/time-input/time-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@import "../../common/text-rendering";

@mixin reset {
@mixin reset-input {
-webkit-appearance: none; // Reset appearance for Safari < 15.4
appearance: none; // Reset native appearance, this causes issues on iOS and Android devices
border: 0;
Expand Down Expand Up @@ -37,7 +37,7 @@
touch-action: manipulation;

@include text-rendering;
@include reset;
@include reset-input;

&:hover {
box-shadow: var(--ams-time-input-hover-box-shadow);
Expand Down
6 changes: 3 additions & 3 deletions packages/css/src/components/top-task-link/top-task-link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
text-decoration: none;
}

@mixin reset {
@mixin reset-label-or-description {
box-sizing: border-box;
}

Expand All @@ -31,7 +31,7 @@

@include hyphenation;
@include text-rendering;
@include reset;
@include reset-label-or-description;
}

.ams-top-task-link:hover .ams-top-task-link__label {
Expand All @@ -46,5 +46,5 @@
font-weight: var(--ams-top-task-link-description-font-weight);
line-height: var(--ams-top-task-link-description-line-height);

@include reset;
@include reset-label-or-description;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@import "../../common/text-rendering";

@mixin reset {
@mixin reset-ul {
box-sizing: border-box;
list-style: none;
margin-block: 0;
Expand All @@ -17,7 +17,7 @@
gap: var(--ams-unordered-list-gap);

@include text-rendering;
@include reset;
@include reset-ul;
}

.ams-unordered-list:not(.ams-unordered-list--no-markers) {
Expand Down

0 comments on commit ae1acf2

Please sign in to comment.