No project description provided
Project description
This django app allows to override the primary color and its variants in bootstrap.
Usage
- Add
bootstrap_colors
toINSTALLED_APPS
- Add
path('colors.css', BootstrapColorsView.as_view(), name='colors')
tourls.py
- Add
<link rel="stylesheet" type="text/css" href="{% url 'colors' %}">
to your template - Set
BOOTSTRAP_THEME_COLORS
(Default:['#0d6efd', '#0b5ed7', '#0a58ca']
) - Optional: Configure caching, e.g. by using
django.views.decorators.cache.cache_control
Alternatives
Bootstrap provides several ways to achieve this:
- CSS custom properities: It would be great if we could just change a few custom properties. Unfortunately they are not used in a way that would allow that.
- Scss variables: This requires a Scss compiler somewhere in the build process which I would like to avoid.
- Override CSS: This is the approach that is used in this package. However, it is brittle because the underlying bootstrap code might change.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for django_bootstrap_colors-5.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d7656e22b713f655d747f78e1fbb1f974d4d9b953c48dbf48721c81426d3c91 |
|
MD5 | 09cc9cb1b0f62e4341d57280b37514cf |
|
BLAKE2b-256 | 5d32d81eb6f44cc6ff0b22db8aa40d08b251f6871861b7bbb85558e95e0047c7 |