Skip to content

Conversation

@benface
Copy link
Contributor

@benface benface commented Nov 24, 2025

Summary

This could be considered a bug fix, because text-align and text-transform usually inherit like those other "font styles" that are reset by Preflight on some elements (button, input, etc.) due to being set to a fixed value by user agent stylesheets. It seems like an oversight.

Test plan

Pray this is not a breaking change?

@benface benface requested a review from a team as a code owner November 24, 2025 20:59
@coderabbitai
Copy link

coderabbitai bot commented Nov 24, 2025

Walkthrough

The preflight CSS file for Tailwind CSS is updated to include two additional inheritance properties for form control elements. The modifications add text-align: inherit; and text-transform: inherit; to the reset rules for button, input, select, optgroup, textarea, and file-selector-button elements. These properties are applied alongside the existing font-related inheritance rules, allowing form controls to inherit text alignment and transformation characteristics from their parent elements.

Pre-merge checks

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and accurately summarizes the main change: adding text-align and text-transform to inherited properties for form controls.
Description check ✅ Passed The description clearly explains the rationale for the change, relating it to existing Preflight behavior and identifying it as a potential bug fix.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a1f533a and 10f3e48.

📒 Files selected for processing (1)
  • packages/tailwindcss/preflight.css (1 hunks)
🔇 Additional comments (2)
packages/tailwindcss/preflight.css (2)

249-250: Implementation is syntactically correct and follows established patterns.

The syntax is valid CSS, and the placement aligns with the existing inherited text properties (font, letter-spacing, color, etc.). The inclusion of both webkit and standard prefixes via the selector list (line 243) ensures broad browser support.

Note: Precedent for text-align: inherit; already exists in this file at line 323 for ::-webkit-date-and-time-value, suggesting this change is intentional expansion rather than accidental inconsistency.


249-250: The original review comment is incorrect.

The change to add text-align: inherit; and text-transform: inherit; to form controls in Tailwind's Preflight is intentional, documented design where form controls inherit text alignment and text-transform from their parent. This is not a breaking change in the semantic versioning sense because:

  1. Tailwind v4 follows Semantic Versioning with breaking changes only in major releases, and v4.1.17 release notes list no breaking changes—only bug fixes.

  2. Users can easily override using Tailwind utilities (e.g., text-left, normal-case) or by defining custom styles in the @layer base block.

  3. The change represents an intentional alignment with Tailwind's documented Preflight philosophy, not an undocumented regression.

The reviewer's uncertainty reflected in the "Pray this is not a breaking change?" comment does not establish that the change is problematic—it was a stylistic note, not evidence of a defect. The code is correct as implemented.

Likely an incorrect or invalid review comment.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

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.

1 participant