|
| 1 | +/** |
| 2 | + * Modal.css |
| 3 | + * |
| 4 | + * To fix an issue with the PR preview deployment, |
| 5 | + * this file contains the contents of the new modal-animations.css + backdrop-animations.css |
| 6 | + */ |
| 7 | + |
| 8 | + |
| 9 | +/* --- modal-animations.css ------ */ |
| 10 | + |
| 11 | +.pf-v6-c-modal-animated { |
| 12 | + --pf-v6-c-modal-animated--Transition: |
| 13 | + opacity 240ms cubic-bezier(0.4, 0.14, 1, 1), |
| 14 | + transform 240ms cubic-bezier(0.4, 0.14, 1, 1), |
| 15 | + visibility 0ms linear 240ms; |
| 16 | + opacity: 0; |
| 17 | + visibility: hidden; |
| 18 | + pointer-events: none; |
| 19 | + transform: translate3d(0, -24px, 0); |
| 20 | + transform-origin: top center; |
| 21 | + transition: var(--pf-v6-c-modal-animated--Transition); |
| 22 | +} |
| 23 | + |
| 24 | +.pf-v6-c-modal-animated-open { |
| 25 | + --pf-v6-c-modal-animated--Transition: |
| 26 | + transform 240ms cubic-bezier(0, 0, 0.2, 1), |
| 27 | + visibility 0ms linear 0ms; |
| 28 | + opacity: 1; |
| 29 | + visibility: visible; |
| 30 | + pointer-events: unset; |
| 31 | + transform: translate3d(0, 0, 0); |
| 32 | +} |
| 33 | + |
| 34 | +.pf-v6-c-modal-animated-closed { |
| 35 | + opacity: 0; |
| 36 | + visibility: hidden; |
| 37 | + pointer-events: none; |
| 38 | + transform: translate3d(0, -24px, 0); |
| 39 | +} |
| 40 | + |
| 41 | +@media screen and (prefers-reduced-motion: reduce) { |
| 42 | + .pf-v6-c-modal-animated, |
| 43 | + .pf-v6-c-modal-animated-open, |
| 44 | + .pf-v6-c-modal-animated-closed { |
| 45 | + transition: none; |
| 46 | + } |
| 47 | +} |
| 48 | + |
| 49 | +/* --- backdrop-animations.css --- */ |
| 50 | + |
| 51 | +.pf-v6-c-backdrop-animated { |
| 52 | + background-color: transparent; |
| 53 | + visibility: hidden; |
| 54 | + pointer-events: none; |
| 55 | + transition: |
| 56 | + background-color 240ms cubic-bezier(0.4, 0.14, 1, 1), /* Carbon equivalent: duration-moderate-02 + motion(exit, expressive) */ |
| 57 | + visibility 0ms linear 240ms; /* Carbon equivalent: duration-moderate-02 */ |
| 58 | +} |
| 59 | + |
| 60 | +.pf-v6-c-backdrop-animated-visible { |
| 61 | + background-color: var(--pf-v6-c-backdrop--BackgroundColor); |
| 62 | + visibility: visible; |
| 63 | + pointer-events: unset; |
| 64 | + transition: |
| 65 | + background-color 240ms cubic-bezier(0, 0, 0.2, 1), |
| 66 | + visibility 0ms linear 0ms; |
| 67 | +} |
| 68 | + |
| 69 | +.pf-v6-c-backdrop-animated-hidden { |
| 70 | + background-color: transparent; |
| 71 | + visibility: hidden; |
| 72 | + pointer-events: none; |
| 73 | +} |
| 74 | + |
| 75 | +@media screen and (prefers-reduced-motion: reduce) { |
| 76 | + .pf-v6-c-backdrop-animated, |
| 77 | + .pf-v6-c-backdrop-animated-visible, |
| 78 | + .pf-v6-c-backdrop-animated-hidden { |
| 79 | + transition: none; |
| 80 | + } |
| 81 | +} |
0 commit comments