Skip to content
Source
Sign inSign up
TanStack/cli

fix(create): let Tailwind box-sizing utilities override preflight #564

Mergedtannerlinsleymerged 1 commit intomain fromrefs/pull/564/headmerged by tannerlinsley

tannerlinsleycommented

Builds on #414 from @maurer2.

The unlayered reset overrides Tailwind’s box-sizing utilities in generated apps. Keep the reset in blank apps without Tailwind and let Preflight supply it everywhere Tailwind is imported.

In fresh generated apps outside the monorepo, Chrome confirmed that the previous React scaffold forced border-box even with box-content. The corrected React and Solid apps retain border-box by default and honor box-content. The plain blank app retains border-box. The normal build, unit and eight blocking Chrome gates passed, as did build and typecheck for the fresh candidate apps.

Summary by CodeRabbit

  • Bug Fixes
    • Tailwind box-sizing utilities can now override the default reset in generated React and Solid apps.
    1. 🦋 Changeset detected

      Latest commit: 898913c79f432c6f45eff0dbeb2ca49e4449ed10

      The changes in this PR will be included in the next version bump.

      This PR includes changesets to release 7 packages
      NameType
      @tanstack/createPatch
      create-start-appPatch
      create-tanstack-appPatch
      create-tanstackPatch
      create-tsrouter-appPatch
      @tanstack/create-startPatch
      @tanstack/cliPatch

      Not sure what this means? Click here to learn what changesets are.

      Click here if you're a maintainer who wants to add another changeset to this PR

    2. Explain Change →

      No actionable comments were generated in the recent review.

      Walkthrough

      The React and Solid templates change how generated styles apply the box-sizing reset. Blank projects retain the reset when Tailwind is disabled. The templates remove it from non-example and example styles. A patch changeset records the update.

      Changes: Generated app CSS

      Layer / File(s)Summary
      Generated CSS box-sizing behavior
      packages/create/src/frameworks/*/project/base/src/styles.css.ejs, .changeset/tailwind-box-sizing.md
      In both templates, blank projects apply the box-sizing reset only when Tailwind is disabled. Non-example and example styles no longer include the reset. The changeset describes the update.

      Estimated code review effort: 2 (Simple) | ~10 minutes

      Change: Bug fix · Severity of issue fixed: Low

      Merge Risk: Minimal · up to 89891

      The template changes align box-sizing behavior with the stated Tailwind and non-Tailwind goals and are ready to merge.

      Pre-merge checks: Passed 5
      Check nameStatusExplanation
      Description CheckPassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title checkPassedThe title names the main change: Tailwind box-sizing utilities can now override Tailwind Preflight in generated React and Solid apps. The changeset, the React styles.css.ejs template, and the Solid st…
      Docstring CoveragePassedNo eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Title check

      Explanation

      The title names the main change: Tailwind box-sizing utilities can now override Tailwind Preflight in generated React and Solid apps. The changeset, the React styles.css.ejs template, and the Solid styles.css.ejs template all move the box-sizing reset so it applies only when Tailwind is disabled. The title's 'fix(create)' prefix matches the @tanstack/create package and the patch changeset.

      Full details: Docstring Coverage

      Explanation

      No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)

      Finishing Touches
      Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      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
      Recent review info
      Run configuration
      • Source mode: Auto
      • Repository: Unavailable
      • Branch: Unavailable
      • File: No configuration file from this repository applied
      • Commit: Unavailable
      • Layers: defaults
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: cbcfd85c-8341-4448-b6aa-050a66e638e3
      Commits

      Reviewing files that changed from the base of the PR and between 6d6116b98eb134558abaff8849e120a12714b596 and 898913c79f432c6f45eff0dbeb2ca49e4449ed10.

      Files selected for processing: 3
      • .changeset/tailwind-box-sizing.md
      • packages/create/src/frameworks/react/project/base/src/styles.css.ejs
      • packages/create/src/frameworks/solid/project/base/src/styles.css.ejs

      Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

    3. tannerlinsley merged this7bd4230

    4. tannerlinsley closed this

Sign in to join this conversation.