[openstreetmap/openstreetmap-website] Don't include unused bootstrap css (PR #4250)
Anton Khorev
notifications at github.com
Wed Sep 20 14:49:03 UTC 2023
> Can you expand on this please, perhaps with an example?
https://getbootstrap.com/docs/5.1/customize/sass/#add-to-map
You can't add to the theme map before it's defined. Then you may try to include Bootstrap first, but if you include everything, it's too late to modify the map.
Something like this would work, if there's an editable file with Bootstrap includes:
```
// Configuration
@import "bootstrap/functions";
@import "bootstrap/variables";
@import "bootstrap/mixins";
@import "bootstrap/utilities";
$theme-colors: map-merge($theme-colors, $custom-colors); // added custom themes
// Layout & components
@import "bootstrap/root";
@import "bootstrap/reboot";
@import "bootstrap/type";
@import "bootstrap/images";
...
```
Or do you prefer to redefine the entire theme map instead of adding to it?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4250#issuecomment-1727883973
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4250/c1727883973 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230920/4df04706/attachment.htm>
More information about the rails-dev
mailing list