hasmin v1.0 Release Notes

Release Date: 2017-10-20 // almost 5 years ago
  • โž• Added

    • border-color-*, border-width-* and border-style-* longhands are now replaced by their shorthand, when the four corresponding longhands are present in a rule.
    • ๐Ÿ’… Style rules merging: merges pairs of rules that either have all the same selectors, or all the same declarations. For it to be safe, it only does so whenever two conditions don't meet:
      1. There is a rule in between with the same specificity
      2. This rule has a declaration that "clashes" (interferes) with one of the declarations of the rules to be merged.

    By default it is enabled, but it can be disabled with --no-rule-merging (or using a Config with MergeRulesOn).

    ๐Ÿ”„ Changed

    • Replaced --no-property-sorting for --sort-properties. Now Hasmin doesn't sort properties by default; sorting declarations became opt-in rather than opt-out. This is because:
      1. Whether lexicographical sorting of properties aids compression varies a lot from stylesheet to stylesheet, for some files it helps, for others it hurts.
      2. The current implementation doesn't take into account all the possible interactions between properties, making it unsafe.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed non-exhaustive pattern bug introduced in 0.3.3
    • ๐Ÿ›  Fixed parser choking with rules that contained a semicolon but no declarations, e.g. div { ; }.