Skip to content

Commit 8f4e513

Browse files
authored
Merge pull request #297 from tjklint/refactor(1page)
docs: commented about.scss for better code readabliity.
2 parents a363737 + 843d8d8 commit 8f4e513

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

src/components/about/about.scss

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
align-items: flex-start;
2020
margin-bottom: 40px;
2121

22-
/* Desktop: Vertically center the photo relative to text and header */
22+
/* Vertically center the photo with text and header on desktop */
2323
@media (min-width: 769px) {
24-
align-items: center; /* Center vertically */
24+
align-items: center;
2525
}
2626

27+
/* Stack content and center text and photo on mobile */
2728
@media (max-width: 768px) {
2829
flex-direction: column;
2930
text-align: center;
@@ -33,7 +34,8 @@
3334
flex: 1;
3435
padding-right: 0;
3536
text-align: left;
36-
37+
38+
/* Center text on mobile */
3739
@media (max-width: 768px) {
3840
text-align: center;
3941
padding-right: 0;
@@ -45,19 +47,19 @@
4547
}
4648

4749
.purple-text {
48-
color: #9b30ff;
50+
color: #9b30ff; /* Purple color for highlighted text */
4951
}
5052

5153
a {
52-
color: #9b30ff;
53-
text-decoration: underline;
54+
color: #9b30ff; /* Purple color for links */
55+
text-decoration: underline; /* Always underline links */
5456

5557
&:visited {
56-
color: #9b30ff;
58+
color: #9b30ff; /* Maintain purple for visited links */
5759
}
5860

5961
&:hover {
60-
color: #8a2be2;
62+
color: #8a2be2; /* Slightly darker purple on hover */
6163
}
6264
}
6365
}
@@ -76,15 +78,15 @@
7678
border-radius: 10px;
7779
}
7880

79-
/* Mobile: Horizontal centering */
81+
/* Ensure the photo is centered horizontally and vertically on mobile */
8082
@media (max-width: 768px) {
8183
width: 70%;
8284
padding-left: 0;
8385
margin-top: 20px;
84-
margin-left: auto; /* Ensures horizontal centering */
85-
margin-right: auto; /* Ensures horizontal centering */
86-
justify-content: center; /* Keep centered horizontally */
87-
align-items: center; /* Keep centered vertically */
86+
margin-left: auto;
87+
margin-right: auto;
88+
justify-content: center;
89+
align-items: center;
8890
}
8991
}
9092
}
@@ -126,7 +128,7 @@
126128
font-family: 'RobotoMono', sans-serif;
127129

128130
&:hover {
129-
background-color: #7a23d1;
131+
background-color: #7a23d1; /* Slightly darker purple on hover */
130132
}
131133
}
132134
}
@@ -154,6 +156,7 @@
154156
grid-template-columns: 1fr 1fr;
155157
gap: 20px;
156158

159+
/* Switch to single-column layout on small screens */
157160
@media (max-width: 500px) {
158161
grid-template-columns: 1fr;
159162
}
@@ -176,6 +179,7 @@
176179
grid-template-columns: repeat(3, 1fr);
177180
gap: 10px;
178181

182+
/* Adjust to two columns on small screens */
179183
@media (max-width: 500px) {
180184
grid-template-columns: repeat(2, 1fr) !important;
181185
}
@@ -202,7 +206,7 @@
202206
}
203207

204208
&:hover {
205-
color: #8a2be2;
209+
color: #8a2be2; /* Purple highlight on hover */
206210
}
207211
}
208212
}

0 commit comments

Comments
 (0)