mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2026-04-29 15:37:48 +00:00
105 lines
3.8 KiB
SCSS
105 lines
3.8 KiB
SCSS
// BDS CardStats Pattern Styles
|
|
// Brand Design System - Section with heading, description, and grid of CardStat components
|
|
//
|
|
// Naming Convention: BEM with 'bds' namespace
|
|
// .bds-card-stats - Base section container
|
|
// .bds-card-stats__header - Header wrapper for heading and description
|
|
// .bds-card-stats__heading - Section heading (uses .h-md)
|
|
// .bds-card-stats__description - Section description (uses .body-l)
|
|
// .bds-card-stats__cards - Cards grid container
|
|
// .bds-card-stats__card-wrapper - Individual card wrapper
|
|
//
|
|
// Design tokens from Figma:
|
|
// Light Mode:
|
|
// - Background: White (#FFFFFF)
|
|
// - Heading: Neutral Black (#141414) → $black
|
|
// - Description: Neutral Black (#141414) → $black
|
|
//
|
|
// Dark Mode:
|
|
// - Background: transparent (inherits page background)
|
|
// - Heading: Neutral White (#FFFFFF) → $white
|
|
// - Description: Neutral White (#FFFFFF) → $white
|
|
//
|
|
// - Header content max-width: 808px (approximately 8 columns at desktop)
|
|
// - Gap between heading and description: 16px
|
|
// - Gap between cards: 8px (matches $bds-grid-gutter)
|
|
|
|
|
|
// Color tokens - Light Mode (from Figma: node 32051-2839)
|
|
$bds-card-stats-heading-light: $black; // --neutral/black (#141414)
|
|
$bds-card-stats-description-light: $black; // --neutral/black (#141414)
|
|
|
|
// Color tokens - Dark Mode (from Figma: node 32051-2524)
|
|
$bds-card-stats-bg-dark: transparent; // Inherits page background
|
|
$bds-card-stats-heading-dark: $white; // --neutral/white (#FFFFFF)
|
|
$bds-card-stats-description-dark: $white; // --neutral/white (#FFFFFF)
|
|
|
|
// Spacing - Header gap (between heading and description)
|
|
// Note: Uses centralized spacing tokens from _spacing.scss.
|
|
$bds-card-stats-header-gap-base: $bds-space-sm; // 8px - spacing('sm')
|
|
$bds-card-stats-header-gap-lg: $bds-space-lg; // 16px - spacing('lg')
|
|
|
|
// Spacing - Section gap (between header and cards)
|
|
$bds-card-stats-section-gap-sm: $bds-space-2xl; // 24px - spacing('2xl')
|
|
$bds-card-stats-section-gap-md: $bds-space-3xl; // 32px - spacing('3xl')
|
|
$bds-card-stats-section-gap-lg: $bds-space-4xl; // 40px - spacing('4xl')
|
|
|
|
// Spacing - Section padding
|
|
$bds-card-stats-padding-y-sm: $bds-space-2xl; // 24px - spacing('2xl')
|
|
$bds-card-stats-padding-y-md: $bds-space-3xl; // 32px - spacing('3xl')
|
|
$bds-card-stats-padding-y-lg: $bds-space-4xl; // 40px - spacing('4xl')
|
|
|
|
// =============================================================================
|
|
// Base Section Styles
|
|
// =============================================================================
|
|
|
|
.bds-card-stats {
|
|
// Vertical padding
|
|
padding-top: $bds-card-stats-padding-y-sm;
|
|
padding-bottom: $bds-card-stats-padding-y-sm;
|
|
|
|
@include media-breakpoint-up(md) {
|
|
padding-top: $bds-card-stats-padding-y-md;
|
|
padding-bottom: $bds-card-stats-padding-y-md;
|
|
}
|
|
|
|
@include media-breakpoint-up(lg) {
|
|
padding-top: $bds-card-stats-padding-y-lg;
|
|
padding-bottom: $bds-card-stats-padding-y-lg;
|
|
}
|
|
}
|
|
|
|
// =============================================================================
|
|
// Header Styles
|
|
// =============================================================================
|
|
|
|
.bds-card-stats__header {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: $bds-card-stats-header-gap-base;
|
|
margin-bottom: $bds-card-stats-section-gap-sm;
|
|
|
|
@include media-breakpoint-up(md) {
|
|
margin-bottom: $bds-card-stats-section-gap-md;
|
|
}
|
|
|
|
@include media-breakpoint-up(lg) {
|
|
gap: $bds-card-stats-header-gap-lg;
|
|
margin-bottom: $bds-card-stats-section-gap-lg;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// =============================================================================
|
|
// Dark Mode Styles
|
|
// =============================================================================
|
|
|
|
html.dark {
|
|
.bds-card-stats__heading,
|
|
.bds-card-stats__description {
|
|
color: $white;
|
|
}
|
|
}
|
|
|