Skip to content

Commit d874fe2

Browse files
authored
Merge pull request #1168 from Diksha78-bot/fix/inconsistent-padding-margins
fix(#980): Standardize section spacing
2 parents f174f96 + 2d3a867 commit d874fe2

File tree

5 files changed

+91
-94
lines changed

5 files changed

+91
-94
lines changed
Lines changed: 26 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
.landing-community {
22
width: 100%;
3-
padding: 16px;
3+
padding: 2rem;
4+
margin: 2rem 0;
45
}
56

67
.landing-community .landing-community__header {
78
display: flex;
89
justify-content: space-between;
910
align-items: center;
1011
max-width: 100%;
11-
margin-bottom: 1rem;
12-
padding: auto 1rem;
12+
margin-bottom: 2rem;
13+
padding: 0 1rem;
1314
flex-wrap: wrap;
1415
}
1516

@@ -46,10 +47,7 @@
4647
gap: 1rem;
4748
}
4849

49-
.landing-community
50-
.landing-community__content
51-
.landing-community__stats
52-
.landing-community__stat-item {
50+
.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item {
5351
display: flex;
5452
flex-direction: column;
5553
justify-content: center;
@@ -62,47 +60,28 @@
6260
position: relative;
6361
}
6462

65-
.landing-community
66-
.landing-community__content
67-
.landing-community__stats
68-
.landing-community__stat-item.clickable {
63+
.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item.clickable {
6964
cursor: pointer;
7065
}
7166

72-
.landing-community
73-
.landing-community__content
74-
.landing-community__stats
75-
.landing-community__stat-item.clickable:hover,
76-
.landing-community
77-
.landing-community__content
78-
.landing-community__stats
79-
.landing-community__stat-item.clickable:focus {
67+
.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item.clickable:hover,
68+
.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item.clickable:focus {
8069
transform: scale(1.02);
8170
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
8271
outline: none;
8372
}
8473

85-
.landing-community
86-
.landing-community__content
87-
.landing-community__stats
88-
.landing-community__stat-item.loading {
74+
.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item.loading {
8975
opacity: 0.7;
9076
}
9177

92-
.landing-community
93-
.landing-community__content
94-
.landing-community__stats
95-
.landing-community__stat-item:hover {
78+
.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item:hover {
9679
cursor: pointer;
9780
transform: scale(1.01);
9881
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
9982
}
10083

101-
.landing-community
102-
.landing-community__content
103-
.landing-community__stats
104-
.landing-community__stat-item
105-
.landing-community__stat-value {
84+
.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item .landing-community__stat-value {
10685
font-size: 3.5rem;
10786
font-weight: 600;
10887
color: var(--ifm-color-primary);
@@ -126,11 +105,7 @@
126105
text-shadow: inherit;
127106
}
128107

129-
.landing-community
130-
.landing-community__content
131-
.landing-community__stats
132-
.landing-community__stat-item
133-
.landing-community__loading {
108+
.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item .landing-community__loading {
134109
display: flex;
135110
align-items: center;
136111
justify-content: center;
@@ -145,6 +120,7 @@
145120
0% {
146121
transform: rotate(0deg);
147122
}
123+
148124
100% {
149125
transform: rotate(360deg);
150126
}
@@ -157,19 +133,11 @@
157133
transition: opacity 0.2s ease;
158134
}
159135

160-
.landing-community
161-
.landing-community__content
162-
.landing-community__stats
163-
.landing-community__stat-item.clickable:hover
164-
.external-link-icon {
136+
.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item.clickable:hover .external-link-icon {
165137
opacity: 1;
166138
}
167139

168-
.landing-community
169-
.landing-community__content
170-
.landing-community__stats
171-
.landing-community__stat-item
172-
.landing-community__stat-description {
140+
.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item .landing-community__stat-description {
173141
font-size: 1rem;
174142
text-shadow: 0 0 1px var(--ifm-color-primary);
175143
}
@@ -184,58 +152,38 @@
184152
position: relative;
185153
}
186154

187-
.landing-community
188-
.landing-community__content
189-
.landing-community__info.clickable {
155+
.landing-community .landing-community__content .landing-community__info.clickable {
190156
cursor: pointer;
191157
}
192158

193-
.landing-community
194-
.landing-community__content
195-
.landing-community__info.clickable:hover,
196-
.landing-community
197-
.landing-community__content
198-
.landing-community__info.clickable:focus {
159+
.landing-community .landing-community__content .landing-community__info.clickable:hover,
160+
.landing-community .landing-community__content .landing-community__info.clickable:focus {
199161
transform: scale(1.01);
200162
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
201163
outline: none;
202164
}
203165

204-
.landing-community
205-
.landing-community__content
206-
.landing-community__info
207-
.landing-community__image {
166+
.landing-community .landing-community__content .landing-community__info .landing-community__image {
208167
width: 100%;
209168
object-fit: cover;
210169
border-radius: 1rem;
211170
}
212171

213-
.landing-community
214-
.landing-community__content
215-
.landing-community__info
216-
.landing-community__info-text {
172+
.landing-community .landing-community__content .landing-community__info .landing-community__info-text {
217173
margin-top: 1rem;
218174
padding: 0;
219175
font-size: 1rem;
220176
text-shadow: 0 0 1px var(--ifm-color-primary);
221177
}
222178

223-
.landing-community
224-
.landing-community__content
225-
.landing-community__info
226-
.landing-community__info-text
227-
.landing-community__link {
179+
.landing-community .landing-community__content .landing-community__info .landing-community__info-text .landing-community__link {
228180
color: var(--ifm-color-primary);
229181
text-shadow: 0 0 1px var(--ifm-color-primary);
230182
text-decoration: none;
231183
font-weight: 600;
232184
}
233185

234-
.landing-community
235-
.landing-community__content
236-
.landing-community__info
237-
.landing-community__info-text
238-
.landing-community__link:hover {
186+
.landing-community .landing-community__content .landing-community__info .landing-community__info-text .landing-community__link:hover {
239187
text-decoration: underline;
240188
}
241189

@@ -249,10 +197,7 @@
249197
transition: opacity 0.2s ease;
250198
}
251199

252-
.landing-community
253-
.landing-community__content
254-
.landing-community__info.clickable:hover
255-
.external-link-indicator {
200+
.landing-community .landing-community__content .landing-community__info.clickable:hover .external-link-indicator {
256201
opacity: 1;
257202
}
258203

@@ -269,20 +214,14 @@
269214
width: 100%;
270215
}
271216

272-
.landing-community
273-
.landing-community__content
274-
.landing-community__info
275-
.landing-community__image {
217+
.landing-community .landing-community__content .landing-community__info .landing-community__image {
276218
width: 100%;
277219
}
278220

279-
.landing-community
280-
.landing-community__content
281-
.landing-community__info
282-
.landing-community__info-text {
221+
.landing-community .landing-community__content .landing-community__info .landing-community__info-text {
283222
margin-top: 1rem;
284223
padding: 0;
285224
font-size: 1rem;
286225
text-shadow: 0 0 1px var(--ifm-color-primary);
287226
}
288-
}
227+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
.features {
22
display: flex;
33
align-items: center;
4-
padding: 2rem 0;
4+
padding: 2rem;
5+
margin: 2rem 0;
56
width: 100%;
67
}
78

89
.featureSvg {
910
height: 200px;
1011
width: 200px;
11-
}
12+
}

src/components/StatsSection/styles.module.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/* Stats Section */
22
.section {
33
width: 100%;
4-
padding: 4rem 1rem;
4+
padding: 3rem 1rem;
5+
margin: 2rem 0;
56
background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
67
position: relative;
78
overflow: hidden;
@@ -143,21 +144,25 @@
143144

144145
/* Animation keyframes */
145146
@keyframes float {
147+
146148
0%,
147149
100% {
148150
transform: translateY(0);
149151
}
152+
150153
50% {
151154
transform: translateY(-10px);
152155
}
153156
}
154157

155158
@keyframes pulse {
159+
156160
0%,
157161
100% {
158162
transform: scale(1);
159163
opacity: 1;
160164
}
165+
161166
50% {
162167
transform: scale(1.05);
163168
opacity: 0.8;
@@ -168,10 +173,12 @@
168173
0% {
169174
box-shadow: 0 0 5px rgba(79, 70, 229, 0.5);
170175
}
176+
171177
50% {
172178
box-shadow: 0 0 20px rgba(79, 70, 229, 0.8);
173179
}
180+
174181
100% {
175182
box-shadow: 0 0 5px rgba(79, 70, 229, 0.5);
176183
}
177-
}
184+
}

src/css/custom.css

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1602,7 +1602,7 @@ a {
16021602

16031603
/* ================= MISCELLANEOUS ================= */
16041604
/* Fix Home icon alignment with text in breadcrumbs [Docs] */
1605-
.theme-doc-breadcrumbs a.breadcrumbs__link > svg {
1605+
.theme-doc-breadcrumbs a.breadcrumbs__link>svg {
16061606
display: inline-block;
16071607
}
16081608

@@ -1793,3 +1793,52 @@ html[data-theme="light"] [data-slot="card-header"].bg-gradient-to-br {
17931793
.blog-page .margin-bottom--xl {
17941794
margin-bottom: 0rem !important;
17951795
}
1796+
1797+
/* ===== CONSISTENT SPACING SYSTEM FOR ALL SECTIONS ===== */
1798+
/* Issue #980: Fix inconsistent padding and margins across sections */
1799+
1800+
/* Standard section spacing: 2rem vertical, 1.5rem horizontal on smaller screens */
1801+
main>div:not(.m-0) {
1802+
margin-top: 2rem;
1803+
margin-bottom: 2rem;
1804+
}
1805+
1806+
.blog-carousel-section {
1807+
padding: 2rem 0 !important;
1808+
margin: 2rem 0 !important;
1809+
}
1810+
1811+
/* Responsive: reduce spacing on mobile devices */
1812+
@media (max-width: 768px) {
1813+
main>div:not(.m-0) {
1814+
margin-top: 1.5rem;
1815+
margin-bottom: 1.5rem;
1816+
}
1817+
1818+
.blog-carousel-section {
1819+
padding: 1.5rem 0 !important;
1820+
margin: 1.5rem 0 !important;
1821+
}
1822+
1823+
/* Reduce section padding on mobile */
1824+
section,
1825+
[role="region"] {
1826+
padding: 1.5rem 0;
1827+
margin: 1.5rem 0;
1828+
}
1829+
}
1830+
1831+
/* Typography spacing for consistency */
1832+
h1:not(:first-child),
1833+
h2:not(:first-child),
1834+
h3:not(:first-child) {
1835+
margin-top: 2rem;
1836+
margin-bottom: 1rem;
1837+
}
1838+
1839+
h1:first-child,
1840+
h2:first-child,
1841+
h3:first-child {
1842+
margin-top: 0;
1843+
margin-bottom: 1rem;
1844+
}

src/pages/index.module.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
*/
55

66
.heroBanner {
7-
padding: 4rem 0;
7+
padding: 3rem 0;
8+
margin: 2rem 0;
89
text-align: center;
910
position: relative;
1011
overflow: hidden;
@@ -20,4 +21,4 @@
2021
display: flex;
2122
align-items: center;
2223
justify-content: center;
23-
}
24+
}

0 commit comments

Comments
 (0)