Jakub Pawlowicz [Fri, 20 Jan 2017 11:30:24 +0000 (12:30 +0100)]
Cleans up serializer code.
Why:
* Makes serialization context always the first argument;
* renamed function names for better clarity.
Jakub Pawlowicz [Fri, 20 Jan 2017 10:20:20 +0000 (11:20 +0100)]
Renames 'star' to 'asterisk'.
Why:
* This is the character's name.
Jakub Pawlowicz [Fri, 20 Jan 2017 10:12:19 +0000 (11:12 +0100)]
Renames curly bracket constants.
Why:
* To match other bracket constants.
Jakub Pawlowicz [Fri, 20 Jan 2017 10:08:03 +0000 (11:08 +0100)]
Renames `Token.BLOCK` to `Token.NESTED_BLOCK`.
Why:
* All CSS blocks can be nested so this name reflects
this rule better.
Jakub Pawlowicz [Fri, 20 Jan 2017 09:53:20 +0000 (10:53 +0100)]
Simplifies `split` helper code.
Why:
* Much of its complexity was due to old tokenizer which is no more;
* currently it serves as a way to splitting strings where commas
inside round brackets are ignored.
Jakub Pawlowicz [Fri, 20 Jan 2017 09:45:11 +0000 (10:45 +0100)]
Bumps copyright timestamps to 2017.
Jakub Pawlowicz [Fri, 20 Jan 2017 09:44:29 +0000 (10:44 +0100)]
Fixes linting warning in specificity module.
Jakub Pawlowicz [Fri, 20 Jan 2017 09:42:05 +0000 (10:42 +0100)]
Moves API options setup to `options` folder-space.
Why:
* So it lives alongside optimization level and formatting setup.
Jakub Pawlowicz [Fri, 20 Jan 2017 08:09:58 +0000 (09:09 +0100)]
Bumps online version to clean-css 3.4.24.
Jakub Pawlowicz [Fri, 20 Jan 2017 07:40:59 +0000 (08:40 +0100)]
Version 3.4.24 release notes.
Jakub Pawlowicz [Mon, 16 Jan 2017 16:55:38 +0000 (17:55 +0100)]
Fixes #859 - avoids `-webkit-border-radius` optimizations.
Why:
* Apparently it doesn't support shortening 4 values to 2, as the
latter is taken as a horizontal + vertical radius in all corners;
* disabling any optimizations as a precaution;
* see http://jsfiddle.net/qnGKj/2881/
Jakub Pawlowicz [Fri, 20 Jan 2017 07:31:00 +0000 (08:31 +0100)]
See #856 - adds missing History.md entry.
Jakub Pawlowicz [Thu, 19 Jan 2017 19:50:59 +0000 (20:50 +0100)]
Fixes #863 - adds `transform` callback for custom optimizations.
Why:
* So users can apply custom optimizations without forking clean-css
and learning how to plug such optimization in;
* may also aid in rewriting URLs after introduction of `rebaseTo`.
Jakub Pawlowicz [Thu, 19 Jan 2017 14:01:32 +0000 (15:01 +0100)]
Fixes #856 - allows `minify` to return a promise.
Why:
* Useful as an alternative to callback API;
* future Node.js versions will support `await` mechanism
which requires supporting promises.
Jakub Pawlowicz [Wed, 18 Jan 2017 17:02:16 +0000 (18:02 +0100)]
Adds `overrideProperties` level 2 optimizations flag.
Why:
* Previously property overriding was controlled via `mergeIntoShorthands`
flag which was confusing.
Jakub Pawlowicz [Wed, 18 Jan 2017 16:46:03 +0000 (17:46 +0100)]
Moves 'compacting' code to 'properties' folder-space.
Why:
* All those optimizations are dealing with properties so the new
name better reflects its role;
Also:
* renames `overrideCompactor` to `overrideProperties`;
* renames `compactorOptimize` to `optimizeProperties`.
* cleans up property optimizing code calling from level 2 optimizations
due to removal of aggressive merging, see #290.
Jakub Pawlowicz [Wed, 18 Jan 2017 15:46:04 +0000 (16:46 +0100)]
Renames `compactShorthands` level 2 option to `mergeIntoShorthands`.
Why:
* It better describes what this option does.
Jakub Pawlowicz [Wed, 18 Jan 2017 15:17:09 +0000 (16:17 +0100)]
Makes compactable code more explicit.
Why:
* All unprefixed properties has to be declared explicitely,
while vendor prefixed ones can be generated from them.
Jakub Pawlowicz [Wed, 18 Jan 2017 13:56:34 +0000 (14:56 +0100)]
See #290 - adds removing IE filters.
Why:
* Internet Explorer `filter` / `-ms-filter` are unsupported since
IE 10, which is also clean-css new default compatibility;
* can be restored by using `ie7`, `ie8`, or `ie9` compatibility
modes.
Jakub Pawlowicz [Wed, 18 Jan 2017 06:51:39 +0000 (07:51 +0100)]
See #290 - removes aggressive merging.
Why:
* Aggressive merging was replaced by override merging;
* it supports much more properties now so aggressive merging won't
be missed;
* it also overrides based on understandability not merely a
position in output file.
Side notes:
* This is a safe change as if a property is not configured to
be overridable it won't be;
* overhauls `canOverride` functionality to prevent features like
vendor prefixes or variables from overriding widely supported
values;
* overhauls validating values by allowing known values, which
strictly doesn't make it a full validator but rather a way
of telling if a value *may* be valid.
Jakub Pawlowicz [Mon, 16 Jan 2017 07:38:46 +0000 (08:38 +0100)]
See #290 - reworks `border` overriding.
Why:
* Border is a complex case where both `border` and all its
components: `border-color`, `border-style`, and `border-width`
are components. Also `border-(bottom|left|right|top)` are
shorthands too.
* this commit restores aggressive merging shorthand overriding right
inside shorthand compacting code.
Jakub Pawlowicz [Sun, 15 Jan 2017 11:14:26 +0000 (12:14 +0100)]
See #290 - disables `font` shorthand overriding.
Why:
* It's a shorthand property, so not straightforward to implement
in shorthand/override compacting;
* pending in #254.
Jakub Pawlowicz [Sun, 15 Jan 2017 11:11:38 +0000 (12:11 +0100)]
See #290 - disables `transition` shorthand overriding.
Why:
* It's a shorthand property, so not straightforward to implement
in shorthand/override compacting;
* pending in #861.
Jakub Pawlowicz [Sun, 15 Jan 2017 11:08:19 +0000 (12:08 +0100)]
See #290 - disables `animation` shorthand overriding.
Why:
* It's a shorthand property, so not straightforward to implement
in shorthand/override compacting;
* pending in #860.
Jakub Pawlowicz [Sun, 15 Jan 2017 11:25:15 +0000 (12:25 +0100)]
See #857 - removes redundant source map code.
Thanks to @alexlamsl for spotting it.
Why:
* Tracking input source map is done in #minify method already.
Jakub Pawlowicz [Sun, 15 Jan 2017 10:28:13 +0000 (11:28 +0100)]
Fixes #857 - normalizes CleanCSS API interface.
Why:
* `sourceMap` option has to be a boolean now;
* input source map can be passed as a 2nd argument to `minify`
method, making callback a 3rd;
* all other options are stateless so should be the `sourceMap`.
Jakub Pawlowicz [Sat, 14 Jan 2017 21:35:28 +0000 (22:35 +0100)]
Refactors validator into a set of functions.
Why:
* There's no need to keep it as an object, since configuration
can also be passed in.
Jakub Pawlowicz [Sat, 14 Jan 2017 10:30:04 +0000 (11:30 +0100)]
See #799 - speeds up serializing code.
Why:
* Instead of using an `if` branch implements wrapping and tracking
as a callback with `no-op` implementation when wrapping is disabled.
Jakub Pawlowicz [Sat, 14 Jan 2017 10:19:41 +0000 (11:19 +0100)]
See #799 - adds an option to wrap output at arbitrary column.
Why:
* As not all clients (i.e. email clients) like CSS in one line.
Jakub Pawlowicz [Fri, 13 Jan 2017 22:46:17 +0000 (23:46 +0100)]
See #799 - changes formatting defaults.
Why:
* When formatting is turned on it defaults to no formatting, so
any options need to be applied on top of these;
* adds `beautify` preset for the previous default, e.g.
`cleancss --format beautify one.css`.
Jakub Pawlowicz [Fri, 13 Jan 2017 11:05:39 +0000 (12:05 +0100)]
See #799 - renames `beautify` option to `format`.
Why:
* It makes more sense as it controls formatting in general;
* see #209 where `beautify` was introduced.
Jakub Pawlowicz [Thu, 12 Jan 2017 21:55:16 +0000 (22:55 +0100)]
See #799 - adds granular formatting options.
Why:
* To allow better control over how output is formatted;
* also gets rid of `keepBreaks` option in favor to
`{ beautify: 'keep-breaks' }` shortcut.
Jakub Pawlowicz [Wed, 11 Jan 2017 19:20:25 +0000 (20:20 +0100)]
See #773 - speeds up specificity lookup.
Why:
* Calculating it is slow, but, since it's done repeatedly for
the same selectors, it can be cached quite effectively.
Jakub Pawlowicz [Wed, 11 Jan 2017 17:20:00 +0000 (18:20 +0100)]
Fixes #773 - adds reordering based on selector specificity.
Why:
* Rules with different specificity can be safely reordered as those
with higher value will always override those with lower;
* there is no way to determine whether the latter can be ignored
because HTML context is not known;
* this is a level 2 optimization which are off by default.
Jakub Pawlowicz [Wed, 11 Jan 2017 07:40:03 +0000 (08:40 +0100)]
See #425 - nitpicking natural sorting algorithm.
Thanks to @alexlamsl for spotting these.
Jakub Pawlowicz [Tue, 10 Jan 2017 17:04:07 +0000 (18:04 +0100)]
Fixes #425 - enables natural method of sorting selectors.
Still defaults to standard sorting but natural becomes
a new option. Controlled via `selectorsSortingMethod`
option in level 1 optimizations.
Why:
* Natural way could be a more compression-efficient way;
* it's easier to read for a human.
Jakub Pawlowicz [Thu, 5 Jan 2017 11:35:17 +0000 (12:35 +0100)]
See #425 - adds natural sorting algorithm.
Why:
* We need it to sort selectors accordingly.
Jakub Pawlowicz [Wed, 11 Jan 2017 07:43:39 +0000 (08:43 +0100)]
Always run CI on Node.js 7 too.
At this moment it's a current version of Node.js so it'd be good
to run tests on it.
See: https://github.com/nodejs/LTS
Jakub Pawlowicz [Tue, 10 Jan 2017 13:39:51 +0000 (14:39 +0100)]
Fixes #853 - renames level 2 options.
Why:
* To match level 1 wording which feels more natural.
Jakub Pawlowicz [Tue, 10 Jan 2017 12:42:35 +0000 (13:42 +0100)]
Restores proper multiple level handling in CLI.
Why:
* Apparently the earlier change to a single dash option
broke using multiple optimization levels at once.
This commit restores it.
Jakub Pawlowicz [Tue, 10 Jan 2017 11:11:22 +0000 (12:11 +0100)]
Adds examples of `all` keyword in level 1/2 optimizations.
Why:
* So the option is documented properly.
Jakub Pawlowicz [Tue, 10 Jan 2017 11:05:27 +0000 (12:05 +0100)]
Allows `all` shortcut in level 1 optimizations config.
Why:
* To enable/disable all options at once;
* note non-boolean options are ignored when `all` / `*` is used.
Jakub Pawlowicz [Tue, 10 Jan 2017 10:09:48 +0000 (11:09 +0100)]
Inverts some level 1 options for consistency.
@alexlamsl made a good point that when we have `all` shortcut,
to set all options at once, it'd be good if value given would
mean the same to all options.
Jakub Pawlowicz [Mon, 9 Jan 2017 14:17:39 +0000 (15:17 +0100)]
Adds granular control over level 1 optimizations.
Why:
* So users can turn them on/off selectively;
* still keeping sane defaults for most users.
Note: moves `properties.fontWeight` compatibility flag to level 1
optimizations as that's not a compatibility flag, but rather a
user preference - see #756.
Jakub Pawlowicz [Mon, 9 Jan 2017 20:36:15 +0000 (21:36 +0100)]
Renames level 1 optimizations test file.
Jakub Pawlowicz [Mon, 9 Jan 2017 13:48:34 +0000 (14:48 +0100)]
Reorganizes level 1 optimizations.
Why:
* Slightly more coherent now, will get more love in 4.1.
Jakub Pawlowicz [Mon, 9 Jan 2017 12:52:43 +0000 (13:52 +0100)]
See #731 - adds granular control over level 2 optimizations.
Why:
* So users can selectively disable certain optimizations if they
want to.
Jakub Pawlowicz [Mon, 9 Jan 2017 10:52:12 +0000 (11:52 +0100)]
Runs benchmark on each optimization level.
Jakub Pawlowicz [Mon, 9 Jan 2017 09:44:51 +0000 (10:44 +0100)]
See #791 - normalizes stored paths.
Stores all paths internally as normalized to *nix format but
still outputs Windows friendly paths if needed.
`source-map` does it internally so there's no need to transform
paths in source maps.
Jakub Pawlowicz [Sun, 8 Jan 2017 17:04:18 +0000 (18:04 +0100)]
Reorganizes optimizer around levels.
Why:
* Gets rid of the flat structure where levels' code was mixed;
* moves level 2 compacting into a namespace (folderspace?).
Jakub Pawlowicz [Sun, 8 Jan 2017 11:09:50 +0000 (12:09 +0100)]
See #807 - disables restructuring optimizations.
Can be brought back with:
* `{ level: { 2: { restructuring: true } } }` in API;
* `-O2 restructuring:on` in CLI.
Why:
* Those can be slow on big files;
* Need further optimizations and code cleanup, see #533.
Alex Lam S.L [Sun, 8 Jan 2017 10:36:26 +0000 (11:36 +0100)]
See #842 - removes HTML comments from selectors.
Kudos to @alexlamsl for the fix.
Why:
* Apparently anything wrapped between HTML comments still gets
processed by browsers.
Jakub Pawlowicz [Sun, 8 Jan 2017 09:52:37 +0000 (10:52 +0100)]
See #850 - restores `-On` CLI option.
Thanks @alexlamsl for figuring it out!
Jakub Pawlowicz [Fri, 6 Jan 2017 13:26:12 +0000 (14:26 +0100)]
Fixes #717 - makes level 1 optimizations default.
Why:
* This way is safer for end user;
* Leaves level 2 optimizations up to end user to test and decide if
the end result is good enough.
Jakub Pawlowicz [Fri, 6 Jan 2017 12:56:24 +0000 (13:56 +0100)]
Fixes #836 - enables level `0` optimizations.
Why:
* Some people may need to bundle and rebase CSS without applying
any optimizations.
Jakub Pawlowicz [Fri, 6 Jan 2017 11:26:18 +0000 (12:26 +0100)]
See #850 - allows `on` or `off` as level option values.
Why:
* In CLI mode it makes more sense to use these instead of `true`
or `false` as in API (JavaScript) context.
Jakub Pawlowicz [Fri, 6 Jan 2017 11:18:47 +0000 (12:18 +0100)]
See #850 - cleans up optimization level code.
Why:
* For better readability.
Jakub Pawlowicz [Fri, 6 Jan 2017 10:56:57 +0000 (11:56 +0100)]
See #850 - allows overriding all options.
Why:
* Use `all` or `*` to reset all options to a given value.
Example:
```js
new CleanCSS({
level: {
2: {
all: false,
mediaMerging: true
}
}
});
```
Jakub Pawlowicz [Thu, 5 Jan 2017 22:14:26 +0000 (23:14 +0100)]
Fixes #850 - implements optimization levels.
Why:
* To logically split optimizations into three groups - level 0
(not implemented yet), level 1, and level 2 (default);
* To allow more fine-grained control over what's optimized on
each level (pending);
* To have a future-proof way of setting it for both API & CLI.
Jakub Pawlowicz [Thu, 5 Jan 2017 13:46:02 +0000 (14:46 +0100)]
Removes `benchmark` API option.
Why:
* total time is reported under `stats`;
* it was seriously impaired since optimizing got encapsulated
and not invoked directly from lib/clean.js.
Jakub Pawlowicz [Wed, 4 Jan 2017 21:22:05 +0000 (22:22 +0100)]
Fixed #828 - `-chrome-` hack support.
Why:
* It was incorrectly handled by property extractor.
Jakub Pawlowicz [Wed, 4 Jan 2017 20:24:26 +0000 (21:24 +0100)]
Fixes #460 - unescaped semicolon in selector.
Why:
* Such rules should be dropped. Warnings are already in place.
Jakub Pawlowicz [Wed, 4 Jan 2017 17:43:50 +0000 (18:43 +0100)]
Fixes #806 - skip optimizing variable properties.
Why:
* So far it's impossible to find out real property values so
breaking up shorthands into components doesn't work.
* In theory one could optimize cases where all component values
are given and one of them is a variable, but it's an additional
complexity probably not worth the hassle.
Jakub Pawlowicz [Wed, 4 Jan 2017 17:09:44 +0000 (18:09 +0100)]
See #796 - adds missing History.md entry.
Jakub Pawlowicz [Wed, 4 Jan 2017 17:06:29 +0000 (18:06 +0100)]
Reuses `rulesOverlap` helper.
Why:
* It's used in more than one place and the code was not reused.
Jakub Pawlowicz [Tue, 3 Jan 2017 16:37:56 +0000 (17:37 +0100)]
Fixes #796 - enables semantic merging for `@media` blocks.
* It's off by default and can be enabled via `semanticMerging` flag;
* Handles all cases and BEM classes.
Jakub Pawlowicz [Wed, 4 Jan 2017 15:23:05 +0000 (16:23 +0100)]
See #689 - fixes regression in parsing property blocks.
Why:
* New tokenizer introduced an issue where a semicolon ending a
property block was handled incorrectly.
Jakub Pawlowicz [Sun, 1 Jan 2017 11:45:33 +0000 (12:45 +0100)]
Fixes a bug ignoring incorrect properties in complex restructuring.
Why:
* Apparently there was a wrong value returned from sorting callback
which only manifested in complex stylesheets being restructured.
Jakub Pawlowicz [Sun, 1 Jan 2017 11:25:57 +0000 (12:25 +0100)]
See #290 - allows `font-weight` overriding.
Why:
* Another step to move away from aggressive merging.
Jakub Pawlowicz [Sun, 1 Jan 2017 11:19:47 +0000 (12:19 +0100)]
See #290 - allows `height` overriding.
Why:
* Another step to move away from aggressive merging.
Jakub Pawlowicz [Sat, 31 Dec 2016 18:02:31 +0000 (19:02 +0100)]
Fixes #750 - allows `width` overriding.
Why:
* Width can be overriden easily using `unit` overrider.
Jakub Pawlowicz [Sat, 31 Dec 2016 10:34:32 +0000 (11:34 +0100)]
See #829 - another performance optimization.
Why:
* Well, if a selector doesn't have a colon there is no point
looking for any pseudo classes/elements.
Jakub Pawlowicz [Fri, 30 Dec 2016 21:55:20 +0000 (22:55 +0100)]
See #829 - fixes a typo in method name.
Jakub Pawlowicz [Fri, 30 Dec 2016 21:50:09 +0000 (22:50 +0100)]
See #829 - some performance tweaks.
Why:
* Uses flat loops instead of callbacks;
* Checks for number of matches before invoking costly calculations.
Jakub Pawlowicz [Fri, 30 Dec 2016 21:23:29 +0000 (22:23 +0100)]
Fixes #829 - adds more strict selector merging rules.
Why:
* Instead of blacklisting unmergeable selectors we're now
whitelisting the valid ones and reject all other.
Jakub Pawlowicz [Fri, 30 Dec 2016 11:49:02 +0000 (12:49 +0100)]
Fixes #739 - error when a closing brace is missing.
Why:
* When such content gets parsed into a block we should ignore
the whole declaration as browsers do.
Jakub Pawlowicz [Fri, 30 Dec 2016 10:47:05 +0000 (11:47 +0100)]
See #703 - adds `ie11` alias to default compatibility.
Jakub Pawlowicz [Fri, 30 Dec 2016 06:40:08 +0000 (07:40 +0100)]
See #703 - re-enables `background` longhand merging.
Why:
* See #577 and #579 - these two clearly state the issue is about
IE8 not IE9+, and according to tests and caniuse.com tables
using `background-(clip|origin|size)` in `background` shorthand
is supported on IE9+;
* At this point I have no idea why it was disabled at the time.
One idea is that it was disabled because IE9 doesn't support
`properties.spaceAfterClosingBrace` and these two issues
overlappedi at the time of 3.2 branch. (both were "fixed" in 3.3);
* Let's enable it again, since the default mode is now IE10+.
** Important note **: Safari <7 and Android stock browser <4.4
does not support it either so you'll likely have to disable if
you still support those. Just use `--compatibility ie8` to do so.
Test case: https://jsfiddle.net/7zLwv7o0/5/
Jakub Pawlowicz [Thu, 29 Dec 2016 11:32:52 +0000 (12:32 +0100)]
See #703 - adds `ie10` alias to default compatibility.
Jakub Pawlowicz [Tue, 27 Dec 2016 20:15:10 +0000 (21:15 +0100)]
See #703 - changes default compatibility to IE10+.
Why:
* It's high time to move it up as IE9 is relatively old now.
* Adds `ie9` compatibility mode to make it easy to go back
to 3.x default.
Jakub Pawlowicz [Tue, 27 Dec 2016 15:51:40 +0000 (16:51 +0100)]
Simplifies compatibility mode definitions.
Why:
* Using inheritance it's clear which properties change.
Jakub Pawlowicz [Tue, 27 Dec 2016 14:12:28 +0000 (15:12 +0100)]
Fixes #785 - adds `@font-face` de-duplication.
Why:
* Extra `@font-face` rules can be safely removed.
* There's no API/CLI switch to turn it off as it's pending
a refactoring in v4 - see #842.
Jakub Pawlowicz [Tue, 27 Dec 2016 13:39:15 +0000 (14:39 +0100)]
See #801 - adds History.md entry.
Jakub Pawlowicz [Tue, 27 Dec 2016 13:31:10 +0000 (14:31 +0100)]
See #801 - recommends clean-css styles concatenation.
Why:
* There is a difference between passing in a concatenated string
and letting clean-css do the job. The former will discard
`@import` statements appearing not at the beginning of the string,
while the latter will discard only those appearing not at
the beginning of any of the files. Because of this behavior,
the latter way is recommended.
Jakub Pawlowicz [Tue, 27 Dec 2016 13:10:08 +0000 (14:10 +0100)]
See #801 - adds test cases to avoid regression.
Why:
* It works as expected since
426127a, but there were no
explicit tests for this feature.
Jakub Pawlowicz [Mon, 26 Dec 2016 15:30:35 +0000 (16:30 +0100)]
Fixes #849 - disables inlining protocol-less resources.
Why:
* It's not safe to assume a HTTP protocol;
* It's better to leave such resources to be resolved at runtime
when stylesheets are interpreted inside a HTTP(S) context.
Jakub Pawlowicz [Mon, 26 Dec 2016 15:03:11 +0000 (16:03 +0100)]
Splits `inliner` option in two.
* `{ inliner: { request: ... } }` becomes `{ inlineRequest: ... }`;
* `{ inliner: { timeout: N } }` becomes `{ inlineTimeout: N }`;
* `--timeout` becomes `--inline-timeout`.
Why:
* To relate it directly to the new `inline` option.
* Also `--timeout` option relates to `@import` inlining only
so it should not be "global".
Jakub Pawlowicz [Mon, 26 Dec 2016 14:26:09 +0000 (15:26 +0100)]
Fixes #767 - refactors inlining options.
Merges `processImport` and `processImportFrom` API options into
a single `inline` option. It accepts the same set of rules as
`processImportFrom` previously, e.g.
`{ inline: 'none' }`
`{ inline: ['local', '127.0.0.1] }`
Also the `inline` option defaults to `local` now, which means
remote `@import` rules are **NOT** inlined by default anymore.
To re-enable it use any of the following:
`{ inline: 'all' }`
`{ inline: 'local,remote' }`
Why:
* These two options were meant to be merged as they represent the
same concept;
* Inlining remote `@import` rules by default may not be desirable;
* "Inline" as the option name better represents what this option
does, as it also applies to source maps.
Jakub Pawlowicz [Mon, 26 Dec 2016 11:42:08 +0000 (12:42 +0100)]
Reworks inlining so resources are loaded lazily.
Why:
* when using a hash as an input, the sources it references
should be processed lazily instead of a whole hash being
serialized & tokenized eagerly.
This change addresses the need by:
* See #791 - in-memory imports require such lazy processing.
The other way, we end up with duplicated rules, and have to rely
on advanced processing to remove them.
Jakub Pawlowicz [Sun, 25 Dec 2016 14:38:04 +0000 (15:38 +0100)]
Fixes #791 - resolves imports in-memory if possible.
Why:
* When a hash is given as a source, some imports can be inlined
in-memory taking styles from the hash.
Jakub Pawlowicz [Fri, 23 Dec 2016 22:00:46 +0000 (23:00 +0100)]
See #710 - adds a test case to prevent regressions.
Jakub Pawlowicz [Fri, 23 Dec 2016 21:00:43 +0000 (22:00 +0100)]
See #808 - adds a test case to prevent regressions.
Jakub Pawlowicz [Fri, 23 Dec 2016 20:43:50 +0000 (21:43 +0100)]
Fixes #845 - fixes web compatibility in 4.0.
Why:
* 4.0 calculates stats by default but `process.hrtime` is not
available inside browsers. However, since we don't need
sub-ms resolution, `Date.now()` can be used instead.
Jakub Pawlowicz [Fri, 23 Dec 2016 19:54:45 +0000 (20:54 +0100)]
Fixes #685 - adds lowercase hex color normalization.
Why:
* This change does not affect color interpretation.
* Allow potential merging improvements as colors are normalized.
Jakub Pawlowicz [Fri, 23 Dec 2016 17:24:56 +0000 (18:24 +0100)]
See #560 - adds a test case to prevent future regressions.
Jakub Pawlowicz [Fri, 23 Dec 2016 17:05:17 +0000 (18:05 +0100)]
Fixes #847 - ignores selectors with invalid characters.
Why:
* Browsers won't apply such rules so neither should we.
Jakub Pawlowicz [Thu, 22 Dec 2016 21:18:33 +0000 (22:18 +0100)]
Fixes #758 - ignores rules with empty selectors.
Jakub Pawlowicz [Thu, 22 Dec 2016 20:51:11 +0000 (21:51 +0100)]
Fixes #817 - makes `off` disable rounding.
Why:
* `-1` is still an alias to `off`.
* It won't be used that often as rounding is now disabled
by default.
Jakub Pawlowicz [Thu, 22 Dec 2016 15:13:03 +0000 (16:13 +0100)]
See #209 - adds missing readme for `beautify` option.
Jakub Pawlowicz [Thu, 22 Dec 2016 14:41:58 +0000 (15:41 +0100)]
Fixes #209 - adds output formatting via `beautify` option.
Why:
* So clean-css can be used to format CSS nicely as well.