Skip to content

Commit

Permalink
variant: datauri for Django Pipeline
Browse files Browse the repository at this point in the history
By default, Django Pipeline removes spaces from Data URIs used in
stylesheets. This causes a problem when you use SVG markup in your
Data URIs, as Bootstrap does for its mobile navbar toggle icon.

The Django Pipeline docs suggest that `variant: datauri` fixes this:

https://django-pipeline.readthedocs.io/en/latest/configuration.html?highlight=variant#variant

Thanks also to @suxilog for identifying and suggesting this fix:

jazzband/django-pipeline#743

Fixes #462.
  • Loading branch information
zarino committed Dec 2, 2022
1 parent 7c09576 commit 535e516
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proj/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@
"caps": {
"source_filenames": ("caps/scss/main.scss",),
"output_filename": "css/caps.css",
"variant": "datauri",
},
"scoring": {
"source_filenames": ("scoring/scss/main.scss",),
"output_filename": "css/scoring.css",
"variant": "datauri",
},
},
"CSS_COMPRESSOR": "django_pipeline_csscompressor.CssCompressor",
Expand Down

0 comments on commit 535e516

Please sign in to comment.