users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/data/sound.js
6ad98695409ab789b2b3b15c95de404daf46d1a7
· 2.2 KB · 83 lines
raw
| 1 | // Styles for /lib/components/data/sound.jsx component |
| 2 | export const soundStyles = /* css */ ` |
| 3 | .sound { |
| 4 | font-variant-numeric: tabular-nums; |
| 5 | background-color: var(--blue); |
| 6 | transform: translateZ(0); |
| 7 | } |
| 8 | .simple-bar--widgets-background-color-as-foreground .sound { |
| 9 | color: var(--blue); |
| 10 | background-color: transparent; |
| 11 | } |
| 12 | .sound__slider-container { |
| 13 | --slider-size: 10px; |
| 14 | |
| 15 | position: relative; |
| 16 | max-width: 0; |
| 17 | height: 100%; |
| 18 | display: flex; |
| 19 | align-items: center; |
| 20 | padding: 0; |
| 21 | clip-path: inset(0); |
| 22 | opacity: 0.7; |
| 23 | border-radius: var(--item-radius); |
| 24 | transition: max-width 320ms var(--transition-easing), padding 320ms var(--transition-easing), |
| 25 | opacity 320ms var(--transition-easing), |
| 26 | clip-path 0ms var(--transition-easing); |
| 27 | } |
| 28 | .sound:hover .sound__slider-container, |
| 29 | .sound--dragging .sound__slider-container { |
| 30 | max-width: 100px; |
| 31 | clip-path: inset(-100vh -100vw); |
| 32 | transition: max-width 320ms var(--transition-easing), padding 320ms var(--transition-easing), |
| 33 | opacity 320ms var(--transition-easing), |
| 34 | clip-path 320ms 320ms var(--transition-easing) |
| 35 | } |
| 36 | .sound__slider-container:hover { |
| 37 | opacity: 1; |
| 38 | } |
| 39 | .sound__slider { |
| 40 | width: 100px; |
| 41 | height: var(--slider-size); |
| 42 | appearance: none; |
| 43 | background-color: var(--background); |
| 44 | border-radius: var(--item-radius); |
| 45 | outline: none; |
| 46 | -webkit-appearance: none; |
| 47 | } |
| 48 | .simple-bar--widgets-background-color-as-foreground .sound__slider { |
| 49 | background-color: var(--foreground); |
| 50 | } |
| 51 | .sound__slider::-webkit-slider-thumb { |
| 52 | width: var(--slider-size); |
| 53 | height: var(--slider-size); |
| 54 | background-color: var(--foreground); |
| 55 | border-radius: var(--item-radius); |
| 56 | cursor: pointer; |
| 57 | -webkit-appearance: none; |
| 58 | transform-origin: center; |
| 59 | transition: transform 160ms var(--transition-easing); |
| 60 | } |
| 61 | .simple-bar--widgets-background-color-as-foreground .sound__slider::-webkit-slider-thumb { |
| 62 | background-color: var(--blue); |
| 63 | } |
| 64 | .sound__slider::-webkit-slider-thumb:hover { |
| 65 | transform: scale(1.5); |
| 66 | } |
| 67 | .sound__display { |
| 68 | display: flex; |
| 69 | align-items: center; |
| 70 | margin-right: 4px; |
| 71 | overflow: hidden; |
| 72 | } |
| 73 | .sound__display:active { |
| 74 | color: currentColor; |
| 75 | } |
| 76 | .sound__display > svg { |
| 77 | flex-shrink: 0; |
| 78 | width: 14px; |
| 79 | height: 14px; |
| 80 | margin-right: 3px; |
| 81 | fill: currentColor; |
| 82 | } |
| 83 | `; |