HyperKitty with COMPRESS is incompatible with recent ruby-sass.
With settings like
COMPRESS_PRECOMPILERS = (
('text/x-scss', 'sass -t compressed {infile} {outfile}'),
('text/x-sass', 'sass -t compressed {infile} {outfile}'),
)
COMPRESS_OFFLINE = True
COMPRESS_ENABLED = True
and recent versions of ruby-sass, running django-admin compress
fails with
CommandError: An error occurred during rendering /opt/mailman/mm/venv/lib/python3.7/site-packages/django_mailman3-1.3.5-py3.7.egg/django_mailman3/templates/account/password_reset_from_key.html: Error: Invalid CSS after "...lor}: #{$value}": expected "{", was ";"
on line 4 of /opt/mailman/mm/static/hyperkitty/libs/bootstrap/stylesheets/_root.scss
from line 11 of /opt/mailman/mm/static/hyperkitty/libs/bootstrap/stylesheets/bootstrap.scss
from line 4 of /opt/mailman/mm/static/hyperkitty/sass/hyperkitty.scss
Use --trace for backtrace.
I don't know exactly with what version of ruby-sass this started, but the failure occurs with ruby-sass Sass 3.4.23 (Selective Steve)
and not with Sass 3.2.12 (Media Mark)
. There are newer versions, e.g. Ubuntu 20.0.4 has Ruby Sass 3.7.4
. It isn't known if they fail or not.
The workaround is to install sassc
and use
COMPRESS_PRECOMPILERS = (
('text/x-scss', 'sassc -t compressed {infile} {outfile}'),
('text/x-sass', 'sassc -t compressed {infile} {outfile}'),
)
Edited by Mark Sapiro