Files
xrpl-dev-portal/shared/patterns/StandardCardGroupSection/_standard-card-group-section.scss
gabriel-ortiz 6a5f9e0db3 Add StandardCardGroupSection pattern component and related styles
- Introduced the StandardCardGroupSection component, which displays a headline, description, and a responsive grid of StandardCard components.
- Implemented SCSS styles for the StandardCardGroupSection, ensuring consistent spacing and dark mode support.
- Added utility functions for key generation and environment checks to enhance component functionality.
- Created a README file detailing usage, props, and best practices for the StandardCardGroupSection.
- Included new StandardCard component with customizable variants and button handling.
2026-06-08 16:53:22 -07:00

110 lines
3.8 KiB
SCSS

// BDS StandardCardGroupSection Pattern Styles
// Brand Design System - Section with headline, description, and grid of StandardCard components
//
// Naming Convention: BEM with 'bds' namespace
// .bds-standard-card-group-section - Base section container
// .bds-standard-card-group-section__header - Header wrapper for headline and description
// .bds-standard-card-group-section__headline - Section headline (uses .h-md)
// .bds-standard-card-group-section__description - Section description (uses .body-l)
//
// Design tokens from Figma:
// Light Mode:
// - Headline: Neutral Black (#141414) → $black
// - Description: Neutral Black (#141414) → $black
//
// Dark Mode:
// - Headline: Neutral White (#FFFFFF) → $white
// - Description: Neutral White (#FFFFFF) → $white
//
// - Header content max-width: 808px (approximately 8 columns at desktop)
// - Gap between headline and description: 16px
// - Gap between cards: handled by PageGrid gutter
// =============================================================================
// Design Tokens (from Figma)
// =============================================================================
// Spacing - Header gap (between headline and description)
$bds-standard-card-group-section-header-gap-sm: 8px; // Mobile: 8px
$bds-standard-card-group-section-header-gap-md: 8px; // Tablet: 8px
$bds-standard-card-group-section-header-gap-lg: 16px; // Desktop: 16px
// Spacing - Section gap (between header and cards)
$bds-standard-card-group-section-section-gap-sm: 24px; // Mobile
$bds-standard-card-group-section-section-gap-md: 32px; // Tablet
$bds-standard-card-group-section-section-gap-lg: 40px; // Desktop
// Spacing - Section padding (vertical)
$bds-standard-card-group-section-padding-y-sm: 48px; // Mobile
$bds-standard-card-group-section-padding-y-md: 64px; // Tablet
$bds-standard-card-group-section-padding-y-lg: 80px; // Desktop
// =============================================================================
// Section Container
// =============================================================================
.bds-standard-card-group-section {
width: 100%;
padding-top: $bds-standard-card-group-section-padding-y-sm;
padding-bottom: $bds-standard-card-group-section-padding-y-sm;
@include media-breakpoint-up(md) {
padding-top: $bds-standard-card-group-section-padding-y-md;
padding-bottom: $bds-standard-card-group-section-padding-y-md;
}
@include media-breakpoint-up(lg) {
padding-top: $bds-standard-card-group-section-padding-y-lg;
padding-bottom: $bds-standard-card-group-section-padding-y-lg;
}
@include bds-theme-mode(light) {
background-color: $white;
}
@include bds-theme-mode(dark) {
background-color: $black;
}
}
// =============================================================================
// Header Section
// =============================================================================
.bds-standard-card-group-section__header {
display: flex;
flex-direction: column;
gap: $bds-standard-card-group-section-header-gap-sm;
@include media-breakpoint-up(md) {
gap: $bds-standard-card-group-section-header-gap-md;
}
@include media-breakpoint-up(lg) {
gap: $bds-standard-card-group-section-header-gap-lg;
}
}
.bds-standard-card-group-section__headline {
margin: 0;
// Typography handled by .h-md class from _font.scss
}
.bds-standard-card-group-section__description {
margin: 0;
// Typography handled by .body-l class from _font.scss
}
.bds-standard-card-group-section__cards {
margin-top: $bds-standard-card-group-section-section-gap-sm;
@include media-breakpoint-up(md) {
margin-top: $bds-standard-card-group-section-section-gap-md;
}
@include media-breakpoint-up(lg) {
margin-top: $bds-standard-card-group-section-section-gap-lg;
}
}