Skip to content

Do not generate CSS for start and end#20003

Merged
RobinMalfait merged 3 commits intomainfrom
fix/issue-20002
May 2, 2026
Merged

Do not generate CSS for start and end#20003
RobinMalfait merged 3 commits intomainfrom
fix/issue-20002

Conversation

@RobinMalfait
Copy link
Copy Markdown
Member

This PR fixes a bug where CSS was generated for start and end. This was accidentally introduced when we moved the start-* and end-* utilities to the legacy utilities. But this meant that we now generate CSS for start and end even if no value is provided.

Fixes: #20002

Test plan

  1. Updated the tests to make sure of --spacing: 0.25rem which made the tests fail, and are fixed again by applying the fix.
  2. Other tests are still passing

Instead of `--spacing: 1rem`. This now makes the tests fail (as
expected) because `start` and `end` on their own are generated which
should not have been the case.
This means that `start` and `end` on their own won't generate a value,
similar to how it didn't used to do this when we moved these utilities
to the legacy section.
@RobinMalfait RobinMalfait requested a review from a team as a code owner May 2, 2026 22:52
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c33332af-7b97-47e7-ae12-2ebbab51404a

📥 Commits

Reviewing files that changed from the base of the PR and between 9a834bc and e4d49a6.

📒 Files selected for processing (1)
  • CHANGELOG.md
✅ Files skipped from review due to trivial changes (1)
  • CHANGELOG.md

Walkthrough

Tests for legacy start and end utilities were updated to define spacing with a base --spacing: 0.25rem and use multiplier calc(var(--spacing) * N) expressions instead of --spacing-4 tokens. handleInset was simplified to return early when candidate.value === null, removing the previous theme-based fallback and negation logic for missing values. A changelog entry notes that legacy start/end utilities without values should not generate CSS.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: preventing CSS generation for start and end utilities without values.
Description check ✅ Passed The description clearly explains the bug, its cause, the fix, and test validation approach, all related to the changeset.
Linked Issues check ✅ Passed The PR directly addresses issue #20002 by removing the code path that generates CSS for start/end utilities without values, restoring intended behavior.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the start/end utility generation bug: test updates, implementation fix, and changelog entry.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Review rate limit: 3/5 reviews remaining, refill in 21 minutes and 36 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@RobinMalfait RobinMalfait merged commit 6e2b60e into main May 2, 2026
9 checks passed
@RobinMalfait RobinMalfait deleted the fix/issue-20002 branch May 2, 2026 23:00
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.

tw v4.2 silently added .start and .end utilities

1 participant