Skip to content

Commit

Permalink
MOON-472: Rename borders & radius variables and update all requiring …
Browse files Browse the repository at this point in the history
…styles with the new variables
  • Loading branch information
Eevolee committed Jan 2, 2025
1 parent 9f5af3e commit 58faebd
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/components/Badge/Badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
height: 20px;
padding: var(--spacing-nano);

border-radius: 2rem;
border-radius: var(--radius_rounded);
}

&.moonstone-badge_accent {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/Button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $button-size_big: 32px;

font-family: inherit;

border-radius: 4px;
border-radius: var(--radius);

outline: none;
cursor: pointer;
Expand Down
6 changes: 3 additions & 3 deletions src/components/ButtonGroup/ButtonGroup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
}

> *:first-child {
border-radius: 4px 0 0 4px;
border-radius: var(--radius) 0 0 var(--radius);
}

> *:last-child {
border-radius: 0 4px 4px 0;
border-radius: 0 var(--radius) var(--radius) 0;
}

> *:only-child {
border-radius: 4px;
border-radius: var(--radius);
}

// Manage separator
Expand Down
12 changes: 6 additions & 6 deletions src/components/CardSelector/CardSelector.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
width: 100%;
padding: var(--spacing-small);

border: var(--selector-border);
border-radius: var(--selector-border-radius);
border: var(--border-selector);
border-radius: var(--radius_small);
background-color: var(--color-white);
cursor: pointer;

transition: all 0.2s ease-in-out;

&:hover {
border: var(--selector-border_hover);
border: var(--border-selector_hover);
box-shadow: 0 1px 6px var(--color-dark20);
}

&:focus {
border: var(--selector-border_focus);
border: var(--border-selector_focus);
}
}

Expand Down Expand Up @@ -55,7 +55,7 @@
margin-right: var(--spacing-small);
overflow: hidden;

border-radius: 2px;
border-radius: var(--radius_small);
background-color: var(--color-gray_light40);
}

Expand Down Expand Up @@ -83,7 +83,7 @@
color: var(--color-warning);

border: 1px solid var(--color-warning);
border-radius: var(--selector-border-radius);
border-radius: var(--radius_small);
background-color: var(--color-white);

pointer-events: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
color: var(--color-dark_plain60);

border: 1px dashed var(--color-gray40);
border-radius: var(--selector-border-radius);
border-radius: var(--radius_small);
background-color: var(--color-white);
cursor: pointer;

transition: all 0.2s ease-in-out;

&:hover {
border: var(--selector-border_hover);
border: var(--border-selector_hover);
}

&:focus {
border: var(--selector-border_focus);
border: var(--border-selector_focus);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Checkbox/Checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ $checkbox-sizeBig: 20px;
appearance: none;

border: none;
border-radius: 2px;
border-radius: var(--radius_small);
outline: none;
background: transparent;

Expand Down
8 changes: 4 additions & 4 deletions src/components/Dropdown/Dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
gap: $spacing-icon;
padding: var(--spacing-nano) var(--spacing-small);

border-radius: var(--selector-border-radius);
border-radius: var(--radius_small);
cursor: pointer;

&.moonstone-disabled {
Expand All @@ -57,15 +57,15 @@
}

&.moonstone-opened {
border: var(--selector-border_active);
border: var(--border-selector_active);
}

&:hover {
color: var(--color-accent);
}

&:focus {
border: var(--selector-border_focus);
border: var(--border-selector_focus);
outline: none;
}

Expand All @@ -81,7 +81,7 @@
.moonstone-dropdown_outlined {
color: var(--color-gray_dark);

border: var(--selector-border);
border: var(--border-selector);

&.moonstone-disabled {
color: var(--color-gray);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Input/BaseInput/BaseInput.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ $min-width: 40px;
}

&.moonstone-outlined {
border: var(--selector-border);
border-radius: var(--selector-border-radius);
border: var(--border-selector);
border-radius: var(--radius_small);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/ListSelector/ValueList/ValueList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
min-width: 200px;
padding: var(--spacing-small);

border: var(--selector-border);
border: var(--border-selector);

.moonstone-dragging {
background-color: var(--color-light);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Menu/Menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

color: var(--color-gray_dark);

border-radius: 4px;
border-radius: var(--radius);

list-style: none;
background-color: var(--color-light);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Paper/Paper.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.moonstone-paper {
border-radius: 4px;
border-radius: var(--radius);
background-color: var(--color-white);
box-shadow: rgba(50, 50, 93, 0.25) 0 2px 5px -1px, rgba(0, 0, 0, 0.3) 0 1px 3px -1px;

Expand Down
2 changes: 1 addition & 1 deletion src/components/Pill/Pill.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.moonstone-pill {
padding: 0 var(--spacing-nano);

border-radius: 2px;
border-radius: var(--radius_small);
background-color: var(--color-gray_light40);

&.moonstone-pill_reversed {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

color: var(--color-light);

border-radius: 2rem;
border-radius: var(--radius_rounded);
cursor: pointer;

transition: color 0.2s, background-color 0.2s;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tab/TabItem/TabItem.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $big-tab-height: 32px;

font-family: inherit;

border-radius: 4px;
border-radius: var(--radius);

outline: none;
cursor: pointer;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tag/Tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
color: var(--color-light);

border: none;
border-radius: 4px;
border-radius: var(--radius);
background-color: var(--color-accent);
cursor: pointer;

Expand Down
15 changes: 7 additions & 8 deletions src/tokens/borders/_borders.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
:root {
--border-radius: 4px;
--border-radius_rounded: 2rem;
--selector-border-radius: 2px;
--selector-border-radius_big: 4px;
--selector-border: solid 1px var(--color-gray40);
--selector-border_hover: solid 1px var(--color-accent);
--selector-border_focus: solid 1px var(--color-accent);
--selector-border_active: solid 1px var(--color-accent);
--radius: 4px;
--radius_small: 2px;
--radius_rounded: 2rem;
--border-selector: solid 1px var(--color-gray40);
--border-selector_hover: solid 1px var(--color-accent);
--border-selector_focus: solid 1px var(--color-accent);
--border-selector_active: solid 1px var(--color-accent);
}

0 comments on commit 58faebd

Please sign in to comment.