This repository has been archived by the owner on Jun 14, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
theme.yaml
396 lines (396 loc) · 13.6 KB
/
theme.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# Thanks @JuanMTech, @thomasloven, and @N-l1.
Dark Soft UI{color_name}:
# Color
primary-color: {primary_color}
light-primary-color: var(--primary-color)
accent-color: {accent_color}
mdc-theme-secondary: var(--accent-color)
# More colors
success-color: "#77EB60"
info-color: var(--primary-color)
warning-color: "#EBEB60"
error-color: "#D18941"
# Background
primary-background-color: {background_color}
secondary-background-color: var(--primary-background-color)
# Text
primary-text-color: "#F7F8FA"
secondary-text-color: var(--primary-text-color)
codemirror-meta: var(--primary-text-color)
material-secondary-text-color: var(--secondary-text-color)
text-primary-color: "#FFFFFF"
disabled-text-color: "#616387"
# Fonts
paper-font-headline_-_font-family: Quicksand, Roboto, sans-serif
paper-font-headline_-_font-weight: "600"
paper-font-subhead_-_font-family: Quicksand, Roboto, sans-serif
paper-font-subhead_-_font-weight: "550"
paper-font-subhead_-_line-height: 2.2em
ha-card-header-font-family: Quicksand, Roboto, sans-serif
ha-card-header-font-weight: "600"
code-font-family: Cascadia Code PL, Cascadia Mono PL, Cascadia Code, Cascadia Mono, monospace
paper-font-common-code_-_font-family: var(--code-font-family)
# Sidebar
sidebar-icon-color: var(--primary-text-color)
sidebar-text-color: var(--primary-text-color)
sidebar-selected-icon-color: var(--light-primary-color)
sidebar-selected-text-color: var(--light-primary-color)
sidebar-background-color: var(--primary-background-color)
sidebar-selected-background-color: var(--primary-background-color)
divider-color: var(--primary-background-color)
# Header
app-header-background-color: var(--primary-background-color)
app-header-text-color: var(--primary-text-color)
# Icons
state-icon-color: var(--primary-text-color)
state-icon-active-color: var(--primary-color)
state-icon-unavailable-color: var(--disabled-text-color)
# Sliders
paper-slider-knob-color: var(--primary-color)
paper-slider-knob-start-color: var(--primary-color)
paper-slider-pin-color: var(--primary-color)
paper-slider-active-color: var(--primary-color)
paper-slider-secondary-color: var(--light-primary-color)
# Labels
label-badge-background-color: var(--primary-background-color)
label-badge-text-color: var(--primary-text-color)
label-badge-red: "#EB6065"
label-badge-green: "#60EB67"
label-badge-blue: "#60B1EB"
label-badge-yellow: "#EBC860"
label-badge-gray: "#666F80"
# Cards
ha-card-border-radius: "13.75px"
ha-card-box-shadow: -5.25px -5.25px 5.25px 0 rgba(60, 60, 60, .6), 5.25px 5.25px 5.25px 0 rgba(0, 0, 0, .15)
ha-card-border-color: var(--primary-color)
ha-card-border-width: 3px
card-background-color: var(--primary-background-color)
paper-card-background-color: var(--primary-background-color)
paper-listbox-background-color: var(--primary-background-color)
# Switches
switch-checked-button-color: var(--primary-color)
switch-checked-track-color: var(--primary-color)
switch-unchecked-button-color: var(--disabled-text-color)
switch-unchecked-track-color: var(--disabled-text-color)
paper-toggle-button-checked-button-color: var(--primary-color)
paper-toggle-button-checked-bar-color: var(--primary-color)
paper-toggle-button-unchecked-button-color: var(--disabled-text-color)
paper-toggle-button-unchecked-bar-color: var(--disabled-text-color)
# Tables
table-row-background-color: var(--primary-background-color)
table-row-alternative-background-color: var(--primary-background-color)
data-table-background-color: var(--primary-background-color)
# Dropdowns
material-background-color: var(--primary-background-color)
material-secondary-background-color: rgba(255, 255, 255, 0.1)
mdc-theme-surface: var(--primary-background-color)
# Convenience
primary-name-text-color: grey
primary-state-text-color: grey
primary-icon-color: grey
primary-yellow: "#FAD46B"
dark-primary-yellow: "#DAB44B"
tertiary-background-color: "#323545"
ha-card-box-shadow-inset: inset -5.5px -5.5px 5.5px 0 rgba(60, 60, 60, .5), inset 5.5px 5.5px 5.5px 0 rgba(0, 0, 0, .5)
soft-ui-pressed: var(--ha-card-box-shadow-inset)
soft-ui-shadow: var(--ha-card-box-shadow)
red: "#eb6060"
red-orange: "#eb8e60"
orange-red: "#eb9a60"
orange: "#eba560"
orange-yellow: "#ebc860"
yellow-orange: "#ebd460"
yellow: "#ebdf60"
yellow-green: "#c8eb60"
green-yellow: "#b1eb60"
green: "#60eb60"
green-cyan: "#60eba5"
cyan-green: "#60ebc8"
cyan: "#60ebeb"
cyan-blue: "#60bceb"
blue-cyan: "#608eeb"
blue: "#6060eb"
blue-purple: "#7760eb"
purple-blue: "#8e60eb"
purple: "#a560eb"
purple-pink: "#bc60eb"
pink-purple: "#d460eb"
pink: "#eb60eb"
pink-red: "#eb60bc"
red-pink: "#eb608e"
# Card-mod
card-mod-theme: "Dark Soft UI{color_name}"
theme-red: firebrick
theme-green: forestgreen
theme-blue: deepskyblue
ha-label-badge-title-font-size: 1em
# Cards
card-mod-card-yaml: |
.: |
* {
--soft-ui-shadow: var(--ha-card-box-shadow) !important;
--soft-ui-pressed: var(--ha-card-box-shadow-inset) !important;
}
ha-card.type-markdown {
box-shadow: none;
}
ha-card.type-markdown > ha-markdown {
padding: 8px;
}
ha-card:not(.type-markdown) {
background-color: var(--primary-background-color);
border-radius: var(--ha-card-border-radius);
}
ha-card:not(.type-markdown):not(.type-custom-button-card):not(.type-entities):not(.type-custom-mod-card):not(.type-custom-bar-card):not(.type-history-graph):not(.type-iframe):not(.type-glance) {
margin: 20px 6px;
box-shadow: var(--ha-card-box-shadow);
}
ha-card.type-custom-vacuum-card > .preview {
--primary-color: var(--primary-background-color);
}
ha-card.type-custom-vacuum-card > .preview > * {
color: var(--primary-text-color);
}
ha-card.type-custom-vacuum-card > .preview > .header > .battery > ha-icon {
color: var(--primary-text-color);
}
ha-card.type-custom-vacuum-card > .preview > .metadata > .vacuum-name {
color: var(--primary-text-color);
}
ha-card.type-picture-entity,
ha-card.type-picture-glance {
padding: 10px;
}
ha-card.type-picture-entity > .footer,
ha-card.type-picture-glance > .box {
margin: 10px;
border-radius: 15px;
}
ha-card.type-entities, ha-card.type-custom-bar-card, ha-card.type-entity,
ha-card.type-history-graph, ha-card.type-map, ha-card.type-iframe,
ha-card.type-glance, ha-card.type-custom-button-text-card,
ha-card.type-custom-select-list-card {
box-shadow: none !important;
margin: 25px 6px;
}
ha-card > #states > div > * {
padding-top: 8px;
padding-bottom: 8px;
width: 95%;
margin: 0 auto 0 5px;
}
ha-card > #states > div > *:not(hui-button-row):not(hui-input-select-entity-row):not(hui-input-number-entity-row):not(hui-input-text-entity-row):not(hui-cast-row) {
display: block;
}
ha-card.type-media-control, ha-card.type-media-control > * {
background-color: var(--primary-background-color) !important;
color: var(--secondary-text-color) !important;
}
ha-card > #states,
ha-card > .header-footer,
ha-card > hui-graph-header-footer,
ha-card.type-glance > .entities,
ha-card:not(.type-humidifier):not(.type-light):not(.type-weather-forecast) > .content,
ha-card.type-map > #root > #map,
ha-card.type-iframe > #root,
ha-card.type-custom-select-list-card > #list {
box-shadow: var(--ha-card-box-shadow);
border-radius: var(--ha-card-border-radius);
margin: 12px;
padding: 10px;
}
ha-card.type-iframe > #root > iframe {
border-radius: var(--ha-card-border-radius);
}
ha-card.type-entity > .info {
padding: 16px;
box-shadow: var(--ha-card-box-shadow);
border-radius: var(--ha-card-border-radius);
margin: 12px;
}
ha-card > .header-footer {
margin: 25px 12px;
}
ha-card > .card-header {
box-shadow: none;
}
ha-card > .card-header > .name {
text-align: center;
width: 100%;
}
ha-card > .card-header > hui-entities-toggle {
margin: 0 25px 0 -25px;
}
ha-card.type-custom-bar-card > .card-header,
ha-card.type-history-graph > .card-header,
ha-card.type-map > .card-header,
ha-card.type-iframe > .card-header,
ha-card.type-shopping-list > .card-header,
ha-card.type-glance > .card-header {
text-align: center;
width: 70%;
margin: 0 auto;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}
ha-icon[data-domain="fan"][data-state="on"] {
animation: spin 4s infinite linear;
}
# Header
header-height: 48px # Change this to 0px for header on the bottom. You're 1/3 there.
card-mod-root-yaml: |
paper-tabs$: |
/* Uncomment this for header on the bottom. You're 2/3 there.
#selectionBar {
bottom: unset !important;
}
*/
.: |
/* This moves the header up. */
app-header {
transform: translate3d(0px, -48px, 0px);
}
/* Let's change the background. */
app-header, app-toolbar {
background: var(--primary-background-color) !important;
color: var(--primary-text-color) !important;
}
/* We're still going to need a way to see that we're in edit mode. */
app-header.edit-mode {
padding-bottom: calc(var(--ha-card-border-width, 2px) * 2);
border-bottom: var(--ha-card-border-width, 2px) solid var(--primary-color);
}
/* This changes the color of the currently selected tab. */
ha-tabs {
--paper-tabs-selection-bar-color: var(--primary-color) !important;
}
paper-tab[aria-selected=true] {
color: var(--primary-color) !important;
}
/* This hides the help button. */
a.menu-link[target="_blank"] {
display: none;
}
/* This makes the plus color the same as the background. */
#add-view {
color: var(--primary-background-color);
}
/* This hides the title. */
[main-title] {
display: none;
}
/* This hides the app-toolbar in edit mode. */
app-toolbar.edit-mode {
height: 0;
}
/* This moves the edit mode buttons back in. */
app-toolbar.edit-mode > mwc-icon-button {
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
app-toolbar.edit-mode > ha-button-menu {
position: absolute;
right: 0;
top: 0;
z-index: 1;
}
/* This adds a bit more padding, mainly for unused entities. */
app-header.edit-mode > div {
padding-left: 5px;
}
/* Uncomment this for header on the bottom. You're 3/3 there.
app-header {
top: calc(100vh - 60px) !important;
bottom: 0 !important;
transform: unset !important;
}
*/
# Badges and columns
card-mod-view-yaml: |
hui-masonry-view$: |
/* Delete to fix left-aligned
#columns {
flex-direction: column !important;
margin: 0 auto;
max-width: 500px;
}
*/
card-mod-badge-yaml: |
.: |
:host {
border-radius: 5px;
padding: 11px 8px;
margin: 11px 12px 24px 12px;
display: inline-block;
--label-badge-blue: {% if not states(config.entity) %} var(--theme-blue);
{% elif is_state(config.entity, 'on') %} var(--theme-green);
{% elif is_state(config.entity, 'open') %} var(--theme-green);
{% elif is_state(config.entity, 'unlocked') %} var(--theme-green);
{% elif is_state(config.entity, 'off') %} var(--theme-red);
{% elif is_state(config.entity, 'closed') %} var(--theme-red);
{% elif is_state(config.entity, 'locked') %} var(--theme-red);
{% else %} var(--theme-blue); {% endif %}
--label-badge-red: teal;
box-shadow: var(--ha-card-box-shadow);
}
ha-state-label-badge$ha-label-badge$: |
.label-badge {
background: none;
}
.title {
-webkit-line-clamp: 1;
display: -webkit-box;
-webkit-box-orient: vertical;
}
# Style more info
card-mod-more-info-yaml: |
$: |
.mdc-dialog {
backdrop-filter: blur(2px);
background-color: {more_info_background_color} !important;
}
.mdc-dialog__scrim {
background-color: {more_info_background_color} !important;
}
.mdc-dialog .mdc-dialog__container .mdc-dialog__surface {
background: var(--primary-background-color);
border-radius: var(--ha-card-border-radius);
box-shadow: var(--ha-card-box-shadow);
transform: scale(0.9);
overflow: hidden;
}
.mdc-dialog__content {
padding: 36px !important;
padding-bottom: 36px !important;
transform: scale(1.11);
}
ha-header-bar:
$: |
.mdc-top-app-bar {
background: none !important;
}
# Spin fans
card-mod-row-yaml: |
"*:first-child":
$: |
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}
state-badge {
{% if config.entity.startswith('fan.') and is_state(config.entity, 'on') %}
animation: spin 4s infinite linear;
{% endif %}
}