Skip to content
Source
Sign inSign up
TanStack/cli

Remove redundant box-sizing rule #414

Closedmaurer2(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/414/headopened

Hello, after scaffolding a router project, the generated app includes a redundant box-sizing rule. Tailwind already applies box-sizing in the base layer via its preflight styles. This doesn’t really affect styling, but it does create unnecessary noise in the devtools.

image

Cheers

Summary by CodeRabbit

  • Style
    • Updated the default styling rules in the project template.
    1. No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration

      Configuration used: defaults

      Review profile: CHILL

      Plan: Pro

      Run ID: c03bc4a4-4f82-4b20-afff-4b7f8202a274

      📥 Commits

      Reviewing files that changed from the base of the PR and between b8f4e63244135652fc4581d63641b1e99a52b58d and ccc90043cc44e53be19eef82563e3f85b4df614e.

      📒 Files selected for processing (1)
      • packages/create/src/frameworks/react/project/base/src/styles.css.ejs
      💤 Files with no reviewable changes (1)
      • packages/create/src/frameworks/react/project/base/src/styles.css.ejs

      📝 Walkthrough

      Walkthrough

      A CSS reset rule applying box-sizing: border-box globally via a universal selector is removed from the React template stylesheet. The stylesheet continues to include styling for html, body, and #app elements, but the universal box-sizing rule is no longer present.

      Changes

      Cohort / File(s)Summary
      CSS Reset Removal
      packages/create/src/frameworks/react/project/base/src/styles.css.ejs
      Removed the universal selector block that applied box-sizing: border-box globally, eliminating the global CSS reset rule.

      Estimated code review effort

      🎯 1 (Trivial) | ⏱️ ~2 minutes

      Poem

      🐰 A border-box reset did fade away, No universal rules to sway the day, The rabbit hops through styles so clean, Letting browsers chart their scene! ✨

      🚥 Pre-merge checks | ✅ 3
      ✅ Passed checks (3 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title check✅ PassedThe title 'Remove redundant box-sizing rule' accurately summarizes the main change—removing a box-sizing declaration from the generated CSS file that was redundant with Tailwind's preflight styles.
      Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
      ✏️ Tip: You can configure your own custom pre-merge checks in the settings.
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      📝 Coding Plan
      • Generate coding plan for human review comments

      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.

      Tip

      You can enable review details to help with troubleshooting, context usage and more.

      Enable the reviews.review_details setting to include review details such as the model used, the time taken for each step and more in the review comments.

    2. maurer2(GitHub profile, opens in a new tab) changed the title

    3. Thanks for reporting this and tracing it to the starter CSS. #564 landed the fix for React and Solid and verified that the Tailwind utility overrides the default while the starter keeps border-box sizing. Closing this because the fix is now on main.

    4. tannerlinsley closed this

    5. Great, thank you for extending the logic and turning it into a proper fix.

      Cheers

Sign in to join this conversation.