This document provides a quick reference for the Core Framework utility classes included with Bricks Builder.
Source File:
core-framework.css(3136 lines)
Primary Color Scale:
--primary: #2364a9;
--primary-5 through --primary-90 /* Opacity variants */
--primary-d-1 through --primary-d-4 /* Darker shades */
--primary-l-1 through --primary-l-4 /* Lighter shades */Secondary Color Scale:
--secondary: #3fa6d9;
--secondary-5 through --secondary-90
--secondary-d-1 through --secondary-d-4
--secondary-l-1 through --secondary-l-4Tertiary Color Scale:
--tertiary: #F5C301;
--tertiary-5 through --tertiary-90
--tertiary-d-1 through --tertiary-d-4
--tertiary-l-1 through --tertiary-l-4Base Colors:
--base: #161616;
--bg-body: #e6e6e6;
--bg-surface: #ffffff;
--text-body: hsl(0, 0%, 25%);
--text-title: hsl(0, 0%, 0%);Light/Dark:
--light: #ffffff;
--light-5 through --light-90
--dark: #000000;
--dark-5 through --dark-90Status Colors:
--success: hsl(136, 95%, 56%);
--success-5 through --success-90
--error: hsl(351, 95%, 56%);
--error-5 through --error-90--space-4xs: clamp(0.52rem, ...)
--space-3xs: clamp(0.66rem, ...)
--space-2xs: clamp(0.82rem, ...)
--space-xs: clamp(1.02rem, ...)
--space-s: clamp(1.28rem, ...)
--space-m: clamp(1.6rem, ...)
--space-l: clamp(2rem, ...)
--space-xl: clamp(2.5rem, ...)
--space-2xl: clamp(3.13rem, ...)
--space-3xl: clamp(3.91rem, ...)
--space-4xl: clamp(4.88rem, ...)--text-xs: clamp(1.09rem, ...) /* ~11px */
--text-s: clamp(1.36rem, ...) /* ~14px */
--text-m: clamp(1.7rem, ...) /* ~17px */
--text-l: clamp(2.13rem, ...) /* ~21px */
--text-xl: clamp(2.66rem, ...) /* ~27px */
--text-2xl: clamp(3.32rem, ...) /* ~33px */
--text-3xl: clamp(4.15rem, ...) /* ~42px */
--text-4xl: clamp(5.19rem, ...) /* ~52px */--radius-xs: clamp(0.4rem, ...)
--radius-s: clamp(0.6rem, ...)
--radius-m: clamp(1rem, ...)
--radius-l: clamp(1.6rem, ...)
--radius-xl: clamp(2.6rem, ...)
--radius-full: 999rem;--shadow-xs: 0 1px 2px var(--shadow-primary);
--shadow-s: 0 1.5px 3px var(--shadow-primary);
--shadow-m: 0 2px 6px var(--shadow-primary);
--shadow-l: 0 3px 12px var(--shadow-primary);
--shadow-xl: 0 6px 48px var(--shadow-primary);--columns-1 through --columns-12
/* Example: --columns-3: repeat(3, minmax(0, 1fr)); */.btn /* Primary button */
.btn.small /* Small size */
.btn.large /* Large size */
.btn.secondary /* Secondary style */
.btn.tertiary /* Tertiary style */
.btn.ghost /* Transparent background */
.btn.slight /* Subtle style */
.btn.no-bg /* No background */.badge /* Default badge */
.badge.secondary /* Secondary style */.link /* Styled link */
.link.secondary /* Secondary color */
.link.tertiary /* Tertiary color */.input /* Form input */
/* States: :focus, :hover, :invalid, :disabled */.select /* Dropdown select */
/* States: :focus, :hover, :invalid, :disabled */.card /* Card container */
.card.primary /* Primary background */
.card.secondary /* Secondary background */.icon /* Icon element */
.icon.small /* Small size */
.icon.large /* Large size */
.icon.secondary /* Secondary color */
.icon.tertiary /* Tertiary color */
.icon.outline /* With border */
.icon.filled /* With background */.avatar /* Avatar image */
.avatar.small /* Small size */
.avatar.large /* Large size */.divider /* Horizontal divider */
.divider.vertical /* Vertical divider */.checkbox /* Custom checkbox */
.radio /* Custom radio button */.expand-click /* Makes child link cover entire parent */.bg-primary, .bg-primary-5, .bg-primary-10, ... .bg-primary-90
.bg-primary-d-1, .bg-primary-d-2, .bg-primary-d-3, .bg-primary-d-4
.bg-primary-l-1, .bg-primary-l-2, .bg-primary-l-3, .bg-primary-l-4
.bg-secondary (same pattern as primary)
.bg-tertiary (same pattern as primary)
.bg-base (same pattern as primary)
.bg-light (same pattern as primary)
.bg-dark (same pattern as primary)
.bg-success (same pattern as primary)
.bg-error (same pattern as primary)
.bg-body /* Body background */
.bg-surface /* Surface background */.text-primary, .text-primary-5, ... .text-primary-90
.text-primary-d-1, .text-primary-d-2, .text-primary-d-3, .text-primary-d-4
.text-primary-l-1, .text-primary-l-2, .text-primary-l-3, .text-primary-l-4
.text-secondary (same pattern)
.text-tertiary (same pattern)
.text-base (same pattern)
.text-light (same pattern)
.text-dark (same pattern)
.text-success (same pattern)
.text-error (same pattern)
.text-body /* Body text color */
.text-title /* Title text color */.border-primary, .border-primary-5, ... .border-primary-90
.border-primary-d-1 through .border-primary-d-4
.border-primary-l-1 through .border-primary-l-4
/* Same pattern for: secondary, tertiary, base, light, dark, success, error */html.cf-theme-dark { } /* Dark mode enabled */
html.cf-theme-light { } /* Light mode enabled */
.theme-inverted { } /* Inverted theme */
.theme-always-light { } /* Always light */
.theme-always-dark { } /* Always dark */Dark mode automatically adjusts all color variables.
Apply Core Framework classes via _cssGlobalClasses:
{
"settings": {
"_cssGlobalClasses": ["btn", "btn-primary"]
}
}Reference variables:
.my-element {
background: var(--primary);
padding: var(--space-m);
font-size: var(--text-m);
border-radius: var(--radius-m);
box-shadow: var(--shadow-m);
}All spacing and typography use clamp() for fluid scaling between 320px and 1440px viewport widths.
- Use variables over hardcoded values
- Leverage component classes for consistent UI elements
- Use spacing scale for consistent margins/padding
- Use typography scale for font sizes
- Apply dark mode via
.cf-theme-darkclass on html - Use opacity variants for backgrounds (-5 through -90)
- Use shade variants for contrast (-d-1 through -l-4)