Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color declaration values aren't compressed if terminated by a semicolon #1946

Closed
xzyfer opened this issue Dec 28, 2015 · 6 comments
Closed
Assignees
Labels
help wanted Extra attention is needed planned We would like to add this feature at some point

Comments

@xzyfer
Copy link

xzyfer commented Dec 28, 2015

a {
  b: #ff6600;
}

Expected

a{b:#f60}

Result

a{b:#ff6600}

Removing the ; fixes the issue.
Tested on Sass 3.4.20 and 4.0.0.alpha.1

@chriseppstein
Copy link

Removing the ; has no effect. But putting the color into a variable first does. I think this is a static parser issue. I think we shouldn't use any static parsing optimizations when outputting in compressed mode.

@chriseppstein
Copy link

(This isn't the only such issue where static parsing messes up compression.)

@xzyfer
Copy link
Author

xzyfer commented Jan 5, 2016

@chriseppstein when testing on Sass 3.4.20 and 4.0.0.alpha.1 removing the ; did fix the issue.

My guess is that it's because the STATIC_VALUE only matches if there is a trailing [;}].

@mgreter
Copy link

mgreter commented Jan 9, 2016

@chriseppstein any updates on the proposed fix presented by xzyfer?

@chriseppstein chriseppstein self-assigned this Apr 28, 2016
@chriseppstein
Copy link

@mgreter No work has been done on this yet, but I think it makes sense to not do any static parsing when in compressed mode so that we can always compress output the best.

@chriseppstein chriseppstein added planned We would like to add this feature at some point help wanted Extra attention is needed labels Apr 28, 2016
@nex3
Copy link
Contributor

nex3 commented Apr 6, 2018

Duplicate of sass/ruby-sass#7

@nex3 nex3 marked this as a duplicate of sass/ruby-sass#7 Apr 6, 2018
@nex3 nex3 closed this as completed Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed planned We would like to add this feature at some point
Projects
None yet
Development

No branches or pull requests

4 participants