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

Feature: Add YUI-style optimisations for compressed CSS output #847

Closed
ghost opened this issue Jul 11, 2013 · 13 comments
Closed

Feature: Add YUI-style optimisations for compressed CSS output #847

ghost opened this issue Jul 11, 2013 · 13 comments
Labels
enhancement New feature or request help wanted Extra attention is needed planned We would like to add this feature at some point

Comments

@ghost
Copy link

ghost commented Jul 11, 2013

Just to name a few optimisations that the YUI compressor handles but SASS doesn't:

  • Removing the leading zero from floating-point numbers (0.5em -> .5em)
  • Removing the units from 0 (0px -> 0)
  • Removing spaces in the middle of font lists ("Font 1", "Font 2" -> "Font 1","Font 2")
@Anahkiasen
Copy link

...does that really provide an enormous speed boost to the loading time ?

@kevinSuttle
Copy link

I'd be interested in this. Every little bit helps, though a linter seems a bit out of scope. https://csslint.net/

@ghost
Copy link
Author

ghost commented Aug 21, 2013

In hindsight, having a linter does seem a bit out of scope, although things like removing units from values can reduce file size by quite a bit if you have a lot of definitions. Stuff like condensing border definitions into one rule is kind of out of the scope of SASS.

@kevinSuttle
Copy link

Don't get me wrong, I still very much want that kind of compression and minification, along with linting. In fact, I have been trying to handle this with Grunt or Rake tasks lately, so I'm glad this discussion is happening now (yes, I use and am aware of the compressed style of output). What we're talking about is pushing Sass beyond compression into linting. Maybe it could fit into the goals of Sass, I dunno. I think the discussion would have to be with a wider audience.

Maybe it could be an option in Compass? + @chriseppstein

@kevinSuttle
Copy link

Linting could also be something that could be a part of a GUI app like Codekit. Thoughts @bdkjones?

@bdkjones
Copy link

CodeKit already offers the compressed option for Sass output.

Is there a good Sass lint tool available?

Sent from my iPhone

On Aug 21, 2013, at 7:42, Kevin Suttle [email protected] wrote:

Linting could also be something that could be a part of a GUI app like Codekit. Thoughts @bdkjones?


Reply to this email directly or view it on GitHub.

@kevinSuttle
Copy link

Ooh now that's a good question.

@kevinSuttle
Copy link

I really thought there'd be more traction and opinions on this.

A quick search didn't yield much other than the following:
https://github.com/causes/scss-lint

@mhulse
Copy link

mhulse commented Sep 7, 2013

+1 on remove leading zero.

The other optimizations look good as well. :)

@LeeMallabone
Copy link

@Undeterminant It looks like the font list compression is already present in master. If I've misunderstood, please add another example and I'll take a look.

@ghost
Copy link
Author

ghost commented Sep 18, 2013

This bug was reported 2 months ago, so, it may have silently been fixed with a code update. Either way, if it's in master, you can just accept it as implemented.

@kevinSuttle
Copy link

Any updates re: Sass/SCSS linting?

jshawl pushed a commit to jshawl/sass that referenced this issue Dec 30, 2014
jshawl pushed a commit to jshawl/sass that referenced this issue Dec 30, 2014
@nex3 nex3 added the help wanted Extra attention is needed label Aug 22, 2015
@nex3
Copy link
Contributor

nex3 commented Apr 5, 2018

Duplicate of #687.

@nex3 nex3 closed this as completed Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 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

7 participants