Replace vendored Bootstrap with a minimal custom stylesheet - #652
Merged
Conversation
The site only uses the navbar, container, alert, badge, and table pieces of Bootstrap 5.2.3, and none of its JavaScript. Define that subset locally so the vendored stylesheet can be dropped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The collapse wrapper never worked because the toggler button was never rendered, which also kept the navigation links hidden on narrow screens. The row and span12 wrappers are Bootstrap 2 leftovers that current Bootstrap does not style at all. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
application.css now covers everything the site used from Bootstrap, so drop the 190KB vendored stylesheet and its link tag. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
They only existed to out-rank Bootstrap's high-specificity table selectors. The local rules already win on plain specificity. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collapse the mobile border-stripping lists with :is() and drop the tr step from the reports selectors, which constrained nothing. Keeping tbody/tfoot in the last-row rule preserves the thead bottom border. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The status colors, border color, and navbar height were each written out in several places. Deriving the body offset from --navbar-height also removes the magic 50px that had to track the navbar size by hand. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The site loads a vendored
bootstrap.min.css(v5.2.3, about 190KB) but only uses its navbar, container, alert, badge, and table styles, and none of its JavaScript. This reimplements that subset inapplication.css(about 4KB, 1.4KB gzipped) and removes the vendored file, leaving no third-party CSS. Follow-up commits drop the!importantflags and selector patterns that only existed to override Bootstrap's specificity, and hoist repeated colors and the navbar height into custom properties.One visible change is that the navigation links now stay visible on narrow screens. They used to be hidden because the layout had a
collapseblock but never rendered the toggler button.Generated with Claude Code