|
1 | 1 | :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 */ |
5 | 5 |
|
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 */ |
9 | 9 |
|
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 */ |
14 | 14 | } |
15 | 15 |
|
16 | 16 | 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 */ |
20 | 20 | } |
21 | 21 | a:hover { |
22 | | - color: #535bf2; |
| 22 | + color: #535bf2; /* Link color when hovered */ |
23 | 23 | } |
24 | 24 |
|
25 | 25 | 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 */ |
31 | 31 | } |
32 | 32 |
|
33 | 33 | 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 */ |
36 | 36 | } |
37 | 37 |
|
38 | 38 | 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 */ |
48 | 48 | } |
49 | 49 | button:hover { |
50 | | - border-color: #646cff; |
| 50 | + border-color: #646cff; /* Border color when hovered */ |
51 | 51 | } |
52 | 52 | button:focus, |
53 | 53 | button:focus-visible { |
54 | | - outline: 4px auto -webkit-focus-ring-color; |
| 54 | + outline: 4px auto -webkit-focus-ring-color; /* Outline for accessibility focus */ |
55 | 55 | } |
56 | 56 |
|
57 | 57 | @media (prefers-color-scheme: light) { |
58 | 58 | :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 */ |
61 | 61 | } |
62 | 62 | a:hover { |
63 | | - color: #747bff; |
| 63 | + color: #747bff; /* Link hover color in light mode */ |
64 | 64 | } |
65 | 65 | button { |
66 | | - background-color: #f9f9f9; |
| 66 | + background-color: #f9f9f9; /* Button background in light mode */ |
67 | 67 | } |
68 | 68 | } |
0 commit comments