#29167: collectstatic breaks Bootstrap 4 styles
-----------------------------------------------+------------------------
               Reporter:  Clem Flory           |          Owner:  nobody
                   Type:  Bug                  |         Status:  new
              Component:  contrib.staticfiles  |        Version:  2.0
               Severity:  Normal               |       Keywords:
           Triage Stage:  Unreviewed           |      Has patch:  0
    Needs documentation:  0                    |    Needs tests:  0
Patch needs improvement:  0                    |  Easy pickings:  0
                  UI/UX:  0                    |
-----------------------------------------------+------------------------
 My team recently started using Bootstrap 4, and some of their styles get
 broken by the regex patterns in `HashedFilesMixin`
 
(https://github.com/django/django/blob/2.0.2/django/contrib/staticfiles/storage.py#L52-L57).
 This is loosely related to #21080.

 For example, this is one of the rules in the generated Bootstrap 4 CSS,
 and the current regex incorrectly mistakes the closing parentheses in
 `rgba(0, 0, 0, 0.5)` as the end of `url()`:
 {{{#!css
 .navbar-light .navbar-toggler-icon {
   background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0
 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0,
 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10'
 d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
 }
 }}}

 Not an ideal solution, but we were able to work around this issue by
 Base64 encoding these data URIs.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29167>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.566f2e656f99f626cabb8547bec41bed%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to