Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

compressed does not remove last colon for properties #142

Closed
@james2doyle

Description

@james2doyle

I was doing some testing of ruby sass vs. node-sass. I was testing the compilation time of each one and added the compress flag to each command.

I noticed that the node-sass didn't remove the last, unnecessary, colon when compression is on.

source input

$bodyColor: #66ccff;
$bodyBackground: #212121;
body {
  background: $bodyBackground;
  color: $bodyColor;
  header {
    max-width: 100%;
    height: 100px;
    & > nav {
      display: inline-block;
      ul {
        margin: 0;
        padding: 0;
      }
    }
  }
}

sass output

command: sass --style compressed --scss test.scss test-rb.css

body{background:#212121;color:#6cf}body header{max-width:100%;height:100px}body header>nav{display:inline-block}body header>nav ul{margin:0;padding:0}

node-sass output

command: time node-sass --output-style="compressed" test.scss test-node.css

body {background:#212121;color:#66ccff;}body header {max-width:100%;height:100px;}body header>nav {display:inline-block;}body header > nav ul {margin:0;padding:0;}

There are 13 additional characters in the node-sass output. This isn't much on a 17 line file, but it will grow exponentially over larger files.

I will add this issue to libsass as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions