liquid_feedback_frontend
diff style/mdl/menu/_menu.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/menu/_menu.scss Sun Jul 15 14:07:29 2018 +0200 1.3 @@ -0,0 +1,200 @@ 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-menu__container { 1.24 + display: block; 1.25 + margin: 0; 1.26 + padding: 0; 1.27 + border: none; 1.28 + position: absolute; 1.29 + overflow: visible; 1.30 + height: 0; 1.31 + width: 0; 1.32 + visibility: hidden; 1.33 + z-index: -1; 1.34 + 1.35 + &.is-visible, 1.36 + &.is-animating { 1.37 + z-index: 999; 1.38 + visibility: visible; 1.39 + } 1.40 +} 1.41 + 1.42 +.mdl-menu__outline { 1.43 + display: block; 1.44 + background: $default-dropdown-bg-color; 1.45 + margin: 0; 1.46 + padding: 0; 1.47 + border: none; 1.48 + border-radius: 2px; 1.49 + position: absolute; 1.50 + top: 0; 1.51 + left: 0; 1.52 + overflow: hidden; 1.53 + opacity: 0; 1.54 + transform: scale(0); 1.55 + transform-origin: 0 0; 1.56 + @include shadow-2dp(); 1.57 + will-change: transform; 1.58 + transition: transform $menu-expand-duration $animation-curve-default, 1.59 + opacity $menu-fade-duration $animation-curve-default; 1.60 + z-index: -1; 1.61 + 1.62 + .mdl-menu__container.is-visible & { 1.63 + opacity: 1; 1.64 + transform: scale(1); 1.65 + z-index: 999; 1.66 + } 1.67 + 1.68 + &.mdl-menu--bottom-right { 1.69 + transform-origin: 100% 0; 1.70 + } 1.71 + 1.72 + &.mdl-menu--top-left { 1.73 + transform-origin: 0 100%; 1.74 + } 1.75 + 1.76 + &.mdl-menu--top-right { 1.77 + transform-origin: 100% 100%; 1.78 + } 1.79 +} 1.80 + 1.81 +.mdl-menu { 1.82 + position: absolute; 1.83 + list-style: none; 1.84 + top: 0; 1.85 + left: 0; 1.86 + height: auto; 1.87 + width: auto; 1.88 + min-width: 124px; 1.89 + padding: 8px 0; 1.90 + margin: 0; 1.91 + opacity: 0; 1.92 + clip: rect(0 0 0 0); 1.93 + z-index: -1; 1.94 + 1.95 + .mdl-menu__container.is-visible & { 1.96 + opacity: 1; 1.97 + z-index: 999; 1.98 + } 1.99 + 1.100 + &.is-animating { 1.101 + transition: opacity $menu-fade-duration $animation-curve-default, 1.102 + clip $menu-expand-duration $animation-curve-default; 1.103 + } 1.104 + 1.105 + &.mdl-menu--bottom-right { 1.106 + left: auto; 1.107 + right: 0; 1.108 + } 1.109 + 1.110 + &.mdl-menu--top-left { 1.111 + top: auto; 1.112 + bottom: 0; 1.113 + } 1.114 + 1.115 + &.mdl-menu--top-right { 1.116 + top: auto; 1.117 + left: auto; 1.118 + bottom: 0; 1.119 + right: 0; 1.120 + } 1.121 + 1.122 + &.mdl-menu--unaligned { 1.123 + top: auto; 1.124 + left: auto; 1.125 + } 1.126 +} 1.127 + 1.128 +.mdl-menu__item { 1.129 + display: block; 1.130 + border: none; 1.131 + color: $default-item-text-color; 1.132 + background-color: transparent; 1.133 + text-align: left; 1.134 + margin: 0; 1.135 + padding: 0 16px; 1.136 + outline-color: $default-item-outline-color; 1.137 + position: relative; 1.138 + overflow: hidden; 1.139 + @include typo-body-1(); 1.140 + text-decoration: none; 1.141 + cursor: pointer; 1.142 + height: 48px; 1.143 + line-height: 48px; 1.144 + white-space: nowrap; 1.145 + opacity: 0; 1.146 + transition: opacity $menu-fade-duration $animation-curve-default; 1.147 + user-select: none; 1.148 + 1.149 + .mdl-menu__container.is-visible & { 1.150 + opacity: 1; 1.151 + } 1.152 + 1.153 + &::-moz-focus-inner { 1.154 + border: 0; 1.155 + } 1.156 + 1.157 + &--full-bleed-divider { 1.158 + border-bottom: 1px solid $default-item-divider-color; 1.159 + } 1.160 + 1.161 + &[disabled], &[data-mdl-disabled] { 1.162 + color: $disabled-item-text-color; 1.163 + background-color: transparent; 1.164 + cursor: auto; 1.165 + 1.166 + &:hover { 1.167 + background-color: transparent; 1.168 + } 1.169 + 1.170 + &:focus { 1.171 + background-color: transparent; 1.172 + } 1.173 + 1.174 + & .mdl-ripple { 1.175 + background: transparent; 1.176 + } 1.177 + } 1.178 + 1.179 + &:hover { 1.180 + background-color: $default-item-hover-bg-color; 1.181 + } 1.182 + 1.183 + &:focus { 1.184 + outline: none; 1.185 + background-color: $default-item-focus-bg-color; 1.186 + } 1.187 + 1.188 + &:active { 1.189 + background-color: $default-item-active-bg-color; 1.190 + } 1.191 +} 1.192 + 1.193 + 1.194 +.mdl-menu__item--ripple-container { 1.195 + display: block; 1.196 + height: 100%; 1.197 + left: 0px; 1.198 + position: absolute; 1.199 + top: 0px; 1.200 + width: 100%; 1.201 + z-index: 0; 1.202 + overflow: hidden; 1.203 +}