Skip to content

docs: honest bundle-size story — measured CSS sizes, JS-only claim fixed - #324

Merged
allxsmith merged 1 commit into
mainfrom
docs/193-honest-bundle-size
Jul 17, 2026
Merged

allxsmith merged 1 commit into
mainfrom
docs/193-honest-bundle-size

Conversation

@allxsmith

@allxsmith allxsmith commented Jul 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes #193.

The homepage claimed "Ultra-lightweight: Only 21KB gzipped" — a stale JS-only number presented as the whole story, while a default scaffold ships ~800KB (~82KB gzip) of CSS. This PR makes every size figure in the docs measured, consistent, and honest about the JS/CSS split. The active half of #193's ask (a skill that optimizes a project's CSS) is split out to #323 (bestax-optimize).

Measurements (fresh build of main; the source of every figure in this PR)

File Raw (minified) Gzipped
bestax.css (complete) 801 KB ~81-82 KB
versions/bestax-prefixed.css 873 KB ~83-84 KB
versions/bestax-no-helpers.css 595 KB ~66-67 KB
versions/bestax-no-helpers-prefixed.css 654 KB ~68-69 KB
versions/bestax-no-dark-mode.css 679 KB ~69-70 KB
JS, entire library (esbuild --minify + gzip on dist/index.esm.js) 170 KB ~49 KB

(Gzip ranges = level 9 vs default level 6. Doc tables standardized on the set already published in optimizing-css.md, which sits at the top of these ranges.)

Changes

  • Homepage (docs/src/components/HomepageFeatures/index.js): replaced the 21KB claim with the honest split — ~49KB min+gzip for the entire library, tree-shakeable so apps ship only what they import, CSS is a deliberate flavor choice.
  • variations.md: File Size Comparison gains a Raw (minified) column — the raw number is what Vite reports and what [Performance] Default "complete" flavor ships ~873KB CSS (107KB gzip) with no in-scaffold guidance on trimming #193's reporter measured; new "What ends up in your build" section states plainly that bundlers don't tree-shake CSS and names the two levers, linking optimizing-css.md.
  • modular.md: "Bundle size expectations" updated (~80KB → measured ~800KB raw / ~82KB gzip); the variant step in the checklist now quotes real savings (no-helpers ~15KB, no-dark-mode ~12KB gzip).
  • installation.md: "Expected Sizes" replaced (~40KB JS / ~30KB CSS were both wrong); PurgeCSS mention now points at the opt-in recipe instead of implying it's wired in.
  • optimizing-css.md: the last remaining ~21KB claim updated; table untouched (it was already the accurate reference).

Verification

  • Docs build passes (turbo run build --filter=@allxsmith/bestax-docs) — link/anchor validation included.
  • grep -rn "21KB\|~40KB\|~30KB\|~78KB\|~80KB gzip" over getting-started + homepage: clean.
  • prettier --check: clean.

Follow-up: #323 (bestax-optimize skill).

https://claude.ai/code/session_015LmRYeZUeev2ZDXpcumGE5

Summary by CodeRabbit

  • Documentation

    • Updated bundle-size guidance with clearer raw, minified, and gzipped measurements.
    • Clarified CSS tree-shaking limitations, optional PurgeCSS usage, and modular Sass optimization.
    • Added savings estimates for leaner CSS variants and refined guidance on measuring transfer sizes.
    • Updated JavaScript bundle-size information and tree-shaking explanations.
  • Website Content

    • Refreshed the “Lightweight and Efficient” feature description with current performance and styling guidance.

Fixes the homepage's 'Ultra-lightweight: Only 21KB gzipped' claim,
which presented a stale JS-only number as the whole story while a
default scaffold ships ~800KB (~82KB gzip) of CSS (#193).

- Homepage: lean-runtime framing — ~49KB min+gzip for the ENTIRE
  library (measured: esbuild --minify + gzip on dist/index.esm.js),
  tree-shaking caveat, and owns the CSS-flavor choice.
- variations.md: File Size Comparison gains a raw (minified) column —
  the raw number is what bundlers report and what #193 measured; new
  'What ends up in your build' section explains raw vs gzipped and
  that CSS is never tree-shaken.
- modular.md, installation.md: stale ~80KB/~40KB/~30KB figures
  replaced with the measured set; PurgeCSS mention now points at the
  opt-in recipe in optimizing-css.md instead of implying it's wired in.
- optimizing-css.md: last remaining ~21KB claim updated.

All figures standardized on one measured set across the four pages
plus the homepage.

Claude-Session: https://claude.ai/code/session_015LmRYeZUeev2ZDXpcumGE5
@coderabbitai

coderabbitai Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a65c1d87-146a-41c0-a091-5c24cd55c27f

📥 Commits

Reviewing files that changed from the base of the PR and between 9476b7c and 21dce38.

📒 Files selected for processing (5)
  • docs/docs/guides/getting-started/installation.md
  • docs/docs/guides/getting-started/modular.md
  • docs/docs/guides/getting-started/optimizing-css.md
  • docs/docs/guides/getting-started/variations.md
  • docs/src/components/HomepageFeatures/index.js

Walkthrough

Bundle-size documentation now reports measured JavaScript and CSS sizes, distinguishes raw output from gzipped transfer size, and documents CSS tree-shaking limitations, prebuilt variations, PurgeCSS, and modular Sass options. Homepage copy reflects the revised JavaScript measurement and styling choices.

Changes

Bundle size guidance

Layer / File(s) Summary
Measured bundle-size guidance
docs/docs/guides/getting-started/installation.md, docs/docs/guides/getting-started/modular.md, docs/docs/guides/getting-started/optimizing-css.md, docs/src/components/HomepageFeatures/index.js
Updated JavaScript and CSS size figures, clarified minified, raw, and gzipped measurements, and revised homepage messaging around tree-shaking and style selection.
CSS variation and trimming guidance
docs/docs/guides/getting-started/variations.md, docs/docs/guides/getting-started/modular.md
Added raw-versus-gzipped variation comparisons and documented prebuilt flavor, PurgeCSS, and modular Sass trimming options.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • allxsmith/bestax#309: Updates overlapping bundle-size guidance in the getting-started documentation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the docs changes about measured bundle sizes and correcting the JS-only claim.
Description check ✅ Passed The description covers the summary, affected areas, related issue, verification, and follow-up, with only minor template omissions.
Linked Issues check ✅ Passed The docs updates address #193 by separating CSS and JS sizes, explaining flavor tradeoffs, and adding optimization guidance.
Out of Scope Changes check ✅ Passed The changes stay within documentation and homepage copy updates and do not introduce unrelated code or behavior changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/193-honest-bundle-size

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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

@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

Preview URL: https://09d4fae7.bestax.pages.dev

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep review — 0 finding(s)

# Severity Area Finding Location
— — — No blocking defects found. —

Overall: This is a docs-only honesty pass that replaces vague/optimistic bundle numbers with measured ones, and it holds together. Every figure is internally consistent — the ~49KB JS claim is identical across all five surfaces, the ~800KB/~82KB Complete-CSS pair matches the variations table, and the prose savings claims (~15KB for no-helpers, ~12KB for no-dark-mode) are exactly the deltas in that table. Both cross-page anchor links resolve, no stale figures survive elsewhere in docs//skills//READMEs, and the removed "3-20x smaller" marketing line is the right cut. The one thing a human can't verify from the diff alone is whether the raw measured sizes are current for the latest dist/ build — worth a sanity glance against a real build, but nothing here is contradicted by the repo.

🏄 Pure vibes on this one, dude — someone finally stopped hand-waving the bundle numbers and actually measured the swell. Every wave lines up, the links catch clean, and no gnarly old figures left floating. Ship it.

@allxsmith
allxsmith merged commit e623189 into main Jul 17, 2026
24 of 28 checks passed
@allxsmith
allxsmith deleted the docs/193-honest-bundle-size branch July 17, 2026 00:26
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bestax-release-bot

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Performance] Default "complete" flavor ships ~873KB CSS (107KB gzip) with no in-scaffold guidance on trimming

1 participant