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.

CommentFileSizeAuthor
#2 fix-sass-style-output-option-2843138.patch411 byteskentr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kentr created an issue. See original summary.

kentr’s picture

Status: Active » Needs review
FileSize
411 bytes
kentr’s picture

Issue summary: View changes

Clarified the language in the description.

  • arshadcn committed 79e5bce on 7.x-3.x authored by kentr
    Issue #2843138 by kentr: Fix Sass output style option
    
shadcn’s picture

Status: Needs review » Fixed

Nice. Thanks. Committed.

shadcn’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.