Allow using Bootstrap3 panels instead of alerts for admonitions #199
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.
Hi there!
I've been using your Sphinx theme ever since
sphinxjp.themes.basicstrap
started breaking, and I've never regretted it, it now powers https://instalooter.readthedocs.io/en/latest/ and I'm very happy with the result.I tend to use a lot of admonitions in my docstrings (mostly because Napoleon with Google docstrings make them feel quite natural), but one thing I never really liked was that the rendered alerts were making any special text hard to read (for instance with the
flatly
theme):However, using panels instead of alerts really helps with legibility while still feeling like a coherent section:
I added the
admonition_use_panel
option to the theme configuration that must be manually set toTrue
to enable the new behaviour (therefore this change is backwards compatible). I also reduced the padding a bit from the default to give the panels a more compact look, so that they take around the same space as the original alerts (title aside).