2 * Copyright 2015 Google Inc. All Rights Reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 @import "../variables";
25 vertical-align: middle;
27 display: inline-block;
29 box-sizing: border-box;
31 height: $checkbox-label-height;
36 padding-left: $checkbox-button-size + $checkbox-padding;
40 .mdl-checkbox__input {
41 line-height: $checkbox-label-height;
43 .mdl-checkbox.is-upgraded & {
44 // Hide input element, while still making it respond to focus.
52 -moz-appearance: none;
53 -webkit-appearance: none;
59 .mdl-checkbox__box-outline {
61 top: $checkbox-top-offset;
64 display: inline-block;
66 box-sizing: border-box;
67 width: $checkbox-button-size;
68 height: $checkbox-button-size;
74 border: 2px solid $checkbox-off-color;
79 .mdl-checkbox.is-checked & {
80 border: 2px solid $checkbox-color;
83 fieldset[disabled] .mdl-checkbox &,
84 .mdl-checkbox.is-disabled & {
85 border: 2px solid $checkbox-disabled-color;
90 .mdl-checkbox__focus-helper {
92 top: $checkbox-top-offset;
95 display: inline-block;
97 box-sizing: border-box;
98 width: $checkbox-button-size;
99 height: $checkbox-button-size;
102 background-color: transparent;
104 .mdl-checkbox.is-focused & {
105 box-shadow: 0 0 0px ($checkbox-button-size / 2) rgba(0, 0, 0, 0.1);
106 background-color: rgba(0, 0, 0, 0.1);
109 .mdl-checkbox.is-focused.is-checked & {
110 box-shadow: 0 0 0px ($checkbox-button-size / 2) $checkbox-focus-color;
111 background-color: $checkbox-focus-color;
115 .mdl-checkbox__tick-outline {
121 mask: url("#{$checkbox-image-path}/tick-mask.svg?embed");
123 background: transparent;
124 @include material-animation-default(0.28s);
125 transition-property: background;
127 .mdl-checkbox.is-checked & {
128 background: $checkbox-color url("#{$checkbox-image-path}/tick.svg?embed");
131 fieldset[disabled] .mdl-checkbox.is-checked &,
132 .mdl-checkbox.is-checked.is-disabled & {
133 background: $checkbox-disabled-color url("#{$checkbox-image-path}/tick.svg?embed");
137 .mdl-checkbox__label {
140 font-size: $checkbox-label-font-size;
141 line-height: $checkbox-label-height;
144 fieldset[disabled] .mdl-checkbox &,
145 .mdl-checkbox.is-disabled & {
146 color: $checkbox-disabled-color;
151 .mdl-checkbox__ripple-container {
154 top: -(($checkbox-ripple-size - $checkbox-label-height) / 2);
155 left: -(($checkbox-ripple-size - $checkbox-button-size) / 2);
157 box-sizing: border-box;
158 width: $checkbox-ripple-size;
159 height: $checkbox-ripple-size;
165 -webkit-mask-image: -webkit-radial-gradient(circle, white, black);
168 background: $checkbox-color;
171 fieldset[disabled] .mdl-checkbox &,
172 .mdl-checkbox.is-disabled & {
176 fieldset[disabled] .mdl-checkbox & .mdl-ripple,
177 .mdl-checkbox.is-disabled & .mdl-ripple {
178 background: transparent;