Skip to content

Commit 96136e5

Browse files
committed
(#194)(#429) Improve disabled state colors
This updates the colors of some disabled states to be consistent across components. This also changes the "not allowed" cursor on disabled elements to remove point events altogether.
1 parent ac86ce1 commit 96136e5

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

scss/_base.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ strong {
3939
*.disabled {
4040
font-style: italic !important;
4141
font-weight: 400 !important;
42-
cursor: not-allowed;
42+
pointer-events: none;
4343
}
4444

4545
/*! purgecss end ignore */

scss/components/_buttons-badges.scss

+1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ button.btn-grab:not(:disabled) {
170170
--#{$prefix}btn-disabled-color: var(--bs-body-color);
171171
--#{$prefix}btn-focus-shadow-rgb: #{to-rgb(mix(color-contrast($secondary), $secondary, 15%))};
172172
--#{$prefix}btn-focus-box-shadow: 0 0 0 #{$btn-focus-width} rgba(var(--#{$prefix}btn-focus-shadow-rgb), .5);
173+
--#{$prefix}btn-disabled-border-color: transparent;
173174
}
174175

175176
.btn-reorder {

scss/components/_script-builder.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
.tab-content .btn-next-step.disabled,
2626
.tab-content .btn-prev-step.disabled {
27-
cursor: not-allowed;
27+
pointer-events: none;
2828
}
2929

3030
> .nav {
@@ -41,7 +41,7 @@
4141
text-align: center;
4242

4343
&.disabled {
44-
cursor: not-allowed !important;
44+
pointer-events: none !important;
4545
}
4646

4747
.nav-link {

scss/pages/_ccm.scss

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
a,
2424
button {
2525
pointer-events: none !important;
26-
opacity: .5 !important;
2726

2827
&:hover {
2928
background: none !important;
@@ -38,7 +37,7 @@
3837
nav {
3938
li {
4039
&.active-parent,
41-
&:hover {
40+
&:hover:not(.disabled) {
4241
&::before {
4342
position: absolute;
4443
top: -2px;

scss/utilities/_links.scss

+4
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ a,
88
text-decoration-thickness: 2px;
99
text-underline-offset: 5px;
1010
}
11+
12+
a:not(.btn).disabled {
13+
color: var(--bs-secondary-color) !important;
14+
}

scss/variables/_global.scss

+2
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ $form-check-input-checked-bg-color: var(--bs-primary);
200200
$form-check-input-width: 1.57em;
201201
$form-check-min-height: 1.57em;
202202
$form-check-margin-bottom: .5rem;
203+
$form-check-input-disabled-opacity: 1;
203204
$input-group-addon-color: var(--bs-secondary-contrast);
204205
$input-group-addon-bg: var(--bs-secondary);
205206
$form-file-button-color: var(--bs-secondary-contrast);
@@ -250,6 +251,7 @@ $dropdown-bg: var(--bs-secondary-bg);
250251
$dropdown-link-hover-bg: var(--bs-tertiary-bg);
251252
$dropdown-link-active-color: var(--bs-body-color);
252253
$dropdown-link-active-bg: var(--bs-tertiary-bg);
254+
$dropdown-link-disabled-color: var(--bs-secondary-color);
253255
$dropdown-item-padding-y: .75rem;
254256

255257
// Offcanvas

0 commit comments

Comments
 (0)