From 535e5161a2df03c2b10f2b95db50a4b67b79a923 Mon Sep 17 00:00:00 2001 From: Zarino Zappia Date: Fri, 2 Dec 2022 14:20:37 +0000 Subject: [PATCH] `variant: datauri` for Django Pipeline 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: https://github.com/jazzband/django-pipeline/issues/743 Fixes #462. --- proj/settings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proj/settings.py b/proj/settings.py index 4c2a8326d..287a43f87 100755 --- a/proj/settings.py +++ b/proj/settings.py @@ -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",