-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththemeToggle.css
More file actions
218 lines (180 loc) · 4.91 KB
/
Copy paththemeToggle.css
File metadata and controls
218 lines (180 loc) · 4.91 KB
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
/**
* themeToggle.css - Tema Modu Geçiş Bileşeni Stilleri
*
* Bu dosya tema modunu değiştirmek için buton grubunun stilini içerir.
* Hem light hem dark temalar için optimize edilmiştir.
*/
/* ============================================
Ana Tema Buton Konteyner Stilleri
============================================ */
.theme-toggle-container {
display: flex;
align-items: center;
gap: 0.25rem;
padding: 0.5rem;
border-radius: 9999px;
background-color: rgba(229, 231, 235, 0.3);
backdrop-filter: blur(10px);
width: fit-content;
}
/* Dark mode için konteyner */
.dark .theme-toggle-container {
background-color: rgba(55, 65, 81, 0.3);
}
/* ============================================
Tema Buton Temel Stilleri
============================================ */
.theme-btn {
/* Boyut ve aralık */
padding: 0.375rem 0.5rem;
font-size: 0.65rem;
line-height: 1.2;
border: none;
border-radius: 9999px;
/* Görünüm */
cursor: pointer;
font-weight: 500;
letter-spacing: 0.025em;
/* Keep text as-is (do not force uppercase) */
text-transform: none;
transition: all 0.2s ease-in-out;
/* Metin rengü - light mode */
color: rgb(75, 85, 99);
background-color: transparent;
/* Erişilebilirlik */
user-select: none;
-webkit-user-select: none;
}
/* Dark mode metin rengi */
.dark .theme-btn {
color: rgb(209, 213, 219);
}
/* ============================================
Tema Buton Hover Durumu (Seçili Değil)
============================================ */
.theme-btn:not(.active):hover {
background-color: rgba(209, 213, 219, 0.18);
}
.dark .theme-btn:not(.active):hover {
background-color: rgba(107, 114, 128, 0.18);
}
/* ============================================
Tema Buton Aktif/Seçili Durumu
============================================ */
.theme-btn.active,
.theme-btn[aria-pressed="true"] {
/* Arka plan - light mode */
background-color: rgba(255, 255, 255, 0.45);
color: rgb(55, 65, 81);
/* Gölge efekti */
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* Dark mode aktif butonu */
.dark .theme-btn.active,
.dark .theme-btn[aria-pressed="true"] {
background-color: rgba(107, 114, 128, 0.45);
color: rgb(243, 244, 246);
}
/* ============================================
Tema Buton Focus/Odak Durumu
============================================ */
.theme-btn:focus-visible {
outline: 2px solid currentColor;
outline-offset: 1px;
opacity: 0.9;
}
/* ============================================
Tema Buton Devre Dışı Durumu
============================================ */
.theme-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* ============================================
İkon ve Metin Kombinasyonları
============================================ */
/* İkona sahip butonlar için */
.theme-btn .icon {
display: inline-block;
margin-right: 0.25rem;
width: 1em;
height: 1em;
vertical-align: -0.125em;
}
/* ============================================
Responsive Tasarım
============================================ */
/* Çok küçük ekranlar (mobil) */
@media (max-width: 480px) {
.theme-toggle-container {
padding: 0.375rem;
gap: 0.125rem;
}
.theme-btn {
padding: 0.25rem 0.375rem;
font-size: 0.6rem;
}
}
/* Tablet ve daha küçük */
@media (max-width: 768px) {
.theme-btn {
padding: 0.3rem 0.45rem;
}
}
/* Büyük ekranlar */
@media (min-width: 1024px) {
.theme-btn {
padding: 0.4rem 0.6rem;
font-size: 0.7rem;
}
}
/* ============================================
Animasyonlar
============================================ */
@keyframes buttonPulse {
0% {
box-shadow: 0 0 0 0 rgba(107, 114, 128, 0.7);
}
70% {
box-shadow: 0 0 0 6px rgba(107, 114, 128, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(107, 114, 128, 0);
}
}
.theme-btn.active:active {
animation: buttonPulse 0.6s ease-out;
}
/* ============================================
Erişilebilirlik Modu
============================================ */
@media (prefers-reduced-motion: reduce) {
.theme-btn {
transition: none;
}
.theme-btn.active:active {
animation: none;
}
}
/* ============================================
Bas İhtiyaç Modları
============================================ */
/* Yüksek Contrast Mode */
@media (prefers-contrast: more) {
.theme-toggle-container {
border: 1px solid currentColor;
background-color: transparent;
}
.theme-btn.active {
text-decoration: underline;
font-weight: 700;
}
}
/* ============================================
Print Stilleri
============================================ */
@media print {
.theme-toggle-container {
display: none;
}
}