From: Jakub Pawlowicz Date: Sat, 19 Mar 2011 09:08:56 +0000 (+0100) Subject: Update to version 0.2.1. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=0f53466dd52e2bcca5523a9fd437bff4ea1930a7;p=clean-css.git Update to version 0.2.1. * Added stripping space before !important keyword. --- diff --git a/History.md b/History.md index 85b29bf9..a0873f24 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,9 @@ +0.2.1 / 2011-03-19 +================== + + * Added stripping space before !important keyword. + * Updated repository location and author information in package.json. + 0.2.0 / 2011-03-02 ================== diff --git a/lib/clean.js b/lib/clean.js index 4527f6b7..2ead47d7 100644 --- a/lib/clean.js +++ b/lib/clean.js @@ -64,6 +64,7 @@ var CleanCSS = { replace(/;\s*;+/g, ';') // whitespace between semicolons & multiple semicolons replace(/\n/g, '') // line breaks replace(/\s+/g, ' ') // multiple whitespace + replace(/ !important/g, '!important') // whitespace before !important replace(/[ ]?,[ ]?/g, ',') // space with a comma replace(/progid:[^(]+\(([^\)]+)/, function(match, contents) { // restore spaces inside IE filters (IE 7 issue) return match.replace(/,/g, ', '); diff --git a/package.json b/package.json index 0ee062a9..b3902216 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "clean-css", - "author": "Jakub Pawlowicz (http://twitter.com/JakubPawlowicz)", + "author": "Jakub Pawlowicz (http://twitter.com/GoalSmashers)", "description": "A well-tested CSS minifier", "keywords": ["css", "minifier"], - "homepage": "http://github.com/jakubpawlowicz/clean-css", + "homepage": "http://github.com/GoalSmashers/clean-css", "repository": { "type" : "git", - "url" : "http://github.com/jakubpawlowicz/clean-css.git" + "url" : "http://github.com/GoalSmashers/clean-css.git" }, - "version": "0.2.0", + "version": "0.2.1", "main": "index.js", "bin": { "cleancss": "./bin/cleancss" diff --git a/test/data/blueprint-min.css b/test/data/blueprint-min.css index 87525470..5644f04e 100644 --- a/test/data/blueprint-min.css +++ b/test/data/blueprint-min.css @@ -3,7 +3,7 @@ body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,ad article,aside,dialog,figure,footer,header,hgroup,nav,section{display:block} body{line-height:1.5;background:#fff} table{border-collapse:separate;border-spacing:0} -caption,th,td{text-align:left;font-weight:400;float:none !important} +caption,th,td{text-align:left;font-weight:400;float:none!important} table,th,td{vertical-align:middle} blockquote:before,blockquote:after,q:before,q:after{content:''} blockquote,q{quotes:"" ""} @@ -20,9 +20,9 @@ h5{font-size:1em;font-weight:700;margin-bottom:1.5em} h6{font-size:1em;font-weight:700} h1 img,h2 img,h3 img,h4 img,h5 img,h6 img{margin:0} p{margin:0 0 1.5em} -.left{float:left !important} +.left{float:left!important} p .left{margin:1.5em 1.5em 1.5em 0;padding:0} -.right{float:right !important} +.right{float:right!important} p .right{margin:1.5em 0 1.5em 1.5em;padding:0} a:focus,a:hover{color:#09f} a{color:#06c;text-decoration:underline} diff --git a/test/unit-test.js b/test/unit-test.js index ed9f6847..965a04e6 100644 --- a/test/unit-test.js +++ b/test/unit-test.js @@ -247,5 +247,11 @@ vows.describe('clean-units').addBatch({ "@charset 'utf-8';div :before { display: block }@charset 'utf-8';a { color: #f10 }", "@charset 'utf-8';div :before{display:block}a{color:#f10}" ] + }), + 'important': cssContext({ + 'space before': [ + "body{background-color:#fff !important}", + "body{background-color:#fff!important}" + ] }) }).export(module); \ No newline at end of file