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

Fix colors by Material Design #161

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
13 changes: 7 additions & 6 deletions paper-checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@
Custom property | Description | Default
----------------|-------------|----------
`--paper-checkbox-unchecked-background-color` | Checkbox background color when the input is not checked | `transparent`
`--paper-checkbox-unchecked-color` | Checkbox border color when the input is not checked | `--primary-text-color`
`--paper-checkbox-unchecked-ink-color` | Selected/focus ripple color when the input is not checked | `--primary-text-color`
`--paper-checkbox-unchecked-color` | Checkbox border color when the input is not checked | `--secondary-text-color`
`--paper-checkbox-unchecked-ink-color` | Selected/focus ripple color when the input is not checked | `--secondary-text-color`
`--paper-checkbox-checked-color` | Checkbox color when the input is checked | `--primary-color`
`--paper-checkbox-checked-ink-color` | Selected/focus ripple color when the input is checked | `--primary-color`
`--paper-checkbox-disabled-color` | Checkbox border color when the input is disabled | `--disabled-text-color`
`--paper-checkbox-checkmark-color` | Checkmark color | `white`
`--paper-checkbox-label-color` | Label color | `--primary-text-color`
`--paper-checkbox-label-checked-color` | Label color when the input is checked | `--paper-checkbox-label-color`
Expand Down Expand Up @@ -103,7 +104,7 @@
left: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);
width: var(--calculated-paper-checkbox-ink-size);
height: var(--calculated-paper-checkbox-ink-size);
color: var(--paper-checkbox-unchecked-ink-color, var(--primary-text-color));
color: var(--paper-checkbox-unchecked-ink-color, var(--secondary-text-color));
opacity: 0.6;
pointer-events: none;
}
Expand All @@ -122,7 +123,7 @@
box-sizing: border-box;
height: 100%;
border: solid 2px;
border-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));
border-color: var(--paper-checkbox-unchecked-color, var(--secondary-text-color));
border-radius: 2px;
pointer-events: none;
-webkit-transition: background-color 140ms, border-color 140ms;
Expand Down Expand Up @@ -208,11 +209,11 @@

:host([disabled]) #checkbox {
opacity: 0.5;
border-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));
border-color: var(--paper-checkbox-disabled-color, var(--disabled-text-color));
}

:host([disabled][checked]) #checkbox {
background-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));
background-color: var(--paper-checkbox-disabled-color, var(--disabled-text-color));
opacity: 0.5;
}

Expand Down