Fixes #548 - regression in font minifying.
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Fri, 24 Apr 2015 12:55:14 +0000 (13:55 +0100)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Sat, 25 Apr 2015 08:38:52 +0000 (09:38 +0100)
Ah, you nasty font shorthand - we need #254.

History.md
lib/selectors/optimizers/simple.js
test/selectors/optimizers/simple-test.js

index 6fda393..611b781 100644 (file)
@@ -9,6 +9,11 @@
 * Moves URL rebasing & rewriting into lib/urls.
 * Fixed issue [#436](https://github.com/jakubpawlowicz/clean-css/issues/436) - refactors URI rewriting.
 
+[3.2.5 / 2015-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v3.2.4...3.2)
+==================
+
+* Fixed issue [#548](https://github.com/jakubpawlowicz/clean-css/issues/548) - regression in font minifying.
+
 [3.2.4 / 2015-04-24](https://github.com/jakubpawlowicz/clean-css/compare/v3.2.3...v3.2.4)
 ==================
 
index c619f81..d31eb1b 100644 (file)
@@ -191,6 +191,9 @@ function minifyFont(property) {
   if (hasNumeral)
     return;
 
+  if (property[2] == '/')
+    return;
+
   var normalCount = 0;
   if (property[1][0] == 'normal')
     normalCount++;
index 302c331..2ff3663 100644 (file)
@@ -301,6 +301,10 @@ vows.describe(SimpleOptimizer)
       'with mixed normal and weight': [
         'a{font: normal small-caps 400 medium Georgia, sans-serif;}',
         [['font', 'normal', 'small-caps', '400', 'medium', 'Georgia', ',', 'sans-serif']]
+      ],
+      'with line height': [
+        'a{font: 11px/normal sans-serif}',
+        [['font', '11px', '/', 'normal', 'sans-serif']]
       ]
     })
   )