Skip to content

Allow whitespace around @source inline() arg#19461

Merged
thecrypticace merged 5 commits intotailwindlabs:mainfrom
wongjn:source-inline-whitespace
Dec 18, 2025
Merged

Allow whitespace around @source inline() arg#19461
thecrypticace merged 5 commits intotailwindlabs:mainfrom
wongjn:source-inline-whitespace

Conversation

@wongjn
Copy link
Collaborator

@wongjn wongjn commented Dec 18, 2025

Summary

Inspired by #19460, relaxes whitespace syntax around @source inline(…):

Before

/* ❌ Error: `@source` paths must be quoted. */
@source inline( "underline" );
@source inline(
  "underline"
);

After

/* ✅ Generates the class names as normal. */
@source inline( "underline" );
@source inline(
  "underline"
);

Test plan

Added tests to packages/tailwindcss/src/index.test.ts.

@wongjn wongjn requested a review from a team as a code owner December 18, 2025 15:31
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

Warning

Rate limit exceeded

@wongjn has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 47 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 100fe0c and fb140a0.

📒 Files selected for processing (2)
  • packages/tailwindcss/src/index.test.ts (1 hunks)
  • packages/tailwindcss/src/index.ts (1 hunks)

Walkthrough

The PR adds tests verifying the @source inline(...) directive accepts surrounding whitespace and newlines around its argument and still expands to the same CSS. It also trims whitespace from extracted inline source paths during parsing, normalizing path values after slicing.

Pre-merge checks

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: allowing whitespace around the @source inline() argument, which is the primary focus of all modifications.
Description check ✅ Passed The description is clearly related to the changeset, providing context about the whitespace syntax relaxation with before/after examples and referencing the test plan.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@thecrypticace thecrypticace self-assigned this Dec 18, 2025
@thecrypticace thecrypticace merged commit 7fcdd84 into tailwindlabs:main Dec 18, 2025
7 checks passed
@thecrypticace
Copy link
Contributor

Thanks!

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

Comments