Open lb- opened 1 year ago
it used Bootstrap CDN ??
It's a front-end dependency see https://github.com/wagtail/sphinx_wagtail_theme/blob/main/package.json#L23
i can fix it ? can i send a PR
Just a thought. Is it worth looking at something more lightweight instead of Bootstrap.
Maybe too lightweight - https://open-props.style/ - but super flexible with CSS Custom Properties as the core method of designs.
Not sure on other options, maybe we need to review the actual Bootstrap parts used.
Also need to consider the ability to customise and override things for others.
As part of #299, I have started splitting the Bootstrap import into per-component imports, so we can start to remove the parts of Bootstrap which we don’t use. There are a lot of low-hanging fruits there I assume, though definitely also a case for just rebuilding it all together with another CSS framework.
The theme is pretty simple, I would argue to not use any framework. Bootstrap could probably be replaced with 100 lines of vanilla CSS at this point (i.e. replicate/copy the few classes we use from Bootstrap - containers, rows, collapse, button). Much less maintenance will be required this way. Most of the theme is already using custom CSS and very few Bootstrap classes anyhow.
Using a JS build framework is also probably unnecessary, as it is contained in a single file with 1 import - autocompleter could probably be imported a using normal script tag.
That setup would be mostly "set it and forget it" and also make it easier for juniors/newbies/python devs to help maintain and fix bugs.
Currently the Theme is using Bootstrap 4 and it would be good to upgrade to version 5.
Split from #252 / #250
It may be worth considering a small clean up of unused styles in the process. See https://github.com/wagtail/sphinx_wagtail_theme/issues/64