Skip to content

Commit

Permalink
修复checkbox的indeterminate问题
Browse files Browse the repository at this point in the history
  • Loading branch information
严文彬 authored and 严文彬 committed May 29, 2020
1 parent 6327786 commit aae5030
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/xy-checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,15 @@ export default class XyCheckbox extends HTMLElement {
#checkbox:focus-visible+label .cheked::after{
transform:scale(2.5);
}
#checkbox:checked+label .cheked .icon{
#checkbox:checked:not(:indeterminate)+label .cheked .icon{
transform: scale(1.5);
}
#checkbox:checked+label .cheked,#checkbox:indeterminate:not(:checked)+label .cheked{
#checkbox:checked+label .cheked,
#checkbox:indeterminate+label .cheked{
border-color:transparent;
background-color:var(--themeColor,#42b983);
}
#checkbox:indeterminate:not(:checked)+label .cheked::before{
#checkbox:indeterminate+label .cheked::before{
transform:scale(1);
}
</style>
Expand Down

0 comments on commit aae5030

Please sign in to comment.