blob: 210add829d5b57f7b10d30acf8fdaf236c4e8914 (
plain)
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
|
@import '../../styles/themes';
@import '~@nebular/theme/styles/global/bootstrap/hero-buttons';
@import '~bootstrap/scss/mixins/breakpoints';
@import '~@nebular/theme/styles/global/bootstrap/breakpoints';
@include nb-install-component() {
display: flex;
flex-direction: column;
align-items: center;
width: 50%;
.theme-switch {
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
margin: 0;
& > span {
font-size: 1.125rem;
font-weight: nb-theme(font-weight-bold);
transition: opacity 0.3s ease;
&.light {
color: nb-theme(color-fg-text);
padding-right: 10px;
}
&.cosmic {
color: nb-theme(color-fg);
padding-left: 10px;
}
@include nb-for-theme(cosmic) {
&.light {
color: nb-theme(color-fg);
}
&.cosmic {
color: nb-theme(color-white);
}
}
&:active {
opacity: 0.78;
}
}
}
.switch {
position: relative;
display: inline-block;
width: 4rem;
height: 1.75rem;
margin: 0;
input {
display: none;
&:checked + .slider::before {
transform: translateX(2.25rem);
}
}
.slider {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 1.75rem;
background-color: nb-theme(layout-bg);
}
.slider::before {
position: absolute;
content: '';
height: 1.75rem;
width: 1.75rem;
border-radius: 50%;
background-color: nb-theme(color-success);
transition: 0.2s;
box-shadow: 0 0 0.25rem 0 rgba(nb-theme(color-fg), 0.4);
@include nb-for-theme(cosmic) {
@include btn-hero-primary-gradient();
}
}
}
@include media-breakpoint-down(is) {
.light, .cosmic {
display: none;
}
}
@include media-breakpoint-down(xs) {
align-items: flex-end;
}
}
|