[openstreetmap/openstreetmap-website] Don't include unused bootstrap css (PR #4250)
Anton Khorev
notifications at github.com
Sat Sep 16 23:16:04 UTC 2023
Include only Bootstrap components that are in use as recommended [here](https://getbootstrap.com/docs/5.1/customize/sass/#importing)
by creating `_bootstrap-custom.scss` as described [here](https://github.com/twbs/bootstrap-rubygem#sass-individual-components).
Results in ~10% smaller css.
Actually I do this to modify Bootstrap's theme colors. It has to be done after importing variables but before importing components, and I can't do that if everything is imported in one `@import`.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/4250
-- Commit Summary --
* Don't include unused bootstrap css
-- File Changes --
A app/assets/stylesheets/_bootstrap-custom.scss (53)
M app/assets/stylesheets/common.scss (2)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/4250.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4250.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4250
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4250 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230916/a381d767/attachment.htm>
More information about the rails-dev
mailing list