Skip to content

Commit

Permalink
4200 - Vite: Update CSS imports and use color.adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
sorja committed Jan 8, 2025
1 parent 093df7a commit 9565ed6
Show file tree
Hide file tree
Showing 187 changed files with 373 additions and 327 deletions.
5 changes: 3 additions & 2 deletions src/client/components/AreaSelector/AreaSelector.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'src/client/style/partials';
@use 'sass:color';
@import 'client/style/partials';

.btn-country-select {
position: relative;
Expand All @@ -18,7 +19,7 @@
outline: unset;

&:hover {
background-color: darken($ui-bg, 4%);
background-color: color.adjust($ui-bg, $lightness: 4%);
}

.icon {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'src/client/style/partials';
@use 'sass:color';
@import 'client/style/partials';

.country-selection-list {
display: block;
Expand Down Expand Up @@ -78,7 +79,7 @@

.country-selection-list__row {
&:hover {
background-color: darken($ui-bg, 4%);
background-color: color.adjust($ui-bg, $lightness: 4%);
color: inherit;
}

Expand Down
11 changes: 6 additions & 5 deletions src/client/components/Autocomplete/Autocomplete.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import 'src/client/styles/config';
@import 'src/client/style/partials';
@use 'sass:color';
@import 'client/styles/config';
@import 'client/style/partials';

.autocomplete {
transition: all 0.1s ease-out;
Expand Down Expand Up @@ -55,14 +56,14 @@
text-decoration: none;

&.selected {
border-left: 2px solid darken($ui-accent-light, 25%);
border-left: 2px solid color.adjust($ui-accent-light, $lightness: 25%);
padding: $spacing-xxs;
}

&.highlighted {
padding: $spacing-xxs 9px;
background-color: $ui-accent-light;
border-left: 1px solid darken($ui-accent-light, 25%);
border-right: 1px solid darken($ui-accent-light, 25%);
border-left: 1px solid color.adjust($ui-accent-light, $lightness: 25%);
border-right: 1px solid color.adjust($ui-accent-light, $lightness: 25%);
}
}
2 changes: 1 addition & 1 deletion src/client/components/Avatar/Avatar.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.user-avatar {
width: 28px;
Expand Down
19 changes: 10 additions & 9 deletions src/client/components/Buttons/Button/Button.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'src/client/style/partials';
@use 'sass:color';
@import 'client/style/partials';

.button {
align-items: center;
Expand Down Expand Up @@ -104,11 +105,11 @@
}

&:hover {
background-color: lighten($colorPrimary, $hoverPercent);
color: darken(white, $hoverPercent);
background-color: color.adjust($colorPrimary, $lightness: $hoverPercent);
color: color.adjust(white, $lightness: $hoverPercent);

svg {
color: darken(white, $hoverPercent);
color: color.adjust(white, $lightness: $hoverPercent);
}
}

Expand All @@ -125,11 +126,11 @@
}

&:hover {
background-color: lighten($colorPrimary, $hoverInverseLighten);
color: darken($colorPrimary, $hoverPercent);
background-color: color.adjust($colorPrimary, $lightness: $hoverInverseLighten);
color: color.adjust($colorPrimary, $lightness: $hoverPercent);

svg {
color: darken($colorPrimary, $hoverPercent);
color: color.adjust($colorPrimary, $lightness: $hoverPercent);
}
}
}
Expand All @@ -146,7 +147,7 @@

&:hover {
svg {
color: darken($text-link, 5%);
color: color.adjust($text-link, $lightness: 5%);
}
}
}
Expand All @@ -157,7 +158,7 @@
}

.button__type-danger {
@include withTheme(darken($ui-destructive, 5%), 58%);
@include withTheme(color.adjust($ui-destructive, $lightness: -5%), 58%);
}

.button__type-primary {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.button-checkbox {
$colorPrimary: $ui-accent;
Expand Down
5 changes: 3 additions & 2 deletions src/client/components/Buttons/ButtonClose/ButtonClose.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'src/client/style/partials';
@use 'sass:color';
@import 'client/style/partials';

button.btn-close {
align-items: center;
Expand All @@ -19,7 +20,7 @@ button.btn-close {

&:hover {
svg {
color: darken($ui-destructive, 7%);
color: color.adjust($ui-destructive, $lightness: 7%);
transform: scale(1.1);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.btn-delete {
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/Buttons/ButtonEdit/ButtonEdit.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.btn-edit {
svg {
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/Chart/Bar/Bar.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.recharts-label,
.recharts-cartesian-axis-tick-value {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.chart-tooltip__container {
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/CountryLink/CountryLink.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.admin-countries__country-link {
color: $text-body;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.modal-country-select-body {
display: grid;
Expand Down Expand Up @@ -51,6 +51,4 @@
}
}
}


}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.modal-country-select {
width: 100vw;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'src/client/style/partials';
@use 'sass:color';
@import 'client/style/partials';

.country-status-indicator {
text-decoration: none;
Expand Down Expand Up @@ -35,7 +36,7 @@
}

.status-approval-label {
color: darken($ui-status-review, 13%);
color: color.adjust($ui-status-review, $lightness: 13%);
font-weight: 600;
}
}
2 changes: 1 addition & 1 deletion src/client/components/Dashboard/Dashboard.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

$border: 1px dotted $ui-border;

Expand Down
2 changes: 1 addition & 1 deletion src/client/components/DataGrid/DataCell/DataCell.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

$border-editable: 1px dashed $ui-edit-border-color;
$border: 1px solid $ui-border;
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/DataGrid/DataGrid/DataGrid.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.data-grid {
display: grid;
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/DataGridDeprecated/DataGrid.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.data-grid-deprecated {
display: grid;
Expand Down
9 changes: 5 additions & 4 deletions src/client/components/DefinitionLink/DefinitionLink.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
@import 'src/client/styles/config';
@import 'src/client/styles/buttons';
@use 'sass:color';
@import 'client/styles/config';
@import 'client/styles/buttons';

.definition-link {
@extend .link;
color: darken($ui-accent, 2%);
color: color.adjust($ui-accent, $lightness: 2%);
white-space: nowrap;

&:hover {
color: darken($ui-accent, 4%);
color: color.adjust($ui-accent, $lightness: 4%);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.edit-user__form-field {
&.edit-user__form-contact_method-field {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'src/client/style/partials';
@use 'sass:color';
@import 'client/style/partials';

.edit-user__form-field-role-countries {
flex-wrap: wrap;
Expand All @@ -9,7 +10,7 @@
border: $ui-thin-border;
padding: 4px 8px;
border-radius: 3px;
background-color: lighten($ui-bg, 1%);
color: darken($text-disabled, 15%);
background-color: color.adjust($ui-bg, $lightness: 1%);
color: color.adjust($text-disabled, $lightness: 15%);
margin: 5px 2.5px 0;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.edit-user__form-item-roles {
height: auto;
Expand Down Expand Up @@ -51,4 +51,4 @@
border: 1px solid $ui-border-light;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.edit-user__form-field {
.btn-country-select {
Expand Down
7 changes: 4 additions & 3 deletions src/client/components/EditUserForm/EditUserForm.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'src/client/style/partials';
@use 'sass:color';
@import 'client/style/partials';

.edit-user__form-item {
display: flex;
Expand Down Expand Up @@ -35,7 +36,7 @@
font-weight: bold;
text-transform: uppercase;
font-size: $font-xxs;
color: lighten($text-mute, 10%);
color: color.adjust($text-mute, $lightness: 10%);
}

.edit-user__form-field {
Expand Down Expand Up @@ -83,7 +84,7 @@
.edit-user__picture-img-invalid {
position: absolute;
bottom: -5px;
color: lighten($ui-destructive, 1%);
color: color.adjust($ui-destructive, $lightness: 1%);
font-weight: bold;
font-size: $font-xs;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.edit-user__form-field {
&.edit-user__form-phone-field {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.edit-user__form-field {
&.edit-user__form-select-field {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.edit-user__form-field {
&.edit-user__form-input-text-field {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.references-file-list {
.file-drop {
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/EditorWYSIWYG/EditorWYSIWYG.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

div.editorWYSIWYG {
height: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/FileUpload/FileUpload.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.file-upload {
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/FileUpload/Files/Files.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.file-upload__files {
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/Hr/Hr.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.hr {
background: radial-gradient(#c1c1c1, white);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.input-percent {
align-items: center;
Expand Down
7 changes: 4 additions & 3 deletions src/client/components/Inputs/InputRange/InputRange.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'src/client/style/partials';
@use 'sass:color';
@import 'client/style/partials';

.input-range {
align-items: center;
Expand Down Expand Up @@ -68,14 +69,14 @@

/***** Chrome, Safari, Opera, and Edge Chromium *****/
input[type='range']:focus::-webkit-slider-thumb {
border: $thumb-border-width solid lighten($ui-accent, 8%);
border: $thumb-border-width solid color.adjust($ui-accent, $lightness: 8%);
outline-offset: 2px;
outline: 1px dashed $ui-accent;
}

/******** Firefox ********/
input[type='range']:focus::-moz-range-thumb {
border: $thumb-border-width solid lighten($ui-accent, 8%);
border: $thumb-border-width solid color.adjust($ui-accent, $lightness: 8%);
outline-offset: 2px;
outline: 1px dashed $ui-accent;
}
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/Inputs/InputText/InputText.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'src/client/style/partials';
@import 'client/style/partials';

.input-text {
background-color: transparent;
Expand Down
Loading

0 comments on commit 9565ed6

Please sign in to comment.