Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame^] | 1 | /** |
| 2 | * Copyright 2015 Google Inc. All Rights Reserved. |
| 3 | * |
| 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 |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 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. |
| 15 | */ |
| 16 | |
| 17 | @import "../variables"; |
| 18 | |
| 19 | .mdl-tooltip { |
| 20 | transform: scale(0); |
| 21 | transform-origin: top center; |
| 22 | z-index: 999; |
| 23 | background: $tooltip-background-color; |
| 24 | border-radius: 2px; |
| 25 | color: $tooltip-text-color; |
| 26 | display: inline-block; |
| 27 | font-size: $tooltip-font-size; |
| 28 | font-weight: 500; |
| 29 | line-height: 14px; |
| 30 | max-width: 170px; |
| 31 | position: fixed; |
| 32 | top: -500px; |
| 33 | left: -500px; |
| 34 | padding: 8px; |
| 35 | text-align: center; |
| 36 | } |
| 37 | .mdl-tooltip.is-active { |
| 38 | animation: pulse 200ms $animation-curve-linear-out-slow-in forwards; |
| 39 | } |
| 40 | |
| 41 | .mdl-tooltip--large { |
| 42 | line-height: 14px; |
| 43 | font-size: $tooltip-font-size-large; |
| 44 | padding: 16px; |
| 45 | } |
| 46 | |
| 47 | @keyframes pulse { |
| 48 | 0% { |
| 49 | transform: scale(0); |
| 50 | opacity: 0; |
| 51 | } |
| 52 | 50% { |
| 53 | // Fixes a weird bug with the interaction between Safari and the result of |
| 54 | // the SASS compilation for the animation. |
| 55 | // Essentially, we need to make sure that "50%" and "100%" don't get merged |
| 56 | // into a single "50%, 100%" entry, so we need to avoid them having any |
| 57 | // matching properties. |
| 58 | transform: scale(0.99); |
| 59 | } |
| 60 | 100% { |
| 61 | transform: scale(1); |
| 62 | opacity: 1; |
| 63 | visibility: visible; |
| 64 | } |
| 65 | } |