Repository navigation
v5.1.0: bundle Bootstrap 5.3.7 SCSS; Bootstrap.load(loadCss: false) - #14
Merged
Merged
Conversation
- Bundle the official Bootstrap 5.3.7 SCSS sources (unmodified, from the bootstrap 5.3.7 npm package) at lib/bootstrap-5.3.7/scss, so apps can compile their own Bootstrap theme from the same version as the bundled CSS/JS. - Bootstrap.load: new loadCss parameter; with false only the JS is loaded. - New Bootstrap.PATH_SCSS and Bootstrap.isCssLoaded. - Tests: compile the SCSS through its package: URL (default and custom theme); load(loadCss: false) in the browser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apps import package:bones_ui_bootstrap/bootstrap-5/scss/bootstrap, so Bootstrap 5.x updates don't change their SCSS imports. The CSS and JS stay in lib/bootstrap-<version>, whose path busts the browser cache on updates. Co-Authored-By: Claude Opus 5.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.
Summary
Lets apps compile their own themed Bootstrap CSS from the same Bootstrap version as the bundled CSS/JS, without loading Bootstrap's CSS twice.
lib/bootstrap-5/scss— the official Bootstrap 5.3.7 SCSS, unmodified from thebootstrap5.3.7 npm package (tarball integrity verified against the registry; itsdistCSS/JS are byte-identical to the already bundled files).lib/bootstrap-<version>: the browser loads them, and the versioned path busts its cache on updates.Bootstrap.load({bool loadCss = true}): withfalseonly the Bootstrap JS is loaded. Only the first call loads (later options are ignored, as before).Bootstrap.PATH_SCSSandBootstrap.isCssLoaded.sass,package_config(tests only).Tests
bones_ui_bootstrap_scss_vm_test.dart: compiles the SCSS through itspackage:URL with the default variables and with a custom theme; importing only functions/variables/maps/mixins/utilities outputs no CSS; the SCSS banner matchesBootstrap.VERSION; the README import path is valid.bones_ui_bootstrap_consistency_vm_test.dart: the stale-directory check allowsbootstrap-<major>next tobootstrap-<version>.bones_ui_bootstrap_no_css_test.dart:load(loadCss: false)loads the JS, adds no Bootstrap<link>, applies no Bootstrap styles; a laterload()keeps the first options.dart test -p vm: 19 passed.dart test -p chrome: 64 passed.dart analyze,dependency_validator: clean.Note: Bootstrap 5.3 SCSS uses
@importand global built-in functions, so Dart Sass prints deprecation warnings when compiling it.🤖 Generated with Claude Code