From: Jakub Pawlowicz Date: Fri, 24 Apr 2015 12:55:14 +0000 (+0100) Subject: Fixes #548 - regression in font minifying. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=397c74911d5577920098901b3cb40395e180c803;p=clean-css.git Fixes #548 - regression in font minifying. Ah, you nasty font shorthand - we need #254. --- diff --git a/History.md b/History.md index 6fda393e..611b7818 100644 --- a/History.md +++ b/History.md @@ -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) ================== diff --git a/lib/selectors/optimizers/simple.js b/lib/selectors/optimizers/simple.js index c619f811..d31eb1b9 100644 --- a/lib/selectors/optimizers/simple.js +++ b/lib/selectors/optimizers/simple.js @@ -191,6 +191,9 @@ function minifyFont(property) { if (hasNumeral) return; + if (property[2] == '/') + return; + var normalCount = 0; if (property[1][0] == 'normal') normalCount++; diff --git a/test/selectors/optimizers/simple-test.js b/test/selectors/optimizers/simple-test.js index 302c3314..2ff3663b 100644 --- a/test/selectors/optimizers/simple-test.js +++ b/test/selectors/optimizers/simple-test.js @@ -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']] ] }) )