Skip to content

Commit

Permalink
Merge pull request #1 from danny6514/danny6514-patch-1
Browse files Browse the repository at this point in the history
Update cssmin.rb
  • Loading branch information
danny6514 committed Sep 24, 2015
2 parents 60e7050 + 96967e1 commit a2e558a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/cssmin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ def self.minify(input)
# Replace background-position:0; with background-position:0 0;
css = css.gsub('background-position:0;', 'background-position:0 0;')

# Replace transform-origin:0; with transform-origin:0 0;
css = css.gsub('transform-origin:0;', 'transform-origin:0 0;')

# Replace mask-position:0; with mask-position:0 0;
css = css.gsub('mask-position:0;', 'mask-position:0 0;')

# Replace 0.6 with .6, but only when preceded by : or a space.
css = css.gsub(/(:|\s)0+\.(\d+)/, '\1.\2')

Expand Down

0 comments on commit a2e558a

Please sign in to comment.