liquid_feedback_frontend

diff style/mdl/checkbox/_checkbox.scss @ 1309:32cc544d5a5b

Cumulative patch for upcoming frontend version 4
author bsw/jbe
date Sun Jul 15 14:07:29 2018 +0200 (2018-07-15)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/style/mdl/checkbox/_checkbox.scss	Sun Jul 15 14:07:29 2018 +0200
     1.3 @@ -0,0 +1,180 @@
     1.4 +/**
     1.5 + * Copyright 2015 Google Inc. All Rights Reserved.
     1.6 + *
     1.7 + * Licensed under the Apache License, Version 2.0 (the "License");
     1.8 + * you may not use this file except in compliance with the License.
     1.9 + * You may obtain a copy of the License at
    1.10 + *
    1.11 + *      http://www.apache.org/licenses/LICENSE-2.0
    1.12 + *
    1.13 + * Unless required by applicable law or agreed to in writing, software
    1.14 + * distributed under the License is distributed on an "AS IS" BASIS,
    1.15 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    1.16 + * See the License for the specific language governing permissions and
    1.17 + * limitations under the License.
    1.18 + */
    1.19 +
    1.20 +@import "../variables";
    1.21 +@import "../mixins";
    1.22 +
    1.23 +.mdl-checkbox {
    1.24 +  position: relative;
    1.25 +
    1.26 +  z-index: 1;
    1.27 +
    1.28 +  vertical-align: middle;
    1.29 +
    1.30 +  display: inline-block;
    1.31 +
    1.32 +  box-sizing: border-box;
    1.33 +  width: 100%;
    1.34 +  height: $checkbox-label-height;
    1.35 +  margin: 0;
    1.36 +  padding: 0;
    1.37 +
    1.38 +  &.is-upgraded {
    1.39 +    padding-left: $checkbox-button-size + $checkbox-padding;
    1.40 +  }
    1.41 +}
    1.42 +
    1.43 +.mdl-checkbox__input {
    1.44 +  line-height: $checkbox-label-height;
    1.45 +
    1.46 +  .mdl-checkbox.is-upgraded & {
    1.47 +    // Hide input element, while still making it respond to focus.
    1.48 +    position: absolute;
    1.49 +    width: 0;
    1.50 +    height: 0;
    1.51 +    margin: 0;
    1.52 +    padding: 0;
    1.53 +    opacity: 0;
    1.54 +    -ms-appearance: none;
    1.55 +    -moz-appearance: none;
    1.56 +    -webkit-appearance: none;
    1.57 +    appearance: none;
    1.58 +    border: none;
    1.59 +  }
    1.60 +}
    1.61 +
    1.62 +.mdl-checkbox__box-outline {
    1.63 +  position: absolute;
    1.64 +  top: $checkbox-top-offset;
    1.65 +  left: 0;
    1.66 +
    1.67 +  display: inline-block;
    1.68 +
    1.69 +  box-sizing: border-box;
    1.70 +  width: $checkbox-button-size;
    1.71 +  height: $checkbox-button-size;
    1.72 +  margin: 0;
    1.73 +
    1.74 +  cursor: pointer;
    1.75 +  overflow: hidden;
    1.76 +
    1.77 +  border: 2px solid $checkbox-off-color;
    1.78 +  border-radius: 2px;
    1.79 +
    1.80 +  z-index: 2;
    1.81 +
    1.82 +  .mdl-checkbox.is-checked & {
    1.83 +    border: 2px solid $checkbox-color;
    1.84 +  }
    1.85 +
    1.86 +  fieldset[disabled] .mdl-checkbox &,
    1.87 +  .mdl-checkbox.is-disabled & {
    1.88 +    border: 2px solid $checkbox-disabled-color;
    1.89 +    cursor: auto;
    1.90 +  }
    1.91 +}
    1.92 +
    1.93 +.mdl-checkbox__focus-helper {
    1.94 +  position: absolute;
    1.95 +  top: $checkbox-top-offset;
    1.96 +  left: 0;
    1.97 +
    1.98 +  display: inline-block;
    1.99 +
   1.100 +  box-sizing: border-box;
   1.101 +  width: $checkbox-button-size;
   1.102 +  height: $checkbox-button-size;
   1.103 +  border-radius: 50%;
   1.104 +
   1.105 +  background-color: transparent;
   1.106 +
   1.107 +  .mdl-checkbox.is-focused & {
   1.108 +    box-shadow: 0 0 0px ($checkbox-button-size / 2) rgba(0, 0, 0, 0.1);
   1.109 +    background-color: rgba(0, 0, 0, 0.1);
   1.110 +  }
   1.111 +
   1.112 +  .mdl-checkbox.is-focused.is-checked & {
   1.113 +    box-shadow: 0 0 0px ($checkbox-button-size / 2) $checkbox-focus-color;
   1.114 +    background-color: $checkbox-focus-color;
   1.115 +  }
   1.116 +}
   1.117 +
   1.118 +.mdl-checkbox__tick-outline {
   1.119 +  position: absolute;
   1.120 +  top: 0;
   1.121 +  left: 0;
   1.122 +  height: 100%;
   1.123 +  width: 100%;
   1.124 +  mask: url("#{$checkbox-image-path}/tick-mask.svg?embed");
   1.125 +
   1.126 +  background: transparent;
   1.127 +  @include material-animation-default(0.28s);
   1.128 +  transition-property: background;
   1.129 +
   1.130 +  .mdl-checkbox.is-checked & {
   1.131 +    background: $checkbox-color url("#{$checkbox-image-path}/tick.svg?embed");
   1.132 +  }
   1.133 +
   1.134 +  fieldset[disabled] .mdl-checkbox.is-checked &,
   1.135 +  .mdl-checkbox.is-checked.is-disabled & {
   1.136 +    background: $checkbox-disabled-color url("#{$checkbox-image-path}/tick.svg?embed");
   1.137 +  }
   1.138 +}
   1.139 +
   1.140 +.mdl-checkbox__label {
   1.141 +  position: relative;
   1.142 +  cursor: pointer;
   1.143 +  font-size: $checkbox-label-font-size;
   1.144 +  line-height: $checkbox-label-height;
   1.145 +  margin: 0;
   1.146 +
   1.147 +  fieldset[disabled] .mdl-checkbox &,
   1.148 +  .mdl-checkbox.is-disabled & {
   1.149 +    color: $checkbox-disabled-color;
   1.150 +    cursor: auto;
   1.151 +  }
   1.152 +}
   1.153 +
   1.154 +.mdl-checkbox__ripple-container {
   1.155 +  position: absolute;
   1.156 +  z-index: 2;
   1.157 +  top: -(($checkbox-ripple-size - $checkbox-label-height) / 2);
   1.158 +  left: -(($checkbox-ripple-size - $checkbox-button-size) / 2);
   1.159 +
   1.160 +  box-sizing: border-box;
   1.161 +  width: $checkbox-ripple-size;
   1.162 +  height: $checkbox-ripple-size;
   1.163 +  border-radius: 50%;
   1.164 +
   1.165 +  cursor: pointer;
   1.166 +
   1.167 +  overflow: hidden;
   1.168 +  -webkit-mask-image: -webkit-radial-gradient(circle, white, black);
   1.169 +
   1.170 +  & .mdl-ripple {
   1.171 +    background: $checkbox-color;
   1.172 +  }
   1.173 +
   1.174 +  fieldset[disabled] .mdl-checkbox &,
   1.175 +  .mdl-checkbox.is-disabled & {
   1.176 +    cursor: auto;
   1.177 +  }
   1.178 +
   1.179 +  fieldset[disabled] .mdl-checkbox & .mdl-ripple,
   1.180 +  .mdl-checkbox.is-disabled & .mdl-ripple {
   1.181 +    background: transparent;
   1.182 +  }
   1.183 +}

Impressum / About Us