Skip to content

Commit 936a6a6

Browse files
committed
Improve hero section styling with detailed comments
- Added comments to clarify the styling for the hero section, including title, description, and links. - Improved button layout using flexbox, with comments explaining width, padding, and alignment choices. - Enhanced readability by documenting key CSS properties for future maintainability.
1 parent a311dc6 commit 936a6a6

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

webpack/sass/home-page.scss

+22-2
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,44 @@
22
.hero {
33
@extend .margin-top-large;
44

5+
// Title styling within the hero section
56
.hero-title {
67
@extend .padding-horizontal-big;
78
}
89

10+
// Description styling within the hero section
911
.hero-description {
1012
@extend .body-bigger;
1113
@extend .padding-top-big;
1214
@extend .padding-horizontal-big;
1315
}
1416

17+
// Links container within the hero section
1518
.hero-links {
1619
@extend .margin-vertical-normal;
1720
@extend .padding-horizontal-big;
1821

22+
// Use flexbox for layout
23+
display: flex;
24+
flex-direction: column; // Stack buttons vertically
25+
align-items: center; // Center-align the buttons
26+
27+
// Button styling within the hero links
1928
.button {
29+
// Apply normal top margin from the defined style
2030
@extend .margin-top-normal;
21-
text-decoration: none;
22-
31+
text-decoration: none; // Remove default underline from links
32+
margin-bottom: 0.5rem; // Add spacing between buttons
33+
width: 100%; // Full width of the container
34+
max-width: 300px; // Maximum width for buttons
35+
padding: 1rem; // Padding inside buttons
36+
box-sizing: border-box; // Include padding in width calculation
37+
text-align: center; // Center text inside buttons
38+
font-size: 1em; // Set font size
39+
line-height: 1.2; // Set line height for readability
40+
white-space: normal; // Allow text wrapping within buttons
41+
42+
// Icon styling within buttons
2343
.icon {
2444
@extend .margin-right-small;
2545
@extend .padding-vertical-smaller;

0 commit comments

Comments
 (0)