Skip to content

Commit 899fadd

Browse files
committed
Update style.css
1 parent cf5654b commit 899fadd

File tree

1 file changed

+41
-38
lines changed

1 file changed

+41
-38
lines changed

style.css

+41-38
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
/*Title Container*/
12
.container {
23
text-align: center;
34
padding-top: 100px;
45
}
56

7+
/*Title Text*/
68
.title {
79
font-size: 800%;
810
font-weight: bold;
@@ -11,13 +13,15 @@
1113
display: inline;
1214
}
1315

16+
/*Actual Content*/
1417
.content {
1518
padding: 100px;
1619
padding-top: 0;
1720
font-size: 300%;
1821
text-align: center;
1922
}
2023

24+
/*Contains both title and actual content*/
2125
.main {
2226
position:absolute;
2327
color: #323232;
@@ -29,11 +33,11 @@
2933
height: 200%;
3034
}
3135

36+
/*Sidebar's Box*/
3237
.sidebar {
3338
text-align: center;
3439
height: 100%;
3540
width: 70%;
36-
font-size: 350%;
3741
position: fixed;
3842
top: 0;
3943
background-color: MediumSeaGreen;
@@ -42,24 +46,28 @@
4246
transition: 200ms all ease;
4347
}
4448

49+
/*Sidebar Links*/
4550
.sidebar a {
4651
display: block;
4752
color: white;
53+
font-size: 350%;
4854
padding: 40px;
4955
text-decoration: none;
5056
transition: 200ms all;
5157
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
5258
}
5359

54-
60+
/*Easter Egg*/
5561
.easter-egg-button {
5662
bottom: -450px;
5763
}
5864

65+
/*Hidden checkbox for sidebar-toggle*/
5966
#sidebar-toggle {
6067
display: none;
6168
}
6269

70+
/*The fancy button button for opening sidebar*/
6371
.sidebar-toggle-button::before {
6472
text-align: center;
6573
content: "☰";
@@ -75,47 +83,51 @@
7583
font-size: 72px;
7684
}
7785

86+
/*Executing Anmiation for opening the sidebar*/
7887
#sidebar-toggle:checked ~ .sidebar-toggle-button::before {
7988
animation-name: to-x;
8089
animation-duration: 500ms;
8190
animation-fill-mode: forwards;
8291
}
8392

93+
/*Executing Anmiation for closing the sidebar*/
8494
#sidebar-toggle:not(checked) ~ .sidebar-toggle-button::before {
8595
animation-name: to-ham;
8696
animation-duration: 500ms;
8797
animation-fill-mode: forwards;
8898
}
8999

100+
/*the sidebar button animations*/
90101
@keyframes to-ham {
91-
from {
92-
content: "✕";
93-
}
94102
to {
95103
transform:rotateZ(1turn);
96104
content: "☰";
97105
}
98106
}
99-
100107
@keyframes to-x {
101-
from {
102-
content: "☰";
103-
}
104108
to {
105109
transform:rotateZ(-1turn);
106110
content: "✕";
107111
}
108112
}
109113

114+
/*Shadow on main content when sidebar is open*/
110115
#sidebar-toggle:checked ~ .sidebar {
111116
right: 0px;
112117
box-shadow: 0px 0px 200px 500px hsla(0, 0%, 0%, 0.732);
113118
}
114119

120+
/*Hover effect for links in the sidebar*/
115121
.sidebar > a:hover {
116122
color: #323232;
117123
}
118124

125+
/*hidden checkbox for theme-toggle*/
126+
#theme-toggle {
127+
display: none;
128+
}
129+
130+
/*fancy button for theme toggle*/
119131
.theme-toggle-button::before {
120132
content: "☀️";
121133
font-size: 81.5px;
@@ -129,65 +141,54 @@
129141
border-radius: 50%;
130142
z-index: 9999;
131143
}
132-
133-
#theme-toggle {
134-
display: none;
135-
}
136-
137-
#theme-toggle:checked + .theme-toggle-button {
138-
background-color: #323232;
139-
}
140-
144+
/*Animation for theme-toggle button*/
141145
@keyframes to-moon {
142-
from {
143-
content: "☀️";
144-
}
146+
from {}
145147
to {
146148
transform:rotateZ(1turn);
147149
content: "🌑";
148150
}
149151
}
150-
151152
@keyframes to-sun {
152-
from {
153-
content: "🌑";
154-
}
153+
from {}
155154
to {
156155
transform:rotateZ(-1turn);
157156
content: "☀️";
158157
}
159158
}
160159

160+
/*executing theme-toggle animation*/
161161
#theme-toggle:checked ~ .theme-toggle-button::before {
162162
animation-name: to-moon;
163163
animation-duration: 500ms;
164164
animation-fill-mode: forwards;
165165
}
166-
167166
#theme-toggle:not(checked) ~ .theme-toggle-button::before {
168167
animation-name: to-sun;
169168
animation-duration: 500ms;
170169
animation-fill-mode: forwards;
171170
}
172171

172+
/*actual theme change on the main content*/
173173
#theme-toggle:checked ~ .main {
174174
background: #051428;
175175
color: #faebd7;
176176
}
177177

178+
/*actual theme change on the sidebar*/
178179
#theme-toggle:checked ~ .sidebar {
179180
background-color: #102f1e;
180181
}
181182

182-
#theme-toggle:checked ~ .sidebar-toggle-button {
183-
color: white;
184-
}
185-
183+
/*adjusting easter-egg's size*/
186184
.easter-egg-button > img {
187185
padding-top: 75%;
188186
}
189187

188+
189+
/*optimizations for the desktop*/
190190
@media (min-width: 1280px) {
191+
/*adjust the theme-toggle size*/
191192
.theme-toggle-button::before {
192193
content: "☀️";
193194
font-size: 225%;
@@ -201,27 +202,29 @@
201202
z-index: 9999;
202203
}
203204

205+
/*disable sidebar's shadow*/
204206
#sidebar-toggle:checked ~ .sidebar {
205207
right: 0px;
206208
box-shadow: 0px 0px 0px 0px hsla(0, 0%, 0%, 0);
207209
}
208210

211+
/*make font smaller and always keep the sidebar open*/
209212
.sidebar {
210213
text-align: center;
211214
height: 100%;
212215
width: 12%;
213-
font-size: 150%;
214216
position: fixed;
215217
top: 0;
216218
background-color: MediumSeaGreen;
217219
padding-top: 25px;
218220
right: 0%;
219221
transition: 200ms all ease;
220222
}
221-
223+
224+
/*make the sidebar links font smaller*/
222225
.sidebar a {
223-
display: flex;
224226
justify-content: space-evenly;
227+
font-size: 150%;
225228
color: white;
226229
padding: 35px;
227230
text-decoration: none;
@@ -230,25 +233,24 @@
230233
white-space: nowrap;
231234
}
232235

236+
/*disable the mobile sidebar toggle*/
233237
.sidebar-toggle-button {
234238
display: none;
235239
}
236240

237-
#theme-toggle:checked ~ .main {
238-
background: #051428;
239-
color: #faebd7;
240-
}
241-
241+
/*adjust easteregg size for desktop*/
242242
.easter-egg-button > img {
243243
max-width: 75%;
244244
padding-top: 225%;
245245
}
246246

247+
/*move the main content to make space for the always open sidebar*/
247248
.main {
248249
padding-top: 0;
249250
right: 12%;
250251
}
251252

253+
/*make title smaller*/
252254
.title {
253255
font-size: 500%;
254256
font-weight: bold;
@@ -257,6 +259,7 @@
257259
display: inline;
258260
}
259261

262+
/*reduce font size because large text is not needed on the desktop*/
260263
.content {
261264
font-size: 200%;
262265
}

0 commit comments

Comments
 (0)