Skip to content

Commit

Permalink
Migrates the SCSS variables in rgba to CSS in color-mix
Browse files Browse the repository at this point in the history
Co-authored-by: Jane Sandberg <[email protected]>
  • Loading branch information
ishasinha1 and sandbergja committed Nov 9, 2024
1 parent 4434d97 commit e6893eb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
6 changes: 4 additions & 2 deletions src/components/LuxAutocompleteInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ $color-placeholder: tint($color-grayscale, 50%);
&:hover,
&[hover] {
box-shadow: 0 1px 5px 0 rgba($color-rich-black, 0.07), 0 0 0 1px tint($color-rich-black, 60%);
box-shadow: 0 1px 5px 0 color-mix(in srgb, var(--color-rich-black) 7%, transparent),
0 0 0 1px tint($color-rich-black, 60%);
}
&:focus,
&[focus] {
Expand All @@ -316,7 +317,8 @@ $color-placeholder: tint($color-grayscale, 50%);
@include reset;
background: var(--color-white);
border-radius: var(--border-radius-default);
box-shadow: inset 0 1px 0 0 rgba($color-rich-black, 0.07), 0 0 0 1px tint($color-rich-black, 80%);
box-shadow: inset 0 1px 0 0 color-mix(in srgb, var(--color-rich-black) 7%, transparent),
0 0 0 1px tint($color-rich-black, 80%);
}
.lux-autocomplete-results {
Expand Down
5 changes: 3 additions & 2 deletions src/components/LuxDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,14 @@ export default {
background-color: var(--color-white);
border: 0;
border-radius: $border-radius-default;
box-shadow: inset 0 1px 0 0 rgba($color-rich-black, 0.07),
box-shadow: inset 0 1px 0 0 color-mix(in srgb, var(--color-rich-black) 7%, transparent),
0 0 0 1px tint($color-rich-black, 80%);
}
/* On mouse-over, add a grey background color */
input:not([disabled]):hover::before {
box-shadow: 0 1px 5px 0 rgba($color-rich-black, 0.07), 0 0 0 1px tint($color-rich-black, 60%);
box-shadow: 0 1px 5px 0 color-mix(in srgb, var(--color-rich-black) 7%, transparent),
0 0 0 1px tint($color-rich-black, 60%);
}
input:checked::before {
Expand Down
2 changes: 1 addition & 1 deletion src/components/LuxInputSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ $color-placeholder: tint($color-grayscale, 50%);
}
&[disabled] {
box-shadow: inset 0 1px 0 0 rgba($color-rich-black, 0.07),
box-shadow: inset 0 1px 0 0 color-mix(in srgb, var(--color-rich-black) 7%, transparent),
0 0 0 1px tint($color-rich-black, 80%);
background: lighten($color-placeholder, 42%);
cursor: not-allowed;
Expand Down
2 changes: 1 addition & 1 deletion src/components/LuxInputText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ $color-placeholder: tint(rgb(149, 156, 167), 50%);
}
&[disabled],
&.disabled {
box-shadow: inset 0 1px 0 0 rgba($color-rich-black, 0.07),
box-shadow: inset 0 1px 0 0 color-mix(in srgb, var(--color-rich-black) 7%, transparent),
0 0 0 1px tint($color-rich-black, 80%);
background: lighten($color-placeholder, 42%);
cursor: not-allowed;
Expand Down
14 changes: 5 additions & 9 deletions src/components/LuxLoader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ export default {
@import "../assets/styles/system.scss";
// $border-color: var(--color-white);
$border-color: $color-princeton-orange-on-white;
.lux-loader {
@include reset;
@include stack-space($space-base);
color: var(--color-rich-black);
--border-color: var(--color-princeton-orange-on-white);
}
.lux-loader,
Expand All @@ -69,14 +69,10 @@ $border-color: $color-princeton-orange-on-white;
.lux-loader {
transform: translate(-50%, -50%);
text-indent: -9999em;
border-top: 1.1em solid rgba($border-color, 0.2);
border-right: 1.1em solid rgba($border-color, 0.2);
border-bottom: 1.1em solid rgba($border-color, 0.2);
border-left: 1.1em solid rgba($border-color, 1);
// border-top: 1.1em solid rgba(var(--border-color), 0.2);
// border-right: 1.1em solid rgba(var(--border-color), 0.2);
// border-bottom: 1.1em solid rgba(var(--border-color), 0.2);
// border-left: 1.1em solid rgba(var(--border-color), 1);
border-top: 1.1em solid color-mix(in srgb, var(--border-color) 20%, transparent);
border-right: 1.1em solid color-mix(in srgb, var(--border-color) 20%, transparent);
border-bottom: 1.1em solid color-mix(in srgb, var(--border-color) 20%, transparent);
border-left: 1.1em solid var(--border-color);
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
Expand Down

0 comments on commit e6893eb

Please sign in to comment.