override the primary color and its variants in bootstrap
Project description
This django app allows to override the primary color and its variants in bootstrap.
Usage
- Add
bootstrap_colorstoINSTALLED_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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_bootstrap_colors-5.4.1.tar.gz.
File metadata
- Download URL: django_bootstrap_colors-5.4.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61e1727050282f50a2dc686bb7cd94766e048b16da450cdaaaf350739a5ffe38
|
|
| MD5 |
87aa250a19a94779a16a2c067c1c67f4
|
|
| BLAKE2b-256 |
924aedca371fd258e68d1257c7e14d4f90486b1bf754b1da433e0d8f6f09c77d
|
File details
Details for the file django_bootstrap_colors-5.4.1-py3-none-any.whl.
File metadata
- Download URL: django_bootstrap_colors-5.4.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f205c7409710469b9285da85d349f7f19845ee703e8b70771909ecc0ec79460
|
|
| MD5 |
85664711e5fe6c4e7effa7cae45e0d0c
|
|
| BLAKE2b-256 |
5d1452c026fcf84b9345fe1f9c77c27bdab5a2736750898310732de154c094d6
|