bsw/jbe@1309: /** bsw/jbe@1309: * Copyright 2015 Google Inc. All Rights Reserved. bsw/jbe@1309: * bsw/jbe@1309: * Licensed under the Apache License, Version 2.0 (the "License"); bsw/jbe@1309: * you may not use this file except in compliance with the License. bsw/jbe@1309: * You may obtain a copy of the License at bsw/jbe@1309: * bsw/jbe@1309: * http://www.apache.org/licenses/LICENSE-2.0 bsw/jbe@1309: * bsw/jbe@1309: * Unless required by applicable law or agreed to in writing, software bsw/jbe@1309: * distributed under the License is distributed on an "AS IS" BASIS, bsw/jbe@1309: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. bsw/jbe@1309: * See the License for the specific language governing permissions and bsw/jbe@1309: * limitations under the License. bsw/jbe@1309: */ bsw/jbe@1309: bsw/jbe@1309: @import "../variables"; bsw/jbe@1309: bsw/jbe@1309: .mdl-tooltip { bsw/jbe@1309: transform: scale(0); bsw/jbe@1309: transform-origin: top center; bsw/jbe@1309: z-index: 999; bsw/jbe@1309: background: $tooltip-background-color; bsw/jbe@1309: border-radius: 2px; bsw/jbe@1309: color: $tooltip-text-color; bsw/jbe@1309: display: inline-block; bsw/jbe@1309: font-size: $tooltip-font-size; bsw/jbe@1309: font-weight: 500; bsw/jbe@1309: line-height: 14px; bsw/jbe@1309: max-width: 170px; bsw/jbe@1309: position: fixed; bsw/jbe@1309: top: -500px; bsw/jbe@1309: left: -500px; bsw/jbe@1309: padding: 8px; bsw/jbe@1309: text-align: center; bsw/jbe@1309: } bsw/jbe@1309: .mdl-tooltip.is-active { bsw/jbe@1309: animation: pulse 200ms $animation-curve-linear-out-slow-in forwards; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: .mdl-tooltip--large { bsw/jbe@1309: line-height: 14px; bsw/jbe@1309: font-size: $tooltip-font-size-large; bsw/jbe@1309: padding: 16px; bsw/jbe@1309: } bsw/jbe@1309: bsw/jbe@1309: @keyframes pulse { bsw/jbe@1309: 0% { bsw/jbe@1309: transform: scale(0); bsw/jbe@1309: opacity: 0; bsw/jbe@1309: } bsw/jbe@1309: 50% { bsw/jbe@1309: // Fixes a weird bug with the interaction between Safari and the result of bsw/jbe@1309: // the SASS compilation for the animation. bsw/jbe@1309: // Essentially, we need to make sure that "50%" and "100%" don't get merged bsw/jbe@1309: // into a single "50%, 100%" entry, so we need to avoid them having any bsw/jbe@1309: // matching properties. bsw/jbe@1309: transform: scale(0.99); bsw/jbe@1309: } bsw/jbe@1309: 100% { bsw/jbe@1309: transform: scale(1); bsw/jbe@1309: opacity: 1; bsw/jbe@1309: visibility: visible; bsw/jbe@1309: } bsw/jbe@1309: }