users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/data/time.js
0c8fa3a2a270747f3dbb54fe8792f3f0aec997e3
· 2.0 KB · 85 lines
raw
| 1 | // Styles for /lib/components/data/time.jsx component |
| 2 | export const timeStyles = /* css */ ` |
| 3 | .time { |
| 4 | position: relative; |
| 5 | font-variant-numeric: tabular-nums; |
| 6 | background-color: var(--yellow); |
| 7 | overflow: hidden; |
| 8 | z-index: 0; |
| 9 | } |
| 10 | .simple-bar--widgets-background-color-as-foreground .time { |
| 11 | color: var(--yellow); |
| 12 | background-color: transparent; |
| 13 | } |
| 14 | .time__filler { |
| 15 | position: absolute; |
| 16 | top: 0; |
| 17 | left: 0; |
| 18 | width: 100%; |
| 19 | height: 100%; |
| 20 | transform: scaleX(0); |
| 21 | background-color: rgba(0, 0, 0, 0.15); |
| 22 | transform-origin: left; |
| 23 | pointer-events: none; |
| 24 | touch-action: none; |
| 25 | z-index: -1; |
| 26 | } |
| 27 | .simple-bar--widgets-background-color-as-foreground .time__filler { |
| 28 | background-color: transparent; |
| 29 | } |
| 30 | .time__icon { |
| 31 | position: relative; |
| 32 | flex: 0 0 15px; |
| 33 | width: 15px; |
| 34 | height: 15px; |
| 35 | margin-right: 7px; |
| 36 | border: 1px solid var(--background); |
| 37 | border-radius: 50%; |
| 38 | } |
| 39 | .simple-bar--widgets-background-color-as-foreground .time__icon { |
| 40 | border: 1px solid var(--yellow); |
| 41 | } |
| 42 | .simple-bar--no-color-in-data .time__icon { |
| 43 | border: 1px solid var(--foreground); |
| 44 | } |
| 45 | .time__hours, |
| 46 | .time__minutes { |
| 47 | position: absolute; |
| 48 | bottom: 50%; |
| 49 | width: 1px; |
| 50 | left: 50%; |
| 51 | margin-left: -1px; |
| 52 | background-color: var(--background); |
| 53 | transform-origin: bottom; |
| 54 | transition: transform 160ms var(--transition-easing); |
| 55 | will-change: transform; |
| 56 | } |
| 57 | .simple-bar--widgets-background-color-as-foreground .time__hours, |
| 58 | .simple-bar--widgets-background-color-as-foreground .time__minutes { |
| 59 | background-color: var(--yellow); |
| 60 | } |
| 61 | .simple-bar--no-color-in-data .time__hours, |
| 62 | .simple-bar--no-color-in-data .time__minutes { |
| 63 | background-color: var(--foreground); |
| 64 | } |
| 65 | .time__hours { |
| 66 | height: 28%; |
| 67 | } |
| 68 | .time__minutes { |
| 69 | height: 43%; |
| 70 | } |
| 71 | @media only screen and (-webkit-min-device-pixel-ratio: 2), |
| 72 | only screen and (min-device-pixel-ratio: 2), |
| 73 | only screen and (min-resolution: 192dpi), |
| 74 | only screen and (min-resolution: 2dppx) { |
| 75 | .time__icon { |
| 76 | flex: 0 0 16px; |
| 77 | width: 16px; |
| 78 | height: 16px; |
| 79 | } |
| 80 | .time__hours, |
| 81 | .time__minutes { |
| 82 | margin-left: 0; |
| 83 | } |
| 84 | } |
| 85 | `; |