Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: switch from node-sass (deprecated) to sass #5159

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions components/inputs/sass/checkbox.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../colors/colors.scss";
@use "../../colors/colors.scss";

@mixin d2l-input-checkbox() {
-webkit-appearance: none;
Expand All @@ -21,13 +21,13 @@
}
&,
&:hover:disabled {
background-color: $d2l-color-regolith;
border-color: $d2l-color-galena;
background-color: colors.$d2l-color-regolith;
border-color: colors.$d2l-color-galena;
border-width: 1px;
}
&:hover,
&:focus {
border-color: $d2l-color-celestine;
border-color: colors.$d2l-color-celestine;
border-width: 2px;
outline-width: 0;
}
Expand Down
10 changes: 5 additions & 5 deletions components/inputs/sass/radio.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../colors/colors.scss";
@use "../../colors/colors.scss";

@mixin d2l-input-radio() {
-webkit-appearance: none;
Expand All @@ -21,18 +21,18 @@
}
&,
&:hover:disabled {
background-color: $d2l-color-regolith;
border-color: $d2l-color-galena;
background-color: colors.$d2l-color-regolith;
border-color: colors.$d2l-color-galena;
border-width: 1px;
}
&:hover,
&:focus {
border-color: $d2l-color-celestine;
border-color: colors.$d2l-color-celestine;
border-width: 2px;
outline-width: 0;
}
&[aria-invalid="true"] {
border-color: $d2l-color-cinnabar;
border-color: colors.$d2l-color-cinnabar;
}
&:disabled {
opacity: 0.5;
Expand Down
12 changes: 6 additions & 6 deletions components/inputs/sass/select.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../colors/colors.scss";
@use "../../colors/colors.scss";

@mixin d2l-input-select() {
-webkit-appearance: none;
Expand All @@ -11,7 +11,7 @@
border-radius: 0.3rem;
border-style: solid;
box-sizing: border-box;
color: $d2l-color-ferrite;
color: colors.$d2l-color-ferrite;
display: inline-block;
font-family: inherit;
font-size: 0.8rem;
Expand All @@ -25,7 +25,7 @@
&,
&:hover:disabled {
background-color: #ffffff;
border-color: $d2l-color-galena;
border-color: colors.$d2l-color-galena;
border-width: 1px;
box-shadow: inset 0 2px 0 0 rgba(177, 185, 190, 0.2); /* corundum */
padding: 0.4rem 0.75rem;
Expand All @@ -44,7 +44,7 @@
}
&:hover,
&:focus {
border-color: $d2l-color-celestine;
border-color: colors.$d2l-color-celestine;
border-width: 2px;
outline-style: none; /* Safari */
outline-width: 0;
Expand All @@ -56,7 +56,7 @@
background-position: center right 17px, center right calc(1px + 11px + 17px);
background-repeat: no-repeat, no-repeat;
background-size: 11px 7px, 0.8rem 0.8rem;
border-color: $d2l-color-cinnabar;
border-color: colors.$d2l-color-cinnabar;
}
&:disabled {
opacity: 0.5;
Expand All @@ -65,7 +65,7 @@
&:focus::-ms-value,
&:hover::-ms-value {
background-color: transparent;
color: $d2l-color-ferrite;
color: colors.$d2l-color-ferrite;
}
/* IE11 to hide the native chevron */
&::-ms-expand {
Expand Down
12 changes: 6 additions & 6 deletions components/inputs/sass/text.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../colors/colors.scss";
@use "../../colors/colors.scss";

@mixin d2l-input-text(
$include-pseudo-classes: true,
Expand All @@ -12,7 +12,7 @@
border-width: 1px;
box-shadow: inset 0 2px 0 0 rgba(177, 185, 190, 0.2), /* corundum */;
box-sizing: border-box;
color: $d2l-color-ferrite;
color: colors.$d2l-color-ferrite;
display: inline-block;
font-family: inherit;
font-size: 0.8rem;
Expand All @@ -27,26 +27,26 @@
width: 100%;
&::placeholder,
&::-ms-input-placeholder {
color: $d2l-color-galena;
color: colors.$d2l-color-galena;
font-size: 0.8rem;
font-weight: 400;
opacity: 1; /* Firefox has non-1 default */
}
&:hover,
&:focus {
border-color: $d2l-color-celestine;
border-color: colors.$d2l-color-celestine;
border-width: 2px;
outline-style: none;
outline-width: 0;
padding: $padding-focus;
}
&[aria-invalid="true"] {
border-color: $d2l-color-cinnabar;
border-color: colors.$d2l-color-cinnabar;
}
&,
&:hover:disabled,
&[aria-invalid="true"]:disabled {
border-color: $d2l-color-galena;
border-color: colors.$d2l-color-galena;
border-width: 1px;
padding: $padding;
}
Expand Down
8 changes: 4 additions & 4 deletions components/inputs/sass/textarea.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@import "../../colors/colors.scss";
@import "./text.scss";
@use "../../colors/colors.scss";
@use "./text.scss";

@mixin d2l-input-textarea() {
@include d2l-input-text(
overflow: auto;
@include text.d2l-input-text(
$include-pseudo-classes: false,
$line-height: normal,
$padding: 0.5rem 0.75rem,
$padding-focus: calc(0.5rem - 1px) calc(0.75rem - 1px)
);
overflow: auto;
&[aria-invalid="true"] {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having rules declared after an @include is also deprecated. Moving it up to the top has no effect on the CSS.

background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE4IDE4Ij4KICA8cGF0aCBmaWxsPSIjY2QyMDI2IiBkPSJNMTcuNzkgMTUuMTFsLTctMTRhMiAyIDAgMCAwLTMuNTggMGwtNyAxNGExLjk3NSAxLjk3NSAwIDAgMCAuMDkgMS45NEEyIDIgMCAwIDAgMiAxOGgxNGExLjk5NCAxLjk5NCAwIDAgMCAxLjctLjk1IDEuOTY3IDEuOTY3IDAgMCAwIC4wOS0xLjk0ek05IDE2YTEuNSAxLjUgMCAxIDEgMS41LTEuNUExLjUgMS41IDAgMCAxIDkgMTZ6bS45OC00LjgwNmExIDEgMCAwIDEtMS45NiAwbC0uOTktNUExIDEgMCAwIDEgOC4wMSA1aDEuOTgzYTEgMSAwIDAgMSAuOTggMS4xOTR6Ii8+Cjwvc3ZnPgo=");
background-position: top 12px right 18px;
Expand Down
12 changes: 6 additions & 6 deletions components/link/link.scss
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
@import "../colors/colors.scss";
@use "../colors/colors.scss";

@mixin d2l-link() {
&,
&:visited,
&:link,
&:active {
color: $d2l-color-celestine;
color: colors.$d2l-color-celestine;
cursor: pointer;
text-decoration: none;
}
&:hover {
color: $d2l-color-celestine-minus-1;
color: colors.$d2l-color-celestine-minus-1;
text-decoration: underline;
}
&:focus-visible {
border-radius: 2px;
outline: 2px solid $d2l-color-celestine;
outline: 2px solid colors.$d2l-color-celestine;
outline-offset: 1px;
text-decoration: underline;
}
.d2l-focus-visible-not-supported &:focus {
border-radius: 2px;
outline: 2px solid $d2l-color-celestine;
outline: 2px solid colors.$d2l-color-celestine;
outline-offset: 1px;
text-decoration: underline;
}
Expand All @@ -36,7 +36,7 @@
}
@media print {
&, &:visited, &:link, &:active {
color: $d2l-color-ferrite;
color: colors.$d2l-color-ferrite;
}
}
}
6 changes: 3 additions & 3 deletions components/typography/typography.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@import "../colors/colors.scss";
@use "../colors/colors.scss";

@mixin d2l-typography {

color: $d2l-color-ferrite;
color: colors.$d2l-color-ferrite;
display: block;
font-family: "Lato", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
font-size: 0.95rem;
Expand Down Expand Up @@ -108,7 +108,7 @@
}

@mixin d2l-body-small {
color: $d2l-color-tungsten;
color: colors.$d2l-color-tungsten;
font-size: 0.7rem;
font-weight: 400;
line-height: 1rem;
Expand Down
Loading
Loading