Skip to content

Commit

Permalink
Fix deprecated darken function
Browse files Browse the repository at this point in the history
  • Loading branch information
renatho committed Oct 30, 2024
1 parent ccfa9a5 commit 13c77c0
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions assets/admin/students/student-modal/student-modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
box-shadow: inset 0 0 0 1px $alert-red;

&:hover:not(:disabled) {
color: darken($alert-red, 20%);
box-shadow: inset 0 0 0 1px darken($alert-red, 20%);
color: adjust-color($alert-red, $lightness: -20%);
box-shadow: inset 0 0 0 1px adjust-color($alert-red, $lightness: -20%);
}

&:focus:not(:disabled) {
Expand Down
4 changes: 2 additions & 2 deletions assets/css/course-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ $secondary: #0693e3;
}

&:focus {
background-color: darken($primary, 5%);
border-color: darken($primary, 5%);
background-color: adjust-color($primary, $lightness: -5%);
border-color: adjust-color($primary, $lightness: -5%);
box-shadow: 0 0 0 1px #fff, 0 0 0 3px $primary;
}

Expand Down
18 changes: 9 additions & 9 deletions assets/css/frontend.scss
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ a.sensei-certificate-link {
@include border_radius(5px);
color: #fff;
font-weight: bold;
background: darken($bg_dark, 5%);
background: adjust-color($bg_dark, $lightness: -5%);
display: inline-block;

&:before {
Expand Down Expand Up @@ -932,7 +932,7 @@ section.entry span.course-lesson-progress {
font-size: 16px;
position: relative;
margin: 20px 0; /* Just for demo spacing */
background: darken($bg_light, 5%);
background: adjust-color($bg_light, $lightness: -5%);
-moz-border-radius: 25px;
-webkit-border-radius: 25px;
border-radius: 25px;
Expand Down Expand Up @@ -1014,10 +1014,10 @@ section.entry span.course-lesson-progress {
}

a {
color: darken($error, 10%);
color: adjust-color($error, $lightness: -10%);

&:hover {
color: darken($error, 15%);
color: adjust-color($error, $lightness: -15%);
}
}
}
Expand All @@ -1031,10 +1031,10 @@ section.entry span.course-lesson-progress {
}

a {
color: darken($success, 10%);;
color: adjust-color($success, $lightness: -10%);

&:hover {
color: darken($success, 15%);
color: adjust-color($success, $lightness: -15%);
}
}
}
Expand Down Expand Up @@ -1113,8 +1113,8 @@ section.entry span.course-lesson-progress {
text-transform: uppercase;
float: right;
background: none;
color: darken($success, 10%);
border: 2px solid darken($success, 10%);
color: adjust-color($success, $lightness: -10%);
border: 2px solid adjust-color($success, $lightness: -10%);

&:hover {
background: $success;
Expand Down Expand Up @@ -1154,7 +1154,7 @@ section.entry span.course-lesson-progress {
}

&:hover {
background: darken($bg_light, 3%);
background: adjust-color($bg_light, $lightness: -3%);
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions assets/css/notices.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
}

a {
color: darken($color_body, 10%);
color: adjust-color($color_body, $lightness: -10%);

&:hover {
color: darken($color_body, 15%);
color: adjust-color($color_body, $lightness: -15%);
}
}
}
Expand All @@ -68,10 +68,10 @@
}

a {
color: darken($error, 10%);
color: adjust-color($error, $lightness: -10%);

&:hover {
color: darken($error, 15%);
color: adjust-color($error, $lightness: -15%);
}
}
}
Expand All @@ -85,10 +85,10 @@
}

a {
color: darken($success, 10%);
color: adjust-color($success, $lightness: -10%);

&:hover {
color: darken($success, 15%);
color: adjust-color($success, $lightness: -15%);
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions assets/css/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ table.wp_list_table_grading_mains, {
}

.not-enrolled {
background: darken($bg_light, 5%);
background: adjust-color($bg_light, $lightness: -5%);
}

.enrolled {
Expand All @@ -325,7 +325,7 @@ table.wp_list_table_grading_mains, {
table.wp_list_table_grading_mains {
.user_status {
.ungraded {
background: darken($bg_light, 5%);
background: adjust-color($bg_light, $lightness: -5%);
}

.in-progress {
Expand Down Expand Up @@ -452,7 +452,7 @@ table.wp_list_table_sensei_learner_admins {
}

.does-not-provide-enrolment {
color: darken($bg_light, 40%);
color: adjust-color($bg_light, $lightness: -40%);

&:before {
font-family: dashicons;
Expand Down Expand Up @@ -532,7 +532,7 @@ table.wp_list_table_sensei_learner_admins {
&.user_right {
.grading-mark.icon_right {
&:after {
color: darken($success, 15%) !important;
color: adjust-color($success, $lightness: -15%) !important;
}
}

Expand All @@ -546,7 +546,7 @@ table.wp_list_table_sensei_learner_admins {
&.user_wrong {
.grading-mark.icon_wrong {
&:after {
color: darken($error, 15%) !important;
color: adjust-color($error, $lightness: -15%) !important;
}
}

Expand Down Expand Up @@ -683,7 +683,7 @@ table.wp_list_table_sensei_learner_admins {

&:hover {
&:after {
color: darken($success, 7%);
color: adjust-color($success, $lightness: -7%);
}
}
}
Expand All @@ -696,7 +696,7 @@ table.wp_list_table_sensei_learner_admins {

&:hover {
&:after {
color: darken($error, 7%);
color: adjust-color($error, $lightness: -7%);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions assets/shared/styles/wp-admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
}

&:focus {
color: darken($primary, 5%);
border-color: darken($primary, 5%);
color: adjust-color($primary, $lightness: -5%);
border-color: adjust-color($primary, $lightness: -5%);
}
}

Expand All @@ -31,8 +31,8 @@
}

&:focus {
background-color: darken($primary, 5%);
border-color: darken($primary, 5%);
background-color: adjust-color($primary, $lightness: -5%);
border-color: adjust-color($primary, $lightness: -5%);
box-shadow: 0 0 0 1px $white, 0 0 0 3px $primary;
}

Expand Down
4 changes: 2 additions & 2 deletions assets/shared/styles/wp-components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ body.sensei-color {
}

&:not(.components-button):focus {
color: darken($link, 20%);
color: adjust-color($link, $lightness: -20%);
box-shadow: 0 0 0 1px $link-primary, 0 0 2px 1px rgba($link-primary, 0.8);
}
}
Expand All @@ -58,7 +58,7 @@ body.sensei-color {
}

&:focus {
color: darken($link-primary, 20%);
color: adjust-color($link-primary, $lightness: -20%);
}
}

Expand Down

0 comments on commit 13c77c0

Please sign in to comment.