Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The option passed to gulp-sass
specifies style: 'compressed'
, however the actual output is not compressed.
This is because the key for the option should be outputStyle
, not style
(reference).
To repeat
Create a sub theme and run gulp.
Expected
Per the Sass docs, the output should
[have] no whitespace except that necessary to separate selectors and a newline at the end of the file. It also includes some other minor compressions, such as choosing the smallest representation for colors. It’s not meant to be human-readable
Actual
The output has linebreaks and other whitespace that it shouldn't, and it is very human-readable.
Proposed resolution
Change the option key from style
to outputStyle
.
In limited testing with a preexisting sub theme, this change achieves the expected result.
Comment | File | Size | Author |
---|---|---|---|
#2 | fix-sass-style-output-option-2843138.patch | 411 bytes | kentr |
Comments
Comment #2
kentr CreditAttribution: kentr as a volunteer commentedComment #3
kentr CreditAttribution: kentr as a volunteer commentedClarified the language in the description.
Comment #5
shadcn CreditAttribution: shadcn at Chapter Three commentedNice. Thanks. Committed.
Comment #6
shadcn CreditAttribution: shadcn at Chapter Three commented