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

style(material): change indeterminate disabled checkbox color #11244

Merged
merged 3 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/// @param {Color} $fill-color [null] - The checked border and fill colors.
/// @param {Color} $tick-color [null] - The checked mark color.
/// @param {Color} $disabled-color [null] - The disabled border and fill colors.
/// @param {Color} $disabled-indeterminate-color [null] - The disabled border and fill colors in indeterminate state.
/// @param {Color} $disabled-color-label [null] - The disabled label color.
/// @param {border-radius} $border-radius [null] - The border radius used for checkbox component.
/// @param {border-radius} $border-radius-ripple [null] - The border radius used for checkbox ripple.
Expand All @@ -46,6 +47,7 @@
$fill-color: null,
$tick-color: null,
$disabled-color: null,
$disabled-indeterminate-color: null,
$disabled-color-label: null,
$border-radius-ripple: null,
$focus-outline-color: null
Expand Down Expand Up @@ -77,6 +79,7 @@
fill-color: $fill-color,
tick-color: $tick-color,
disabled-color: $disabled-color,
disabled-indeterminate-color: $disabled-indeterminate-color,
disabled-color-label: $disabled-color-label,
border-radius: $border-radius,
border-radius-ripple: $border-radius-ripple,
Expand Down Expand Up @@ -267,6 +270,16 @@
top: $mark-offset;
left: $mark-offset;
}

@if $variant == 'material' {
%cbx-composite--x--disabled {
border: var-get($theme, 'disabled-indeterminate-color');

&::after {
background: var-get($theme, 'disabled-indeterminate-color');
}
}
}
}

%cbx-composite-mark--x {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
/// Generates a light checkbox schema.
/// @type {Map}
/// @prop {Color} tick-color [color: ('grays', 50)] - The checked mark color.
/// @prop {Map} label-color [color: ('grays', 900)]- The text color used for the label text.
/// @prop {Map} empty-color [color: ('grays', 600)] - The unchecked border color.
/// @prop {Map} fill-color [color: ('secondary', 500)] - The checked border and fill colors.
/// @prop {Map} disabled-color [color: ('grays', 400)] - The disabled border and fill colors.
/// @prop {Map} disabled-color-label [color: ('grays', 400)] - The disabled color of the label.
/// @prop {Color} label-color [color: ('grays', 900)]- The text color used for the label text.
/// @prop {Color} empty-color [color: ('grays', 600)] - The unchecked border color.
/// @prop {Color} fill-color [color: ('secondary', 500)] - The checked border and fill colors.
/// @prop {Color} disabled-color [color: ('grays', 400)] - The disabled border and fill colors.
/// @prop {Color} disabled-indeterminate-color [color: ('secondary', 200)] - The disabled border and fill colors in indeterminate state.
/// @prop {Color} disabled-color-label [color: ('grays', 400)] - The disabled color of the label.
/// @prop {Number} border-radius [.2] - The border radius used for checkbox. Can be a fraction between 0 and 1, pixels, or percent.
/// @prop {Number} border-radius-ripple [1] - The border radius used for checkbox ripple. Can be a fraction between 0 and 1, pixels, or percent.
///
Expand Down Expand Up @@ -46,6 +47,10 @@ $light-checkbox: extend(
color: ('grays', 400)
),

disabled-indeterminate-color: (
color: ('secondary', 200)
simeonoff marked this conversation as resolved.
Show resolved Hide resolved
),

disabled-color-label: (
color: ('grays', 400)
)
Expand Down