liquid_feedback_frontend
diff style/mdl/radio/_radio.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/radio/_radio.scss Sun Jul 15 14:07:29 2018 +0200 1.3 @@ -0,0 +1,160 @@ 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-radio { 1.24 + position: relative; 1.25 + 1.26 + font-size: $radio-label-font-size; 1.27 + line-height: $radio-label-height; 1.28 + 1.29 + display: inline-block; 1.30 + 1.31 + box-sizing: border-box; 1.32 + margin: 0; 1.33 + padding-left: 0; 1.34 + 1.35 + &.is-upgraded { 1.36 + padding-left: $radio-button-size + $radio-padding; 1.37 + } 1.38 +} 1.39 + 1.40 +.mdl-radio__button { 1.41 + line-height: $radio-label-height; 1.42 + 1.43 + .mdl-radio.is-upgraded & { 1.44 + // Hide input element, while still making it respond to focus. 1.45 + position: absolute; 1.46 + width: 0; 1.47 + height: 0; 1.48 + margin: 0; 1.49 + padding: 0; 1.50 + opacity: 0; 1.51 + -ms-appearance: none; 1.52 + -moz-appearance: none; 1.53 + -webkit-appearance: none; 1.54 + appearance: none; 1.55 + border: none; 1.56 + } 1.57 +} 1.58 + 1.59 +.mdl-radio__outer-circle { 1.60 + position: absolute; 1.61 + top: $radio-top-offset; 1.62 + left: 0; 1.63 + 1.64 + display: inline-block; 1.65 + 1.66 + box-sizing: border-box; 1.67 + width: $radio-button-size; 1.68 + height: $radio-button-size; 1.69 + margin: 0; 1.70 + 1.71 + cursor: pointer; 1.72 + 1.73 + border: 2px solid $radio-off-color; 1.74 + border-radius: 50%; 1.75 + 1.76 + z-index: 2; 1.77 + 1.78 + .mdl-radio.is-checked & { 1.79 + border: 2px solid $radio-color; 1.80 + } 1.81 + 1.82 + fieldset[disabled] .mdl-radio, 1.83 + .mdl-radio.is-disabled & { 1.84 + border: 2px solid $radio-disabled-color; 1.85 + cursor: auto; 1.86 + } 1.87 +} 1.88 + 1.89 +.mdl-radio__inner-circle { 1.90 + position: absolute; 1.91 + z-index: 1; 1.92 + margin: 0; 1.93 + top: $radio-top-offset + $radio-inner-margin; 1.94 + left: $radio-inner-margin; 1.95 + 1.96 + box-sizing: border-box; 1.97 + width: $radio-button-size - ($radio-inner-margin * 2); 1.98 + height: $radio-button-size - ($radio-inner-margin * 2); 1.99 + 1.100 + cursor: pointer; 1.101 + 1.102 + @include material-animation-default(0.28s); 1.103 + transition-property: transform; 1.104 + transform: scale3d(0, 0, 0); 1.105 + 1.106 + border-radius: 50%; 1.107 + background: $radio-color; 1.108 + 1.109 + .mdl-radio.is-checked & { 1.110 + transform: scale3d(1, 1, 1); 1.111 + } 1.112 + 1.113 + fieldset[disabled] .mdl-radio &, 1.114 + .mdl-radio.is-disabled & { 1.115 + background: $radio-disabled-color; 1.116 + cursor: auto; 1.117 + } 1.118 + 1.119 + .mdl-radio.is-focused & { 1.120 + box-shadow: 0 0 0px 10px rgba(0, 0, 0, 0.1); 1.121 + } 1.122 +} 1.123 + 1.124 +.mdl-radio__label { 1.125 + cursor: pointer; 1.126 + 1.127 + fieldset[disabled] .mdl-radio &, 1.128 + .mdl-radio.is-disabled & { 1.129 + color: $radio-disabled-color; 1.130 + cursor: auto; 1.131 + } 1.132 +} 1.133 + 1.134 +.mdl-radio__ripple-container { 1.135 + position: absolute; 1.136 + z-index: 2; 1.137 + top: -(($radio-ripple-size - $radio-label-height) / 2); 1.138 + left: -(($radio-ripple-size - $radio-button-size) / 2); 1.139 + 1.140 + box-sizing: border-box; 1.141 + width: $radio-ripple-size; 1.142 + height: $radio-ripple-size; 1.143 + border-radius: 50%; 1.144 + 1.145 + cursor: pointer; 1.146 + 1.147 + overflow: hidden; 1.148 + -webkit-mask-image: -webkit-radial-gradient(circle, white, black); 1.149 + 1.150 + & .mdl-ripple { 1.151 + background: $radio-color; 1.152 + } 1.153 + 1.154 + fieldset[disabled] .mdl-radio &, 1.155 + .mdl-radio.is-disabled & { 1.156 + cursor: auto; 1.157 + } 1.158 + 1.159 + fieldset[disabled] .mdl-radio & .mdl-ripple, 1.160 + .mdl-radio.is-disabled & .mdl-ripple { 1.161 + background: transparent; 1.162 + } 1.163 +}