Skip to content

Commit 0f288f7

Browse files
committed
Initial-theme-fix
Added light.css Added dark.css Added link for light.css and dark.css with media attribute Added switcher
1 parent 9ef0483 commit 0f288f7

File tree

10 files changed

+548
-1
lines changed

10 files changed

+548
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:root {
2+
3+
}
4+
5+
/* Theme switcher */
6+
7+
.switcher__radio {
8+
filter: invert(1);
9+
}
10+
11+
.switcher__radio:checked {
12+
filter: invert(0);
13+
}
14+
15+
.switcher__status {
16+
filter: invert(1);
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:root {
2+
3+
}
4+
5+
/* Theme switcher */
6+
7+
.switcher__radio {
8+
filter: invert(0);
9+
}
10+
11+
.switcher__radio:checked {
12+
filter: invert(1);
13+
}
14+
15+
.switcher__status {
16+
filter: invert(0);
17+
}

deps/rabbitmq_management/priv/www/css/main.css

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
:root {
2+
color-scheme: light dark;
3+
}
4+
15
body { font: 12px Verdana, sans-serif; color: #484848; padding: 0; margin: 0; }
26
input, button, a.button { font: 12px Verdana, sans-serif; }
37

@@ -428,3 +432,90 @@ input.toggle:checked + label.toggle:after {
428432
.yellow-background {
429433
background-color: #ffff7b;
430434
}
435+
436+
/* Theme switcher */
437+
438+
.switcher {
439+
height: 32px;
440+
width: 96px;
441+
position: relative;
442+
margin: 2px;
443+
margin-left: -50px;
444+
padding: 2px;
445+
display: grid;
446+
grid-template-columns: 1fr 1fr 1fr;
447+
border: none;
448+
}
449+
450+
/* Theme switcher legend */
451+
452+
.switcher__legend {
453+
position: absolute;
454+
opacity: 0;
455+
pointer-events: none;
456+
}
457+
458+
/* Theme switcher radio */
459+
460+
.switcher__radio {
461+
-webkit-appearance: none;
462+
appearance: none;
463+
margin: 0;
464+
width: 32px;
465+
height: 32px;
466+
background-position: center;
467+
background-repeat: no-repeat;
468+
background-size: 24px;
469+
transition: filter 0.1s ease-in;
470+
}
471+
472+
.switcher__radio:focus {
473+
outline: none;
474+
}
475+
476+
.switcher__radio--light {
477+
background-image: url('../ing/light.svg');
478+
}
479+
480+
.switcher__radio--auto {
481+
background-image: url('../ing/auto.svg');
482+
}
483+
484+
.switcher__radio--dark {
485+
background-image: url('../img/dark.svg');
486+
}
487+
488+
/* Switcher status */
489+
490+
.switcher__status {
491+
position: absolute;
492+
top: 0;
493+
right: 0;
494+
bottom: 0;
495+
left: 0;
496+
z-index: -1;
497+
box-shadow: 0 0 0 2px rgb(0 0 0 /0.2);
498+
border-radius: 18px;
499+
background-color: rgb(255 255 255 / 0.5);
500+
background-repeat: no-repeat;
501+
background-image: url('../ing/status.svg');
502+
background-size: 32px;
503+
background-position: center;
504+
transition: background-position 0.1s ease-in;
505+
}
506+
507+
.switcher__radio:focus-visible ~ .switcher__status {
508+
box-shadow: 0 0 0 2px black;
509+
}
510+
511+
.switcher__radio--light:checked ~ .switcher__status {
512+
background-position: left 2px center;
513+
}
514+
515+
.switcher__radio--auto:checked ~ .switcher__status {
516+
background-position: center center;
517+
}
518+
519+
.switcher__radio--dark:checked ~ .switcher__status {
520+
background-position: right 2px center;
521+
}
Lines changed: 67 additions & 0 deletions
Loading
Lines changed: 63 additions & 0 deletions
Loading
Lines changed: 130 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)