Skip to content

Commit 5b49459

Browse files
Update index.css
Added English comments to index.css for better documentation. Each CSS selector and property now has a clear explanation in English, describing its purpose and effect on the layout or design. No logic or functionality was changed, only comments were added to improve readability and maintainability for developers.
1 parent 0920e62 commit 5b49459

1 file changed

Lines changed: 36 additions & 36 deletions

File tree

src/index.css

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
11
:root {
2-
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3-
line-height: 1.5;
4-
font-weight: 400;
2+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; /* Defines the default font family */
3+
line-height: 1.5; /* Sets the default line height */
4+
font-weight: 400; /* Sets the default font weight */
55

6-
color-scheme: light dark;
7-
color: rgba(255, 255, 255, 0.87);
8-
background-color: #242424;
6+
color-scheme: light dark; /* Enables support for light and dark themes */
7+
color: rgba(255, 255, 255, 0.87); /* Default text color */
8+
background-color: #242424; /* Default background color */
99

10-
font-synthesis: none;
11-
text-rendering: optimizeLegibility;
12-
-webkit-font-smoothing: antialiased;
13-
-moz-osx-font-smoothing: grayscale;
10+
font-synthesis: none; /* Prevents synthetic bold/italic styles */
11+
text-rendering: optimizeLegibility; /* Improves text rendering for readability */
12+
-webkit-font-smoothing: antialiased; /* Smooths fonts on WebKit browsers */
13+
-moz-osx-font-smoothing: grayscale; /* Smooths fonts on macOS Firefox */
1414
}
1515

1616
a {
17-
font-weight: 500;
18-
color: #646cff;
19-
text-decoration: inherit;
17+
font-weight: 500; /* Sets link font weight */
18+
color: #646cff; /* Default link color */
19+
text-decoration: inherit; /* Inherits text decoration from parent */
2020
}
2121
a:hover {
22-
color: #535bf2;
22+
color: #535bf2; /* Link color when hovered */
2323
}
2424

2525
body {
26-
margin: 0;
27-
display: flex;
28-
place-items: center;
29-
min-width: 320px;
30-
min-height: 100vh;
26+
margin: 0; /* Removes default margin */
27+
display: flex; /* Uses flexbox layout */
28+
place-items: center; /* Centers content both vertically and horizontally */
29+
min-width: 320px; /* Minimum width for responsiveness */
30+
min-height: 100vh; /* Full viewport height */
3131
}
3232

3333
h1 {
34-
font-size: 3.2em;
35-
line-height: 1.1;
34+
font-size: 3.2em; /* Large heading size */
35+
line-height: 1.1; /* Tight line spacing for headings */
3636
}
3737

3838
button {
39-
border-radius: 8px;
40-
border: 1px solid transparent;
41-
padding: 0.6em 1.2em;
42-
font-size: 1em;
43-
font-weight: 500;
44-
font-family: inherit;
45-
background-color: #1a1a1a;
46-
cursor: pointer;
47-
transition: border-color 0.25s;
39+
border-radius: 8px; /* Rounded corners */
40+
border: 1px solid transparent; /* Transparent border by default */
41+
padding: 0.6em 1.2em; /* Button padding */
42+
font-size: 1em; /* Button text size */
43+
font-weight: 500; /* Button text weight */
44+
font-family: inherit; /* Inherits font from parent */
45+
background-color: #1a1a1a; /* Default button background */
46+
cursor: pointer; /* Pointer cursor on hover */
47+
transition: border-color 0.25s; /* Smooth border color transition */
4848
}
4949
button:hover {
50-
border-color: #646cff;
50+
border-color: #646cff; /* Border color when hovered */
5151
}
5252
button:focus,
5353
button:focus-visible {
54-
outline: 4px auto -webkit-focus-ring-color;
54+
outline: 4px auto -webkit-focus-ring-color; /* Outline for accessibility focus */
5555
}
5656

5757
@media (prefers-color-scheme: light) {
5858
:root {
59-
color: #213547;
60-
background-color: #ffffff;
59+
color: #213547; /* Text color in light mode */
60+
background-color: #ffffff; /* Background color in light mode */
6161
}
6262
a:hover {
63-
color: #747bff;
63+
color: #747bff; /* Link hover color in light mode */
6464
}
6565
button {
66-
background-color: #f9f9f9;
66+
background-color: #f9f9f9; /* Button background in light mode */
6767
}
6868
}

0 commit comments

Comments
 (0)