users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/data/battery.js

0fcaad38a78d872e8e7fee332986d7b1efc05bb7 · 3.1 KB · 134 lines raw

1 // Styles for /lib/components/data/battery.jsx component
2 export const batteryStyles = /* css */ `
3 .battery {
4 position: relative;
5 background-color: var(--magenta);
6 overflow: hidden;
7 }
8 .battery--caffeinate,
9 .simple-bar--no-color-in-data .battery--caffeinate {
10 color: var(--black);
11 background-color: var(--white);
12 }
13 .simple-bar--widgets-background-color-as-foreground .battery {
14 color: var(--magenta);
15 background-color: transparent;
16 }
17 .simple-bar--widgets-background-color-as-foreground .battery--caffeinate {
18 color: var(--foreground);
19 }
20 .battery__icon {
21 position: relative;
22 width: 16px;
23 height: 9px;
24 margin-top: -2px;
25 margin-right: 10px;
26 }
27 .battery__icon::after {
28 content: '';
29 position: absolute;
30 top: calc(10% + 1px);
31 left: calc(100% + 2px);
32 width: 2px;
33 height: 80%;
34 border-radius: 0 3px 3px 0;
35 background-color: currentColor;
36 }
37 .simple-bar--no-color-in-data .battery__icon::after {
38 background-color: currentColor;
39 }
40 .battery__icon-inner {
41 position: relative;
42 width: 100%;
43 height: 100%;
44 border-radius: 3px;
45 border: 1px solid currentColor;
46 overflow: hidden;
47 }
48 .battery__charging-icon {
49 position: absolute;
50 top: -1px;
51 left: calc(50% - 6px);
52 width: 11px;
53 height: 11px;
54 fill: currentColor;
55 stroke: var(--magenta);
56 stroke-width: 2;
57 }
58 .simple-bar--no-color-in-data .battery__charging-icon {
59 stroke: var(--minor);
60 }
61 .battery--caffeinate .battery__charging-icon {
62 stroke: var(--white);
63 }
64 .simple-bar--widgets-background-color-as-foreground .battery__charging-icon {
65 stroke: var(--background);
66 }
67 .simple-bar--no-color-in-data .battery__icon-inner {
68 fill: currentColor;
69 border: 1px solid currentColor;
70 }
71 .battery__icon-filler {
72 position: absolute;
73 top: 1px;
74 left: 1px;
75 width: calc(100% - 2px);
76 height: calc(100% - 2px);
77 background-color: currentColor;
78 border-radius: 2px;
79 transform: scaleX(0);
80 transform-origin: left center;
81 transition: transform 160ms var(--transition-easing);
82 z-index: 0;
83 }
84 .simple-bar--no-color-in-data .battery__icon-filler {
85 background-color: currentColor;
86 opacity: 0.8;
87 }
88 .simple-bar--no-color-in-data .battery--caffeinate .battery__icon::after,
89 .simple-bar--no-color-in-data .battery--caffeinate .battery__icon-filler {
90 background-color: currentColor;
91 }
92 .battery--low .battery__icon-filler {
93 background-color: var(--red);
94 }
95 .battery--low-power-mode .battery__icon-filler {
96 background-color: var(--yellow);
97 }
98 .battery__caffeinate-icon {
99 position: absolute;
100 top: calc(50% - 12px);
101 right: -4px;
102 width: 26px !important;
103 height: 26px !important;
104 opacity: 0.15;
105 }
106 .battery__caffeinate-icon g path {
107 animation: coffee-spur-sliding-up 1600ms var(--transition-easing) infinite;
108 }
109 .simple-bar--animations-disabled .battery__caffeinate-icon g path {
110 animation: none;
111 }
112 .battery__caffeinate-icon g path:nth-child(2) {
113 animation-delay: -600ms;
114 }
115 .battery__caffeinate-icon g path:nth-child(3) {
116 animation-delay: -280ms;
117 }
118 @keyframes coffee-spur-sliding-up {
119 0% {
120 opacity: 0;
121 transform: translateY(3px);
122 }
123 20% {
124 opacity: 0.7;
125 }
126 80% {
127 opacity: 0.7;
128 }
129 100% {
130 opacity: 0;
131 transform: translateY(-4px);
132 }
133 }
134 `;