Tom Byrer [Mon, 28 Dec 2015 17:48:27 +0000 (10:48 -0700)]
change header
Tom Byrer [Wed, 23 Dec 2015 19:28:56 +0000 (12:28 -0700)]
+ online tools
closes #330
Jakub Pawlowicz [Mon, 23 Nov 2015 20:24:25 +0000 (20:24 +0000)]
Fixes #707 - correct guard clause in `split` helper.
Turns out the case with no separators and a string pattern was never
caught by a guard clause.
Thanks to @alexlamsl for spotting it.
Jakub Pawlowicz [Fri, 13 Nov 2015 11:15:38 +0000 (11:15 +0000)]
Version 3.4.8 release notes.
Jakub Pawlowicz [Thu, 12 Nov 2015 22:17:20 +0000 (22:17 +0000)]
Fixes #676 - fuzzy matching in unquoted data URIs.
Instead of matching just whitespace, also curly braces and semicolons
needs to be fuzzy matched as those tokens indicate context beyond
escaped URI.
Jakub Pawlowicz [Tue, 10 Nov 2015 08:22:06 +0000 (08:22 +0000)]
Version 3.4.7 release notes.
Jakub Pawlowicz [Thu, 5 Nov 2015 08:22:37 +0000 (08:22 +0000)]
Adds #701 release notes.
Jakub Pawlowicz [Tue, 10 Nov 2015 08:07:05 +0000 (08:07 +0000)]
Fixes #692 - edge case in URL quoting.
When a SVG contains brackets it should always be quoted.
Jakub Pawlowicz [Sat, 7 Nov 2015 16:16:43 +0000 (16:16 +0000)]
Fixes transparent color test to use correct `background` declaration.
Thanks to @alfaproject for spotting it.
Jakub Pawlowicz [Thu, 5 Nov 2015 08:16:14 +0000 (08:16 +0000)]
Fixes #699 - IE9 transparent hack.
There is a Explorer 9 hack requiring `rgba(0,0,0,0)` not a minified
`transparent` value for `background` property.
Jakub Pawlowicz [Mon, 2 Nov 2015 08:18:38 +0000 (08:18 +0000)]
Fixes #695 - edge case in shorthand overriding.
A longhand value should not be overriden by a shorthand with
a function value, e.g.
```css
div {
background-color: red;
background: linear-gradient(red, blue);
}
```
Jakub Pawlowicz [Thu, 5 Nov 2015 08:23:10 +0000 (08:23 +0000)]
Adds Node.js 5 tests on TravisCI.
Jakub Pawlowicz [Wed, 4 Nov 2015 18:02:04 +0000 (18:02 +0000)]
Merge pull request #702 from island205/master
fix #701 properties.urlQuotes doesn't work
island205 [Mon, 2 Nov 2015 14:22:28 +0000 (22:22 +0800)]
fix #701 properties.urlQuotes doesn't work
Prevent SourceReader to remove all quote in url()
add test case
Jakub Pawlowicz [Mon, 2 Nov 2015 07:34:38 +0000 (07:34 +0000)]
Adds pre-release warning to readme file.
Jakub Pawlowicz [Thu, 29 Oct 2015 14:55:34 +0000 (14:55 +0000)]
Runs tests on any Node.js 4.x.
Good point by @XhmikosR.
Jakub Pawlowicz [Wed, 28 Oct 2015 19:25:10 +0000 (19:25 +0000)]
Merge pull request #698 from 4-k/patch-1
Fixed link
Nilay Vishwakarma [Tue, 27 Oct 2015 11:58:17 +0000 (17:28 +0530)]
Fixed link
fixed broken link
Jakub Pawlowicz [Wed, 14 Oct 2015 13:20:58 +0000 (14:20 +0100)]
Version 3.4.6 release notes.
Jakub Pawlowicz [Mon, 12 Oct 2015 07:28:07 +0000 (08:28 +0100)]
Fixes #679 - wrong rebasing of remote URLs.
There was an edge case when a remote stylesheet pointed to a URL
in a different domain. Introduced in #667.
Jakub Pawlowicz [Fri, 2 Oct 2015 07:25:12 +0000 (08:25 +0100)]
Merge pull request #684 from juaniiie/patch-1
Update README.md
Juana [Fri, 2 Oct 2015 03:45:27 +0000 (20:45 -0700)]
Update README.md
Jakub Pawlowicz [Wed, 30 Sep 2015 06:38:06 +0000 (07:38 +0100)]
Merge pull request #683 from scottgonzalez/readme-callbacks
Fix callback arguments in readme examples
Scott González [Tue, 29 Sep 2015 20:37:03 +0000 (16:37 -0400)]
Fix callback arguments in readme examples
Jakub Pawlowicz [Mon, 28 Sep 2015 08:49:35 +0000 (09:49 +0100)]
Version 3.4.5 release notes.
Jakub Pawlowicz [Mon, 28 Sep 2015 08:43:31 +0000 (09:43 +0100)]
Fixes #681 - property inheritance & restructuring.
We should not reorder CSS properties which are inherited and happen
to have a shorthand, which applies to `font`, `line-height` (which
shorthand is `font`), and `list-style`.
Other properties that don't have a shorthand are already not
reorderable based on their value.
Jakub Pawlowicz [Sun, 27 Sep 2015 11:14:12 +0000 (12:14 +0100)]
Fixes #675 - overriding with `!important`.
There was an edge case with overriding properties with `!important`
modifier.
It's a regression introduced in
2ba023dd151d9c494a3cffbda538ca46f7e36f5b.
Jakub Pawlowicz [Sun, 27 Sep 2015 10:38:57 +0000 (11:38 +0100)]
Merge pull request #682 from SPxiaomin/patch-1
Update README.md
gujunmin [Sun, 27 Sep 2015 07:46:28 +0000 (15:46 +0800)]
Update README.md
correct the word 'precedence' in line 198
Jakub Pawlowicz [Mon, 21 Sep 2015 08:31:46 +0000 (09:31 +0100)]
Version 3.4.4 release notes.
Jakub Pawlowicz [Sun, 20 Sep 2015 11:23:06 +0000 (12:23 +0100)]
Fixes #626 - edge case in import rebasing.
When an import statement appeared inside a comment we were
still rebasing such imports if a quote appeared in subsequent
block of text.
Jakub Pawlowicz [Sun, 20 Sep 2015 07:39:30 +0000 (08:39 +0100)]
Fixes #674 - adjacent merging order.
There was an edge case merging two same, adjacent properties when
both were removed from the output.
Jakub Pawlowicz [Fri, 18 Sep 2015 06:48:32 +0000 (07:48 +0100)]
Adds Node.js 4+ info to changelog.
Jakub Pawlowicz [Fri, 18 Sep 2015 06:47:08 +0000 (07:47 +0100)]
Updates version requirement info.
Jakub Pawlowicz [Fri, 18 Sep 2015 06:46:48 +0000 (07:46 +0100)]
Requires Node.js 4.0+ engine.
Jakub Pawlowicz [Fri, 18 Sep 2015 06:38:41 +0000 (07:38 +0100)]
Bumps Windows tests to run on Node.js 4.
Jakub Pawlowicz [Fri, 18 Sep 2015 06:37:06 +0000 (07:37 +0100)]
Fixes comment restoring on Windows.
Windows line break is two characters long, so we need
to take that into account.
Jakub Pawlowicz [Fri, 18 Sep 2015 06:04:02 +0000 (07:04 +0100)]
Bumps uglify dev dependency for security.
Thanks @alanshaw for David.
Jakub Pawlowicz [Tue, 15 Sep 2015 06:59:30 +0000 (07:59 +0100)]
Bumps source-map dependency to 0.5.
Jakub Pawlowicz [Tue, 15 Sep 2015 06:53:07 +0000 (07:53 +0100)]
Requires node.js 4.0 as minimal version.
Jakub Pawlowicz [Tue, 15 Sep 2015 06:37:51 +0000 (07:37 +0100)]
Adds a missing readme entry about `shorterLengthUnits` switch.
Jakub Pawlowicz [Tue, 15 Sep 2015 06:21:28 +0000 (07:21 +0100)]
Version 3.4.3 release notes.
Jakub Pawlowicz [Tue, 15 Sep 2015 06:18:34 +0000 (07:18 +0100)]
Fixes #669 - adjacent overriding with `!important`.
With two adjacent properties with same value and latter being
important the former should be removed.
Jakub Pawlowicz [Tue, 15 Sep 2015 05:54:42 +0000 (06:54 +0100)]
Fixed #668 - node v4 path.join.
Backporting node v4 fix as path.join does not accept undefined as
a parameter anymore.
Jakub Pawlowicz [Mon, 14 Sep 2015 10:58:01 +0000 (11:58 +0100)]
Version 3.4.2 release notes.
Jakub Pawlowicz [Mon, 14 Sep 2015 06:20:51 +0000 (07:20 +0100)]
Fixes #654 - disables length optimizations.
Due to a popular request length unit optimizations are being disabled.
This change (API-wise) is backward-compatible, so there is no need
for a new minor release, however it introduces a
`properties.shorterLengthUnits` switch if someone would like to use
the optimizations again.
Jakub Pawlowicz [Sun, 13 Sep 2015 17:02:27 +0000 (18:02 +0100)]
Fixes #667 - rebasing remote URLs.
If a URL is remote but rebase root is not there is no point in
rebasing at all.
Jakub Pawlowicz [Sun, 13 Sep 2015 16:05:46 +0000 (17:05 +0100)]
Fixes #598 - restructuring border properties.
Border-side properties (-top, -right, -left, and -bottom) can't be
reordered with -width, -color, and -style ones.
Jakub Pawlowicz [Wed, 9 Sep 2015 12:26:48 +0000 (13:26 +0100)]
Fixes #655 - shorthand override merging.
When multiplex shorthand follows a non-multiplex shorthand then skip
merging as it's likely a fallback.
Jakub Pawlowicz [Sat, 5 Sep 2015 20:12:49 +0000 (21:12 +0100)]
Fixes #662 - !important properties and selector reducing.
It was possible that an !important property was overridden during
advanced reducing and an optimization was discarded, but due to
lack of cloning the change propagated nevertheless.
Jakub Pawlowicz [Sat, 5 Sep 2015 19:00:23 +0000 (20:00 +0100)]
Fixes #660 - override compacting of !important properties.
We were not copying properties when assigning in four-values tokens.
As a result we were adding !important value to all components as they
were referencing the same object.
Jakub Pawlowicz [Wed, 2 Sep 2015 05:45:07 +0000 (06:45 +0100)]
Merge pull request #656 from westyby/readme-edits
Delete duplicated description.
Andrey Kovalsky [Tue, 1 Sep 2015 14:48:55 +0000 (17:48 +0300)]
Delete duplicated description.
Jakub Pawlowicz [Thu, 27 Aug 2015 15:39:45 +0000 (16:39 +0100)]
Version 3.4.1 release notes.
Jakub Pawlowicz [Thu, 27 Aug 2015 13:13:57 +0000 (14:13 +0100)]
Fixes #652 - order of restoring and removing unused tokens.
We should first restore token and then remove unused tokens as this
way the positions don't get mangled.
Jakub Pawlowicz [Thu, 27 Aug 2015 07:23:44 +0000 (08:23 +0100)]
Points master to version 3.5.0-pre.
Jakub Pawlowicz [Thu, 27 Aug 2015 07:21:17 +0000 (08:21 +0100)]
Version 3.4.0.
Jakub Pawlowicz [Thu, 27 Aug 2015 07:18:38 +0000 (08:18 +0100)]
Bumps copyright years. Yay!
Jakub Pawlowicz [Thu, 27 Aug 2015 07:15:44 +0000 (08:15 +0100)]
Version 3.3.10 release notes.
Jakub Pawlowicz [Thu, 27 Aug 2015 06:40:38 +0000 (07:40 +0100)]
Adds testing source maps in batch mode.
Previous couple commits were fixes identified by this change, where
output with source maps was different than one without.
Jakub Pawlowicz [Thu, 27 Aug 2015 06:37:29 +0000 (07:37 +0100)]
Fixes removing unused items.
Items should be removed by position as it is not guaranteed that
there are no comments somewhere in between. Affects both modes - source
maps on & off.
Jakub Pawlowicz [Thu, 27 Aug 2015 06:36:19 +0000 (07:36 +0100)]
Improves `outline` break up with source maps.
Another example where JS type coercion betrayed us.
Jakub Pawlowicz [Thu, 27 Aug 2015 05:50:49 +0000 (06:50 +0100)]
Adds better comments + keepBreaks handling.
Basically we should remove a comment AND a subsequent line break when
restoring. This is again due to doing it too late, see #407.
Jakub Pawlowicz [Thu, 27 Aug 2015 05:47:02 +0000 (06:47 +0100)]
Adds better text normalizing in source maps mode.
This is making me uneasy as we needed a slightly bigger hack to
push context to text processor's escape.
See #407.
Jakub Pawlowicz [Wed, 26 Aug 2015 05:11:00 +0000 (06:11 +0100)]
Fixes non-adjacent optimizations for source maps.
We've been comparing wrong things as AST is different.
Jakub Pawlowicz [Tue, 25 Aug 2015 07:10:57 +0000 (08:10 +0100)]
Refixes #629 - source maps & background shorthands.
Jakub Pawlowicz [Tue, 18 Aug 2015 06:45:52 +0000 (07:45 +0100)]
Fixes #632 - adds disabling remote imports.
So far we only had an option to skip inlining of all imports, but
with this commit a fine-grained control is added, e.g. import from
all but fonts.googleapis.com:
API: `new CleanCSS({ processImportFrom: ['!fonts.googleapis.com'] })`
CLI: `cleancss --skip-import-from fonts.googleapis.com`
To skip all local imports:
API: `new CleanCSS({ processImportFrom: ['remote'] })`
CLI: `cleancss --skip-import-from local`
To skip all remote and certain local imports:
API: `new CleanCSS({ processImportFrom: ['local', '!path/to/file'] })`
CLI: `cleancss --skip-import-from remote,path/to/file`
Jakub Pawlowicz [Mon, 24 Aug 2015 04:37:23 +0000 (05:37 +0100)]
Adds support for Polymer mixins.
We lacked support of property-level blocks (just simple values) so
this commit adds this with a special handling of properties in
tokenizer, simple & advanced optimization, and stringifier.
See: https://www.polymer-project.org/1.0/docs/devguide/styling.html#custom-css-mixins
Jakub Pawlowicz [Mon, 24 Aug 2015 05:05:13 +0000 (06:05 +0100)]
Replaces Chunker with uber-powerful split.
These two were doing basically the same thing, while the latter
being smarter about a context.
Jakub Pawlowicz [Mon, 24 Aug 2015 04:37:18 +0000 (05:37 +0100)]
Improves splitting strings when keeping values.
The last value in a string always included a separator while sometimes
it should not.
Jakub Pawlowicz [Mon, 24 Aug 2015 04:37:11 +0000 (05:37 +0100)]
Adds proper handling of an open split character.
When split value starts with an level openinig character we were not
handling such cases correctly.
Jakub Pawlowicz [Mon, 24 Aug 2015 04:36:56 +0000 (05:36 +0100)]
Adds breaking splits on a closing token.
So we can break body on a closing brace which is a separator at the
same time.
Jakub Pawlowicz [Mon, 24 Aug 2015 04:36:44 +0000 (05:36 +0100)]
Adds support for custom split separators.
It defaults to braces as before but it can be customized to anything now.
Jakub Pawlowicz [Mon, 24 Aug 2015 04:36:37 +0000 (05:36 +0100)]
Refactors Splitter class into a split function.
Jakub Pawlowicz [Mon, 24 Aug 2015 04:36:30 +0000 (05:36 +0100)]
Adds support for Polymer / Web Components selectors.
These include
* :host and ::content for Polymer
* /deep/ and ::shadow for Web Components
See #648.
Jakub Pawlowicz [Mon, 24 Aug 2015 04:36:18 +0000 (05:36 +0100)]
Refixes #648 - apply at-rule support.
We were not trimming the token before checking for @ character so
only rules without whitespace were working fine.
Jakub Pawlowicz [Fri, 21 Aug 2015 08:10:32 +0000 (09:10 +0100)]
Fixes #596 - support for !ie IE<8 hack.
!ie fix is like a backslash hack for IE<10.
Jakub Pawlowicz [Fri, 21 Aug 2015 06:25:22 +0000 (07:25 +0100)]
Orders CLI options.
Jakub Pawlowicz [Thu, 20 Aug 2015 06:46:13 +0000 (07:46 +0100)]
Updates install requirements.
Adds io.js 3.0+ as we test against it and it'll become Node.js 4 at
some point.
Jakub Pawlowicz [Thu, 20 Aug 2015 06:43:24 +0000 (07:43 +0100)]
Adds npm caching in Travis CI builds.
Jakub Pawlowicz [Thu, 20 Aug 2015 06:40:48 +0000 (07:40 +0100)]
Bumps tested io.js to 3.0.
Jakub Pawlowicz [Thu, 20 Aug 2015 06:40:12 +0000 (07:40 +0100)]
Switches builds to Travis CI container infrastructure.
Jakub Pawlowicz [Thu, 20 Aug 2015 06:25:55 +0000 (07:25 +0100)]
Adds missing compatibility docs.
Missing since adding in, pt, and pc to unit minification.
Jakub Pawlowicz [Thu, 20 Aug 2015 06:23:17 +0000 (07:23 +0100)]
Removes 2.x -> 3.x upgrade guide.
We are at 3.4 already and if anyone needs it a 3.x branch still
has it.
Jakub Pawlowicz [Thu, 20 Aug 2015 06:20:47 +0000 (07:20 +0100)]
Tweaks wording in readme and CLI help.
Jakub Pawlowicz [Thu, 20 Aug 2015 06:15:12 +0000 (07:15 +0100)]
Fixes #649 - adds readme section about advanced optimizations.
Jakub Pawlowicz [Tue, 18 Aug 2015 06:11:35 +0000 (07:11 +0100)]
Adds a test for inlining content with protocol-less URLs.
This refers to #632, but just confirms we do the right thing.
Jakub Pawlowicz [Mon, 17 Aug 2015 06:31:53 +0000 (07:31 +0100)]
Fixes #607 - adds better rule reordering.
Apparently IDs coupled with tag selectors are safe for reordering too.
Jakub Pawlowicz [Sun, 16 Aug 2015 15:43:07 +0000 (16:43 +0100)]
Fixes #635 - adds safer `0%` optimizations.
Apparently we can't turn `0%` into `0` for height & max-height where
layout breaks, see: http://codepen.io/H1D/pen/bdzRJo
Jakub Pawlowicz [Sun, 16 Aug 2015 15:35:55 +0000 (16:35 +0100)]
Fixes #618 - adds less restricitve function validation.
To support various functions which may allow URLs inside them, like
`image-src()` we need a less restrictve validation regex.
Jakub Pawlowicz [Sun, 16 Aug 2015 14:52:10 +0000 (15:52 +0100)]
Fixes #645 - adds bottom to top `media` merging.
In addition to top to bottom media merging we now support the reverse
order one. It works similar way as same selector two-way merging - see
2f8f100592908225c853997051f56bb87c35c20d.
Consider this example where top to bottom is not possible but reverse is:
```css
@media (max-width:768px){.one{padding-right:0}}
.one{padding:10px}
@media (max-width:768px){.one{margin:0}}
```
Jakub Pawlowicz [Sun, 16 Aug 2015 13:51:56 +0000 (14:51 +0100)]
Fixes #648 - adds property level at-rule support.
Polymer uses `@apply` rule on property level, so we support it now too.
Jakub Pawlowicz [Sun, 16 Aug 2015 11:17:55 +0000 (12:17 +0100)]
Adds inferring proxy settings from environment variables.
It is common for *nix and Windows programs to use to HTTP_PROXY
variable to identify proxy settings. So do we, e.g.
```bash
HTTP_PROXY=http://proxy-host:proxy-port cleancss styles.css
```
Jule Marcoueille [Fri, 7 Aug 2015 17:34:32 +0000 (19:34 +0200)]
Fixes #612 - adds HTTP proxy support for `@import` inlining.
By passing a full href to request proxy we can instruct it to
pass the request to the upstream server.
To use a proxy (via API), pass the proxy hostname and port to the
inliner options, e.g.
```javascript
new CleanCSS({
inliner: {
request: {
hostname: 'proxy host',
port: 'proxy port'
}
}
}).minify(...);
```
Specs by @jakubpawlowicz.
Jakub Pawlowicz [Thu, 13 Aug 2015 12:26:30 +0000 (13:26 +0100)]
Adds unit compatibility switches to disable length optimizations.
You can disable px -> (in|pc|pt) transforations with compatibility unit
switches. Tied to #625.
Jakub Pawlowicz [Thu, 13 Aug 2015 07:20:33 +0000 (08:20 +0100)]
Fixes #625 - adds length unit conversions.
* Converts px -> in (96px -> 1in);
* Converts px -> pc (16px -> 1pc);
* Converts px -> pt (4px -> 3pt).
Jakub Pawlowicz [Mon, 10 Aug 2015 07:49:44 +0000 (08:49 +0100)]
Fixes #644 - adds time unit optimizations.
It adds the following optimizations:
* second -> milisecond, e.g. 0.005s -> 5ms
* milisecond -> second, e.g. 500ms -> .5s
Jakub Pawlowicz [Sun, 9 Aug 2015 10:06:19 +0000 (11:06 +0100)]
Version 3.3.9 release notes.
Jakub Pawlowicz [Sun, 9 Aug 2015 09:55:15 +0000 (10:55 +0100)]
Fixes #640 - URI processing regression.
The fix to #633 included a regression in URI processing as the
algorithm introduced should only be applied to data URIs.
Jakub Pawlowicz [Sun, 9 Aug 2015 06:48:46 +0000 (07:48 +0100)]
Merge pull request #642 from vlajos/typofixes-vlajos-
20150807
typofix - https://github.com/vlajos/misspell_fixer