Skip to content

Fiddle: more fixes for stack and box#248

Merged
krishan711 merged 8 commits into
mainfrom
xyz
Jan 30, 2026
Merged

Fiddle: more fixes for stack and box#248
krishan711 merged 8 commits into
mainfrom
xyz

Conversation

@krishan711
Copy link
Copy Markdown
Contributor

Description

Screenshots:

Checklist:

  • I have updated the CHANGELOG with a summary of my changes
  • I have updated the documentation accordingly

Copilot AI review requested due to automatic review settings January 30, 2026 15:51
* main:
  Fix: correction for not inheriting styles inside box and stack (#247)
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes inheritance issues with responsive sizing properties in Box and Stack components by using CSS @property declarations with inherits: false. This prevents child components from unintentionally inheriting responsive sizing variables from parent components.

Changes:

  • Added @property declarations to Box and Stack styles to prevent CSS variable inheritance
  • Removed shouldResetInheritance parameter from responsiveValueToCss utility function
  • Changed approach from setting CSS variables to 'initial' to only setting them when defined
  • Updated default fallback values in Box component from undefined to 'auto'

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/util/responsiveUtil.ts Removed shouldResetInheritance parameter and changed to only set defined responsive values
src/particles/box/styles.scss Added @property declarations with inherits: false for all Box CSS variables; removed hardcoded defaults from fallback chains
src/particles/box/component.tsx Changed default values from undefined to 'auto'; removed 'initial' fallbacks when setting CSS variables
src/layouts/stack/styles.scss Added @property declarations with inherits: false for all Stack CSS variables
src/layouts/stack/component.tsx Removed shouldResetInheritance parameter; changed to conditionally set max/min CSS variables only when responsive props exist
src/layouts/grid/component.tsx Changed from setting undefined responsive variables to 'initial' to conditionally setting them only when defined
CHANGELOG.md Updated to describe the fixes

Comment on lines +13 to +42
@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; }
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.
@krishan711 krishan711 merged commit 7bf2e36 into main Jan 30, 2026
4 checks passed
@krishan711 krishan711 deleted the xyz branch January 30, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants