From eb64e4c9ef96baf2b08586d0d5a4e9a40dd21cfa Mon Sep 17 00:00:00 2001 From: Diksha Dabhole Date: Mon, 10 Nov 2025 19:39:38 +0530 Subject: [PATCH 1/2] fix(#980): Implement consistent padding and margins across all sections --- src/components/Community/LandingCommunity.css | 113 ++++-------------- .../HomepageFeatures/styles.module.css | 5 +- src/components/StatsSection/styles.module.css | 11 +- src/css/custom.css | 50 ++++++++ src/pages/index.module.css | 3 +- 5 files changed, 90 insertions(+), 92 deletions(-) diff --git a/src/components/Community/LandingCommunity.css b/src/components/Community/LandingCommunity.css index 29b3abe4..3067bf13 100644 --- a/src/components/Community/LandingCommunity.css +++ b/src/components/Community/LandingCommunity.css @@ -1,6 +1,7 @@ .landing-community { width: 100%; - padding: 16px; + padding: 2rem; + margin: 2rem 0; } .landing-community .landing-community__header { @@ -8,8 +9,8 @@ justify-content: space-between; align-items: center; max-width: 100%; - margin-bottom: 1rem; - padding: auto 1rem; + margin-bottom: 2rem; + padding: 0 1rem; flex-wrap: wrap; } @@ -46,10 +47,7 @@ gap: 1rem; } -.landing-community - .landing-community__content - .landing-community__stats - .landing-community__stat-item { +.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item { display: flex; flex-direction: column; justify-content: center; @@ -62,47 +60,28 @@ position: relative; } -.landing-community - .landing-community__content - .landing-community__stats - .landing-community__stat-item.clickable { +.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item.clickable { cursor: pointer; } -.landing-community - .landing-community__content - .landing-community__stats - .landing-community__stat-item.clickable:hover, -.landing-community - .landing-community__content - .landing-community__stats - .landing-community__stat-item.clickable:focus { +.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item.clickable:hover, +.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item.clickable:focus { transform: scale(1.02); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); outline: none; } -.landing-community - .landing-community__content - .landing-community__stats - .landing-community__stat-item.loading { +.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item.loading { opacity: 0.7; } -.landing-community - .landing-community__content - .landing-community__stats - .landing-community__stat-item:hover { +.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item:hover { cursor: pointer; transform: scale(1.01); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4); } -.landing-community - .landing-community__content - .landing-community__stats - .landing-community__stat-item - .landing-community__stat-value { +.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item .landing-community__stat-value { font-size: 3.5rem; font-weight: 600; color: var(--ifm-color-primary); @@ -126,11 +105,7 @@ text-shadow: inherit; } -.landing-community - .landing-community__content - .landing-community__stats - .landing-community__stat-item - .landing-community__loading { +.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item .landing-community__loading { display: flex; align-items: center; justify-content: center; @@ -145,6 +120,7 @@ 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } @@ -157,19 +133,11 @@ transition: opacity 0.2s ease; } -.landing-community - .landing-community__content - .landing-community__stats - .landing-community__stat-item.clickable:hover - .external-link-icon { +.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item.clickable:hover .external-link-icon { opacity: 1; } -.landing-community - .landing-community__content - .landing-community__stats - .landing-community__stat-item - .landing-community__stat-description { +.landing-community .landing-community__content .landing-community__stats .landing-community__stat-item .landing-community__stat-description { font-size: 1rem; text-shadow: 0 0 1px var(--ifm-color-primary); } @@ -184,58 +152,38 @@ position: relative; } -.landing-community - .landing-community__content - .landing-community__info.clickable { +.landing-community .landing-community__content .landing-community__info.clickable { cursor: pointer; } -.landing-community - .landing-community__content - .landing-community__info.clickable:hover, -.landing-community - .landing-community__content - .landing-community__info.clickable:focus { +.landing-community .landing-community__content .landing-community__info.clickable:hover, +.landing-community .landing-community__content .landing-community__info.clickable:focus { transform: scale(1.01); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); outline: none; } -.landing-community - .landing-community__content - .landing-community__info - .landing-community__image { +.landing-community .landing-community__content .landing-community__info .landing-community__image { width: 100%; object-fit: cover; border-radius: 1rem; } -.landing-community - .landing-community__content - .landing-community__info - .landing-community__info-text { +.landing-community .landing-community__content .landing-community__info .landing-community__info-text { margin-top: 1rem; padding: 0; font-size: 1rem; text-shadow: 0 0 1px var(--ifm-color-primary); } -.landing-community - .landing-community__content - .landing-community__info - .landing-community__info-text - .landing-community__link { +.landing-community .landing-community__content .landing-community__info .landing-community__info-text .landing-community__link { color: var(--ifm-color-primary); text-shadow: 0 0 1px var(--ifm-color-primary); text-decoration: none; font-weight: 600; } -.landing-community - .landing-community__content - .landing-community__info - .landing-community__info-text - .landing-community__link:hover { +.landing-community .landing-community__content .landing-community__info .landing-community__info-text .landing-community__link:hover { text-decoration: underline; } @@ -249,10 +197,7 @@ transition: opacity 0.2s ease; } -.landing-community - .landing-community__content - .landing-community__info.clickable:hover - .external-link-indicator { +.landing-community .landing-community__content .landing-community__info.clickable:hover .external-link-indicator { opacity: 1; } @@ -269,20 +214,14 @@ width: 100%; } - .landing-community - .landing-community__content - .landing-community__info - .landing-community__image { + .landing-community .landing-community__content .landing-community__info .landing-community__image { width: 100%; } - .landing-community - .landing-community__content - .landing-community__info - .landing-community__info-text { + .landing-community .landing-community__content .landing-community__info .landing-community__info-text { margin-top: 1rem; padding: 0; font-size: 1rem; text-shadow: 0 0 1px var(--ifm-color-primary); } -} +} \ No newline at end of file diff --git a/src/components/HomepageFeatures/styles.module.css b/src/components/HomepageFeatures/styles.module.css index b248eb2e..036cd579 100644 --- a/src/components/HomepageFeatures/styles.module.css +++ b/src/components/HomepageFeatures/styles.module.css @@ -1,11 +1,12 @@ .features { display: flex; align-items: center; - padding: 2rem 0; + padding: 2rem; + margin: 2rem 0; width: 100%; } .featureSvg { height: 200px; width: 200px; -} +} \ No newline at end of file diff --git a/src/components/StatsSection/styles.module.css b/src/components/StatsSection/styles.module.css index 9364dba9..6c565622 100644 --- a/src/components/StatsSection/styles.module.css +++ b/src/components/StatsSection/styles.module.css @@ -1,7 +1,8 @@ /* Stats Section */ .section { width: 100%; - padding: 4rem 1rem; + padding: 3rem 1rem; + margin: 2rem 0; background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); position: relative; overflow: hidden; @@ -143,21 +144,25 @@ /* Animation keyframes */ @keyframes float { + 0%, 100% { transform: translateY(0); } + 50% { transform: translateY(-10px); } } @keyframes pulse { + 0%, 100% { transform: scale(1); opacity: 1; } + 50% { transform: scale(1.05); opacity: 0.8; @@ -168,10 +173,12 @@ 0% { box-shadow: 0 0 5px rgba(79, 70, 229, 0.5); } + 50% { box-shadow: 0 0 20px rgba(79, 70, 229, 0.8); } + 100% { box-shadow: 0 0 5px rgba(79, 70, 229, 0.5); } -} +} \ No newline at end of file diff --git a/src/css/custom.css b/src/css/custom.css index 98c034dc..494eebae 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -1793,3 +1793,53 @@ html[data-theme="light"] [data-slot="card-header"].bg-gradient-to-br { .blog-page .margin-bottom--xl { margin-bottom: 0rem !important; } + +/* ===== CONSISTENT SPACING SYSTEM FOR ALL SECTIONS ===== */ +/* Issue #980: Fix inconsistent padding and margins across sections */ + +/* Standard section spacing: 2rem vertical, 1.5rem horizontal on smaller screens */ +main > div:not(.m-0) { + margin-top: 2rem; + margin-bottom: 2rem; +} + +.blog-carousel-section { + padding: 2rem 0 !important; + margin: 2rem 0 !important; +} + +/* Responsive: reduce spacing on mobile devices */ +@media (max-width: 768px) { + main > div:not(.m-0) { + margin-top: 1.5rem; + margin-bottom: 1.5rem; + } + + .blog-carousel-section { + padding: 1.5rem 0 !important; + margin: 1.5rem 0 !important; + } + + /* Reduce section padding on mobile */ + section, + [role="region"] { + padding: 1.5rem 0; + margin: 1.5rem 0; + } +} + +/* Typography spacing for consistency */ +h1:not(:first-child), +h2:not(:first-child), +h3:not(:first-child) { + margin-top: 2rem; + margin-bottom: 1rem; +} + +h1:first-child, +h2:first-child, +h3:first-child { + margin-top: 0; + margin-bottom: 1rem; +} + diff --git a/src/pages/index.module.css b/src/pages/index.module.css index 9f71a5da..2b7f7664 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -4,7 +4,8 @@ */ .heroBanner { - padding: 4rem 0; + padding: 3rem 0; + margin: 2rem 0; text-align: center; position: relative; overflow: hidden; From 2d3a8675409bc2d553614f58d64c24f7fb98e1dd Mon Sep 17 00:00:00 2001 From: Diksha Dabhole Date: Mon, 10 Nov 2025 19:40:24 +0530 Subject: [PATCH 2/2] fix(#980): Standardize section spacing for consistent layout --- src/css/custom.css | 9 ++++----- src/pages/index.module.css | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/css/custom.css b/src/css/custom.css index 494eebae..f4e2be12 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -1602,7 +1602,7 @@ a { /* ================= MISCELLANEOUS ================= */ /* Fix Home icon alignment with text in breadcrumbs [Docs] */ -.theme-doc-breadcrumbs a.breadcrumbs__link > svg { +.theme-doc-breadcrumbs a.breadcrumbs__link>svg { display: inline-block; } @@ -1798,7 +1798,7 @@ html[data-theme="light"] [data-slot="card-header"].bg-gradient-to-br { /* Issue #980: Fix inconsistent padding and margins across sections */ /* Standard section spacing: 2rem vertical, 1.5rem horizontal on smaller screens */ -main > div:not(.m-0) { +main>div:not(.m-0) { margin-top: 2rem; margin-bottom: 2rem; } @@ -1810,7 +1810,7 @@ main > div:not(.m-0) { /* Responsive: reduce spacing on mobile devices */ @media (max-width: 768px) { - main > div:not(.m-0) { + main>div:not(.m-0) { margin-top: 1.5rem; margin-bottom: 1.5rem; } @@ -1841,5 +1841,4 @@ h2:first-child, h3:first-child { margin-top: 0; margin-bottom: 1rem; -} - +} \ No newline at end of file diff --git a/src/pages/index.module.css b/src/pages/index.module.css index 2b7f7664..a7253402 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -21,4 +21,4 @@ display: flex; align-items: center; justify-content: center; -} +} \ No newline at end of file