Skip to main content

No project description provided

Project description

This django app allows to override the primary color and its variants in bootstrap.

Usage

  • Add bootstrap_colors to INSTALLED_APPS
  • Add path('colors.css', BootstrapColorsView.as_view(), name='colors') to urls.py
  • Add <link rel="stylesheet" type="text/css" href="{% url 'colors' %}"> to your template
  • Set BOOTSTRAP_THEME_COLORS (Default: ['#0d6efd', '#0b5ed7', '#0a58ca'])

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

django_bootstrap_colors-5.2.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file django_bootstrap_colors-5.2.1-py3-none-any.whl.

File metadata

  • Download URL: django_bootstrap_colors-5.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for django_bootstrap_colors-5.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c1b06901be8cb3cc03c74eec840c72605e4c1f9795b24d1fc3c62a04a73ce670
MD5 a84508b1c92dca41208ff0090b4cf23c
BLAKE2b-256 f614913e9663c6d85cafc8f152761e1b26ef27e7456b9253bfd789c9f11a29a5

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page