|
| 1 | +* { |
| 2 | + padding: 0; |
| 3 | + margin: 0; |
| 4 | + box-sizing: border-box; |
| 5 | +} |
| 6 | + |
| 7 | +html { |
| 8 | + height: 100%; |
| 9 | +} |
| 10 | + |
| 11 | +body { |
| 12 | + padding: 2rem; |
| 13 | + min-height: 100%; |
| 14 | + background-color: #f3f3f7; |
| 15 | + display: flex; |
| 16 | + justify-content: center; |
| 17 | + align-items: center; |
| 18 | +} |
| 19 | + |
| 20 | +main { |
| 21 | + --radius: 1rem; |
| 22 | + width: min(80%, 50rem); |
| 23 | + border-radius: var(--radius); |
| 24 | +} |
| 25 | + |
| 26 | +.screen { |
| 27 | + width: 100%; |
| 28 | + aspect-ratio: 16 / 9; |
| 29 | + background-color: white; |
| 30 | + border-radius: var(--radius) var(--radius) 0 0; |
| 31 | + position: relative; |
| 32 | + z-index: 1; |
| 33 | +} |
| 34 | + |
| 35 | +.screen > img { |
| 36 | + border-radius: inherit; |
| 37 | + max-width: 100%; |
| 38 | + object-fit: cover; |
| 39 | + aspect-ratio: inherit; |
| 40 | + display: block; |
| 41 | +} |
| 42 | + |
| 43 | +.control { |
| 44 | + --gap: clamp(1rem, 2vw, 2rem); |
| 45 | + |
| 46 | + width: 100%; |
| 47 | + height: clamp(1rem, 10vw, 3rem); |
| 48 | + display: flex; |
| 49 | + align-items: center; |
| 50 | + gap: var(--gap); |
| 51 | + justify-content: center; |
| 52 | + background-color: #fff; |
| 53 | + font-size: clamp(0.75rem, 5vw, 1.25rem); |
| 54 | + border-radius: 0 0 var(--radius) var(--radius); |
| 55 | + |
| 56 | + transition: transform 500ms ease-in-out; |
| 57 | +} |
| 58 | + |
| 59 | +.control.toggle { |
| 60 | + transform: translateY(-50%); |
| 61 | +} |
| 62 | + |
| 63 | +#player { |
| 64 | + width: 12rem; |
| 65 | +} |
| 66 | + |
| 67 | +:has(.control.toggle) .screen i[data-contract] { |
| 68 | + display: none; |
| 69 | +} |
| 70 | + |
| 71 | +/* Only icons with title with have this indicating they are clickable */ |
| 72 | +.control i[title] { |
| 73 | + cursor: pointer; |
| 74 | +} |
| 75 | + |
| 76 | +.control > div { |
| 77 | + display: flex; |
| 78 | + align-items: center; |
| 79 | + gap: calc(var(--gap) / 2); |
| 80 | +} |
| 81 | + |
| 82 | +.control > div > .timer { |
| 83 | + font-size: 1rem; |
| 84 | +} |
| 85 | + |
| 86 | +@media screen and (max-width: 50em) { |
| 87 | + .control { |
| 88 | + flex-direction: column; |
| 89 | + height: auto; |
| 90 | + padding: 1rem; |
| 91 | + } |
| 92 | + .control > div { |
| 93 | + gap: var(--gap); |
| 94 | + width: 100%; |
| 95 | + } |
| 96 | + .media-control { |
| 97 | + justify-content: center; |
| 98 | + } |
| 99 | + #player { |
| 100 | + flex-basis: 100%; |
| 101 | + } |
| 102 | + .volume-control, |
| 103 | + .timer-control { |
| 104 | + justify-content: space-between; |
| 105 | + } |
| 106 | +} |
0 commit comments