fix(styles): use logical direction styles#126
Conversation
📝 WalkthroughWalkthroughAdds Vitest and Stylelint infra to the styles package (configs, package wiring, a metadata test), updates CI/test wiring, and modernizes CSS to use logical properties for layout, spacing, padding, and typography. ChangesStyles Testing, Linting, and CSS Modernization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Biome (2.4.16)projects/styles/src/layout.cssFile contains syntax errors that prevent linting: Line 164: Unexpected value or character.; Line 164: expected Comment |
- Use logical direction styles - Introduced a new test command in package.json to run tests using vitest. - Added a stylelint configuration file for CSS linting with custom rules. - Created a new test file for metadata validation to ensure correct attribute generation. Signed-off-by: Cory Rylan <crylan@nvidia.com>
1ce3069 to
0b5affd
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@projects/styles/src/layout.css`:
- Around line 174-177: The declaration-property interpolation
(padding-$(logical-side)) is the risky part; avoid interpolating into the
property name. Replace the interpolation by emitting explicit logical property
names inside the loop (e.g., set padding-block-start, padding-inline-start,
padding-inline-end, padding-block-end) for the corresponding $logical-side
values, keeping the same selector pattern &[nve-layout~='pad-$(side):$(size)']
and the same value var(--nve-ref-space-$(size)); use conditional mapping or
separate branches in the `@each` body that assign the correct explicit property
for each $logical-side instead of interpolating the property name.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 452bedd1-a7cf-49b0-811a-bf0b9b98805f
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
projects/styles/package.jsonprojects/styles/src/layout.cssprojects/styles/src/metadata.test.tsprojects/styles/src/typography.cssprojects/styles/src/view-transitions.cssprojects/styles/stylelint.config.mjsprojects/styles/vitest.config.ts
Summary by CodeRabbit
Tests
Style
Chores