Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/layouts/grid/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
@use '../../styles/variables' as *;

// =============================================================================
// CSS @property declarations for non-inheriting custom properties
// =============================================================================
// By default, CSS custom properties (variables) inherit from parent elements.
// This causes issues when a parent Grid sets responsive sizing variables
// - all child components would inherit and use these values even if they
// didn't set their own.
//
// Using @property with `inherits: false` prevents this cascade, ensuring each
// Grid/GridItem instance only uses the variables it explicitly sets on itself.
@property --kiba-grid-height { syntax: "*"; inherits: false; }
@property --kiba-grid-child-alignment { syntax: "*"; inherits: false; }
@property --kiba-grid-content-alignment { syntax: "*"; inherits: false; }
@property --kiba-grid-item-width { syntax: "*"; inherits: false; }
@property --kiba-grid-item-width-sm { syntax: "*"; inherits: false; }
@property --kiba-grid-item-width-md { syntax: "*"; inherits: false; }
@property --kiba-grid-item-width-lg { syntax: "*"; inherits: false; }
@property --kiba-grid-item-width-xl { syntax: "*"; inherits: false; }
@property --kiba-grid-item-display { syntax: "*"; inherits: false; }
@property --kiba-grid-item-display-sm { syntax: "*"; inherits: false; }
@property --kiba-grid-item-display-md { syntax: "*"; inherits: false; }
@property --kiba-grid-item-display-lg { syntax: "*"; inherits: false; }
@property --kiba-grid-item-display-xl { syntax: "*"; inherits: false; }
@property --kiba-grid-item-gutter { syntax: "*"; inherits: false; }
@property --kiba-grid-item-alignment { syntax: "*"; inherits: false; }
@property --kiba-grid-item-overflow-y { syntax: "*"; inherits: false; }

@layer kiba-structure {
.KibaGrid {
box-sizing: border-box;
Expand Down
56 changes: 56 additions & 0 deletions src/layouts/stack/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
@use '../../styles/variables' as *;

// =============================================================================
// CSS @property declarations for non-inheriting custom properties
// =============================================================================
// By default, CSS custom properties (variables) inherit from parent elements.
// This causes issues when a parent Stack sets responsive variables
// (e.g. --kiba-stack-direction-large: row) - all child Stacks would inherit
// and use these values even if they didn't set their own.
//
// Using @property with `inherits: false` prevents this cascade, ensuring each
// Stack instance only uses the variables it explicitly sets on itself.
@property --kiba-stack-direction-base { syntax: "*"; inherits: false; }
@property --kiba-stack-direction-small { syntax: "*"; inherits: false; }
@property --kiba-stack-direction-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-direction-large { syntax: "*"; inherits: false; }
@property --kiba-stack-direction-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-child-alignment-base { syntax: "*"; inherits: false; }
@property --kiba-stack-child-alignment-small { syntax: "*"; inherits: false; }
@property --kiba-stack-child-alignment-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-child-alignment-large { syntax: "*"; inherits: false; }
@property --kiba-stack-child-alignment-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-content-alignment-base { syntax: "*"; inherits: false; }
@property --kiba-stack-content-alignment-small { syntax: "*"; inherits: false; }
@property --kiba-stack-content-alignment-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-content-alignment-large { syntax: "*"; inherits: false; }
@property --kiba-stack-content-alignment-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-height-base { syntax: "*"; inherits: false; }
@property --kiba-stack-height-small { syntax: "*"; inherits: false; }
@property --kiba-stack-height-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-height-large { syntax: "*"; inherits: false; }
@property --kiba-stack-height-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-width-base { syntax: "*"; inherits: false; }
@property --kiba-stack-width-small { syntax: "*"; inherits: false; }
@property --kiba-stack-width-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-width-large { syntax: "*"; inherits: false; }
@property --kiba-stack-width-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-max-height-base { syntax: "*"; inherits: false; }
@property --kiba-stack-max-height-small { syntax: "*"; inherits: false; }
@property --kiba-stack-max-height-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-max-height-large { syntax: "*"; inherits: false; }
@property --kiba-stack-max-height-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-max-width-base { syntax: "*"; inherits: false; }
@property --kiba-stack-max-width-small { syntax: "*"; inherits: false; }
@property --kiba-stack-max-width-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-max-width-large { syntax: "*"; inherits: false; }
@property --kiba-stack-max-width-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-min-height-base { syntax: "*"; inherits: false; }
@property --kiba-stack-min-height-small { syntax: "*"; inherits: false; }
@property --kiba-stack-min-height-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-min-height-large { syntax: "*"; inherits: false; }
@property --kiba-stack-min-height-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-min-width-base { syntax: "*"; inherits: false; }
@property --kiba-stack-min-width-small { syntax: "*"; inherits: false; }
@property --kiba-stack-min-width-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-min-width-large { syntax: "*"; inherits: false; }
@property --kiba-stack-min-width-extraLarge { syntax: "*"; inherits: false; }

@layer kiba-structure {
.KibaStack {
display: flex;
Expand Down
41 changes: 41 additions & 0 deletions src/particles/box/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
@use '../../styles/variables' as *;

// =============================================================================
// CSS @property declarations for non-inheriting custom properties
// =============================================================================
// By default, CSS custom properties (variables) inherit from parent elements.
// This causes issues when a parent Box sets responsive sizing variables
// (e.g. --kiba-box-height-md: 300px) - all child components would inherit
// and use these values even if they didn't set their own.
//
// Using @property with `inherits: false` prevents this cascade, ensuring each
// Box instance only uses the variables it explicitly sets on itself.
@property --kiba-box-width { syntax: "*"; inherits: false; }
@property --kiba-box-width-sm { syntax: "*"; inherits: false; }
@property --kiba-box-width-md { syntax: "*"; inherits: false; }
@property --kiba-box-width-lg { syntax: "*"; inherits: false; }
@property --kiba-box-width-xl { syntax: "*"; inherits: false; }
@property --kiba-box-height { syntax: "*"; inherits: false; }
@property --kiba-box-height-sm { syntax: "*"; inherits: false; }
@property --kiba-box-height-md { syntax: "*"; inherits: false; }
@property --kiba-box-height-lg { syntax: "*"; inherits: false; }
@property --kiba-box-height-xl { syntax: "*"; inherits: false; }
@property --kiba-box-max-width { syntax: "*"; inherits: false; }
@property --kiba-box-max-width-sm { syntax: "*"; inherits: false; }
@property --kiba-box-max-width-md { syntax: "*"; inherits: false; }
@property --kiba-box-max-width-lg { syntax: "*"; inherits: false; }
@property --kiba-box-max-width-xl { syntax: "*"; inherits: false; }
@property --kiba-box-max-height { syntax: "*"; inherits: false; }
@property --kiba-box-max-height-sm { syntax: "*"; inherits: false; }
@property --kiba-box-max-height-md { syntax: "*"; inherits: false; }
@property --kiba-box-max-height-lg { syntax: "*"; inherits: false; }
@property --kiba-box-max-height-xl { syntax: "*"; inherits: false; }
@property --kiba-box-min-width { syntax: "*"; inherits: false; }
@property --kiba-box-min-width-sm { syntax: "*"; inherits: false; }
@property --kiba-box-min-width-md { syntax: "*"; inherits: false; }
@property --kiba-box-min-width-lg { syntax: "*"; inherits: false; }
@property --kiba-box-min-width-xl { syntax: "*"; inherits: false; }
@property --kiba-box-min-height { syntax: "*"; inherits: false; }
@property --kiba-box-min-height-sm { syntax: "*"; inherits: false; }
@property --kiba-box-min-height-md { syntax: "*"; inherits: false; }
@property --kiba-box-min-height-lg { syntax: "*"; inherits: false; }
@property --kiba-box-min-height-xl { syntax: "*"; inherits: false; }
Comment on lines +13 to +42
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent naming convention between Box and Stack components. Box uses -sm, -md, -lg, -xl suffixes for responsive breakpoints, while Stack uses -small, -medium, -large, -extraLarge. This inconsistency could lead to confusion. Consider standardizing on one naming convention across all components.

Copilot uses AI. Check for mistakes.

// Mixins for use by other components
@mixin default {
background-color: transparent;
Expand Down
73 changes: 0 additions & 73 deletions src/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,79 +5,6 @@
// These are in the kiba-reset layer so component styles in kiba-theme
// will always take precedence.

// =============================================================================
// CSS @property declarations for non-inheriting custom properties
// =============================================================================
// By default, CSS custom properties (variables) inherit from parent elements.
// This causes issues when a parent Box/Stack sets responsive sizing variables
// (e.g. --kiba-box-height-md: 300px) - all child components would inherit
// and use these values even if they didn't set their own.
//
// Using @property with `inherits: false` prevents this cascade, ensuring each
// component instance only uses the variables it explicitly sets on itself.
// Browser support: Chrome 85+, Safari 15.4+, Firefox 128+ (universal by 2024)
@property --kiba-box-width { syntax: "*"; inherits: false; }
@property --kiba-box-width-sm { syntax: "*"; inherits: false; }
@property --kiba-box-width-md { syntax: "*"; inherits: false; }
@property --kiba-box-width-lg { syntax: "*"; inherits: false; }
@property --kiba-box-width-xl { syntax: "*"; inherits: false; }
@property --kiba-box-height { syntax: "*"; inherits: false; }
@property --kiba-box-height-sm { syntax: "*"; inherits: false; }
@property --kiba-box-height-md { syntax: "*"; inherits: false; }
@property --kiba-box-height-lg { syntax: "*"; inherits: false; }
@property --kiba-box-height-xl { syntax: "*"; inherits: false; }
@property --kiba-box-max-width { syntax: "*"; inherits: false; }
@property --kiba-box-max-width-sm { syntax: "*"; inherits: false; }
@property --kiba-box-max-width-md { syntax: "*"; inherits: false; }
@property --kiba-box-max-width-lg { syntax: "*"; inherits: false; }
@property --kiba-box-max-width-xl { syntax: "*"; inherits: false; }
@property --kiba-box-max-height { syntax: "*"; inherits: false; }
@property --kiba-box-max-height-sm { syntax: "*"; inherits: false; }
@property --kiba-box-max-height-md { syntax: "*"; inherits: false; }
@property --kiba-box-max-height-lg { syntax: "*"; inherits: false; }
@property --kiba-box-max-height-xl { syntax: "*"; inherits: false; }
@property --kiba-box-min-width { syntax: "*"; inherits: false; }
@property --kiba-box-min-width-sm { syntax: "*"; inherits: false; }
@property --kiba-box-min-width-md { syntax: "*"; inherits: false; }
@property --kiba-box-min-width-lg { syntax: "*"; inherits: false; }
@property --kiba-box-min-width-xl { syntax: "*"; inherits: false; }
@property --kiba-box-min-height { syntax: "*"; inherits: false; }
@property --kiba-box-min-height-sm { syntax: "*"; inherits: false; }
@property --kiba-box-min-height-md { syntax: "*"; inherits: false; }
@property --kiba-box-min-height-lg { syntax: "*"; inherits: false; }
@property --kiba-box-min-height-xl { syntax: "*"; inherits: false; }

@property --kiba-stack-height-base { syntax: "*"; inherits: false; }
@property --kiba-stack-height-small { syntax: "*"; inherits: false; }
@property --kiba-stack-height-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-height-large { syntax: "*"; inherits: false; }
@property --kiba-stack-height-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-width-base { syntax: "*"; inherits: false; }
@property --kiba-stack-width-small { syntax: "*"; inherits: false; }
@property --kiba-stack-width-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-width-large { syntax: "*"; inherits: false; }
@property --kiba-stack-width-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-max-height-base { syntax: "*"; inherits: false; }
@property --kiba-stack-max-height-small { syntax: "*"; inherits: false; }
@property --kiba-stack-max-height-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-max-height-large { syntax: "*"; inherits: false; }
@property --kiba-stack-max-height-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-max-width-base { syntax: "*"; inherits: false; }
@property --kiba-stack-max-width-small { syntax: "*"; inherits: false; }
@property --kiba-stack-max-width-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-max-width-large { syntax: "*"; inherits: false; }
@property --kiba-stack-max-width-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-min-height-base { syntax: "*"; inherits: false; }
@property --kiba-stack-min-height-small { syntax: "*"; inherits: false; }
@property --kiba-stack-min-height-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-min-height-large { syntax: "*"; inherits: false; }
@property --kiba-stack-min-height-extraLarge { syntax: "*"; inherits: false; }
@property --kiba-stack-min-width-base { syntax: "*"; inherits: false; }
@property --kiba-stack-min-width-small { syntax: "*"; inherits: false; }
@property --kiba-stack-min-width-medium { syntax: "*"; inherits: false; }
@property --kiba-stack-min-width-large { syntax: "*"; inherits: false; }
@property --kiba-stack-min-width-extraLarge { syntax: "*"; inherits: false; }

@layer kiba-reset {
html {
scroll-behavior: smooth;
Expand Down
Loading