first commit
This commit is contained in:
354
build/node_modules/cssnano/CHANGELOG.md
generated
vendored
Normal file
354
build/node_modules/cssnano/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,354 @@
|
||||
# 3.10.0
|
||||
|
||||
* cssnano will no longer `console.warn` any messages when using deprecated
|
||||
options; these are now sent to PostCSS. You will be able to see them if you
|
||||
use a PostCSS runner with built-in messages support, or alternately by
|
||||
loading `postcss-reporter` or `postcss-browser-reporter` in your plugins list.
|
||||
* Prepares support for `grid` identifier reduction by adding it to the list
|
||||
of optimisations turned off when `options.safe` is set to `true`.
|
||||
* Adds support for normalizing `unicode-range` descriptors. Values will
|
||||
be converted when the code matches `0` & `f` in the same place on both sides
|
||||
of the range. So, `u+2000-2fff` can be converted to `u+2???`, but
|
||||
`u+2100-2fff` will be left as it is.
|
||||
|
||||
# 3.9.1
|
||||
|
||||
* Resolves an integration issue with `v3.9.0`, where `undefined` values
|
||||
would attempt to be parsed.
|
||||
|
||||
# 3.9.0
|
||||
|
||||
* Adds a new option to normalize wrapping quotes for strings & joining
|
||||
multiple-line strings into a single line. This optimisation can potentially
|
||||
reduce the final gzipped size of your CSS file.
|
||||
|
||||
# 3.8.2
|
||||
|
||||
* Resolves an issue where `display: list-item inline flow` would be normalized
|
||||
to `inline list-item` rather than `inline-list-item` (thanks to @mattbasta).
|
||||
|
||||
# 3.8.1
|
||||
|
||||
* Adds a quick start file for easy integration with Runkit. Try cssnano online
|
||||
at https://runkit.com/npm/cssnano.
|
||||
|
||||
# 3.8.0
|
||||
|
||||
* Adds support for normalizing multiple values for the `display` property. For
|
||||
example `block flow` can be simplified to `block`.
|
||||
|
||||
# 3.7.7
|
||||
|
||||
* Further improves CSS mixin handling; semicolons will no longer be stripped
|
||||
from *rules* as well as declarations.
|
||||
|
||||
# 3.7.6
|
||||
|
||||
* Resolves an issue where the semicolon was being incorrectly stripped
|
||||
from CSS mixins.
|
||||
|
||||
# 3.7.5
|
||||
|
||||
* Resolves an issue where the `safe` flag was not being persisted across
|
||||
multiple files (thanks to @techmatt101).
|
||||
|
||||
# 3.7.4
|
||||
|
||||
* Improves performance of the reducePositions transform by testing
|
||||
against `hasOwnProperty` instead of using an array of object keys.
|
||||
* Removes the redundant `indexes-of` dependency.
|
||||
|
||||
# 3.7.3
|
||||
|
||||
* Unpins postcss-filter-plugins from `2.0.0` as a fix has landed in the new
|
||||
version of uniqid.
|
||||
|
||||
# 3.7.2
|
||||
|
||||
* Temporarily pins postcss-filter-plugins to version `2.0.0` in order to
|
||||
mitigate an issue with uniqid `3.0.0`.
|
||||
|
||||
# 3.7.1
|
||||
|
||||
* Enabling safe mode now turns off both postcss-merge-idents &
|
||||
postcss-normalize-url's `stripWWW` option.
|
||||
|
||||
# 3.7.0
|
||||
|
||||
* Added: Reduce `background-repeat` definitions; works with both this property
|
||||
& the `background` shorthand, and aims to compress the extended two value
|
||||
syntax into the single value syntax.
|
||||
* Added: Reduce `initial` values for properties when the *actual* initial value
|
||||
is shorter; for example, `min-width: initial` becomes `min-width: 0`.
|
||||
|
||||
# 3.6.2
|
||||
|
||||
* Fixed an issue where cssnano would crash on `steps(1)`.
|
||||
|
||||
# 3.6.1
|
||||
|
||||
* Fixed an issue where cssnano would crash on `steps` functions with a
|
||||
single argument.
|
||||
|
||||
# 3.6.0
|
||||
|
||||
* Added `postcss-discard-overridden` to safely discard overridden rules with
|
||||
the same identifier (thanks to @Justineo).
|
||||
* Added: Reduce animation/transition timing functions. Detects `cubic-bezier`
|
||||
functions that are equivalent to the timing keywords and compresses, as well
|
||||
as normalizing the `steps` timing function.
|
||||
* Added the `perspective-origin` property to the list of supported properties
|
||||
transformed by the `reduce-positions` transform.
|
||||
|
||||
# 3.5.2
|
||||
|
||||
* Resolves an issue where the 3 or 4 value syntax for `background-position`
|
||||
were being incorrectly converted.
|
||||
|
||||
# 3.5.1
|
||||
|
||||
* Improves checking for `background-position` values in the `background`
|
||||
shorthand property.
|
||||
|
||||
# 3.5.0
|
||||
|
||||
* Adds a new optimisation path which can minimise keyword values for
|
||||
`background-position` and the `background` shorthand.
|
||||
* Tweaks to performance in the `core` module, now performs less AST passes.
|
||||
* Now compiled with Babel 6.
|
||||
|
||||
# 3.4.0
|
||||
|
||||
* Adds a new optimisation path which can minimise gradient parameters
|
||||
automatically.
|
||||
|
||||
# 3.3.2
|
||||
|
||||
* Fixes an issue where using `options.safe` threw an error when cssnano was
|
||||
not used as part of a PostCSS instance, but standalone (such as in modules
|
||||
like gulp-cssnano). cssnano now renames `safe` internally to `isSafe`.
|
||||
|
||||
# 3.3.1
|
||||
|
||||
* Unpins postcss-colormin from `2.1.2`, as the `2.1.3` & `2.1.4` patches had
|
||||
optimization regressions that are now resolved in `2.1.5`.
|
||||
|
||||
# 3.3.0
|
||||
|
||||
* Updated modules to use postcss-value-parser version 3 (thanks to @TrySound).
|
||||
* Now converts between transform functions with postcss-reduce-transforms.
|
||||
e.g. `translate3d(0, 0, 0)` becomes `translateZ(0)`.
|
||||
|
||||
# 3.2.0
|
||||
|
||||
* cssnano no longer converts `outline: none` to `outline: 0`, as there are
|
||||
some cases where the values are not equivalent (thanks to @TrySound).
|
||||
* cssnano no longer converts for example `16px` to `1pc` *by default*. Length
|
||||
optimisations can be turned on via `{convertValues: {length: true}}`.
|
||||
* Improved minimization of css functions (thanks to @TrySound).
|
||||
|
||||
# 3.1.0
|
||||
|
||||
* This release swaps postcss-single-charset for postcss-normalize-charset,
|
||||
which can detect encoding to determine whether a charset is necessary.
|
||||
Optionally, you can set the `add` option to `true` to prepend a UTF-8
|
||||
charset to the output automatically (thanks to @TrySound).
|
||||
* A `safe` option was added, which disables more aggressive optimisations, as
|
||||
a convenient preset configuration (thanks to @TrySound).
|
||||
* Added an option to convert from `deg` to `turn` & vice versa, & improved
|
||||
minification performance in functions (thanks to @TrySound).
|
||||
|
||||
# 3.0.3
|
||||
|
||||
* Fixes an issue where cssnano was removing spaces around forward slashes in
|
||||
string literals (thanks to @TrySound).
|
||||
|
||||
# 3.0.2
|
||||
|
||||
* Fixes an issue where cssnano was removing spaces around forward slashes in
|
||||
calc functions.
|
||||
|
||||
# 3.0.1
|
||||
|
||||
* Replaced css-list & balanced-match with postcss-value-parser, reducing the
|
||||
module's overall size (thanks to @TrySound).
|
||||
|
||||
# 3.0.0
|
||||
|
||||
* All cssnano plugins and cssnano itself have migrated to PostCSS 5.x. Please
|
||||
make sure that when using the 3.x releases that you use a 5.x compatible
|
||||
PostCSS runner.
|
||||
* cssnano will now compress inline SVG through SVGO. Because of this change,
|
||||
interfacing with cssnano must now be done through an asynchronous API. The
|
||||
main `process` method has the same signature as a PostCSS processor instance.
|
||||
* The old options such as `merge` & `fonts` that were deprecated in
|
||||
release `2.5.0` were removed. The new architecture allows you to specify any
|
||||
module name to disable it.
|
||||
* postcss-minify-selectors' at-rule compression was extracted out into
|
||||
postcss-minify-params (thanks to @TrySound).
|
||||
* Overall performance of the module has improved dramatically, thanks to work
|
||||
by @TrySound and input from the community.
|
||||
* Improved selector merging/deduplication in certain use cases.
|
||||
* cssnano no longer compresses hex colours in filter properties, to better
|
||||
support old versions of Internet Explorer (thanks to @faddee).
|
||||
* cssnano will not merge properties together that have an `inherit` keyword.
|
||||
* postcss-minify-font-weight & postcss-font-family were consolidated into
|
||||
postcss-minify-font-values. Using the old options will print deprecation
|
||||
warnings (thanks to @TrySound).
|
||||
* The cssnano CLI was extracted into a separate module, so that dependent
|
||||
modules such as gulp-cssnano don't download unnecessary extras.
|
||||
|
||||
# 2.6.1
|
||||
|
||||
* Improved performance of the core module `functionOptimiser`.
|
||||
|
||||
# 2.6.0
|
||||
|
||||
* Adds a new optimisation which re-orders properties that accept values in
|
||||
an arbitrary order. This can lead to improved merging behaviour in certain
|
||||
cases.
|
||||
|
||||
# 2.5.0
|
||||
|
||||
* Adds support for disabling modules of the user's choosing, with new option
|
||||
names. The old options (such as `merge` & `fonts`) will be removed in `3.0`.
|
||||
|
||||
# 2.4.0
|
||||
|
||||
* postcss-minify-selectors was extended to add support for conversion of
|
||||
`::before` to `:before`; this release removes the dedicated
|
||||
postcss-pseudoelements module.
|
||||
|
||||
# 2.3.0
|
||||
|
||||
* Consolidated postcss-minify-trbl & two integrated modules into
|
||||
postcss-merge-longhand.
|
||||
|
||||
# 2.2.0
|
||||
|
||||
* Replaced integrated plugin filter with postcss-filter-plugins.
|
||||
* Improved rule merging logic.
|
||||
* Improved performance across the board by reducing AST iterations where it
|
||||
was possible to do so.
|
||||
* cssnano will now perform better whitespace compression when used with other
|
||||
PostCSS plugins.
|
||||
|
||||
# 2.1.1
|
||||
|
||||
* Fixes an issue where options were not passed to normalize-url.
|
||||
|
||||
# 2.1.0
|
||||
|
||||
* Allow `postcss-font-family` to be disabled.
|
||||
|
||||
# 2.0.3
|
||||
|
||||
* cssnano can now be consumed with the parentheses-less method in PostCSS; e.g.
|
||||
`postcss([ cssnano ])`.
|
||||
* Fixes an issue where 'Din' was being picked up by the logic as a numeric
|
||||
value, causing the full font name to be incorrectly rearranged.
|
||||
|
||||
# 2.0.2
|
||||
|
||||
* Extract trbl value reducing into a separate module.
|
||||
* Refactor core longhand optimiser to not rely on trbl cache.
|
||||
* Adds support for `ch` units; previously they were removed.
|
||||
* Fixes parsing of some selector hacks.
|
||||
* Fixes an issue where embedded base 64 data was being converted as if it were
|
||||
a URL.
|
||||
|
||||
# 2.0.1
|
||||
|
||||
* Add `postcss-plugin` keyword to package.json.
|
||||
* Wraps all core processors with the PostCSS 4.1 plugin API.
|
||||
|
||||
# 2.0.0
|
||||
|
||||
* Adds removal of outdated vendor prefixes based on browser support.
|
||||
* Addresses an issue where relative path separators were converted to
|
||||
backslashes on Windows.
|
||||
* cssnano will now detect previous plugins and silently disable them when the
|
||||
functionality overlaps. This is to enable faster interoperation with cssnext.
|
||||
* cssnano now exports as a PostCSS plugin. The simple interface is exposed
|
||||
at `cssnano.process(css, opts)` instead of `cssnano(css, opts)`.
|
||||
* Improved URL detection when using two or more in the same declaration.
|
||||
* node 0.10 is no longer officially supported.
|
||||
|
||||
# 1.4.3
|
||||
|
||||
* Fixes incorrect minification of `background:none` to `background:0 0`.
|
||||
|
||||
# 1.4.2
|
||||
|
||||
* Fixes an issue with nested URLs inside `url()` functions.
|
||||
|
||||
# 1.4.1
|
||||
|
||||
* Addresses an issue where whitespace removal after a CSS function would cause
|
||||
rendering issues in Internet Explorer.
|
||||
|
||||
# 1.4.0
|
||||
|
||||
* Adds support for removal of unused `@keyframes` and `@counter-style` at-rules.
|
||||
* comments: adds support for user-directed removal of comments, with the
|
||||
`remove` option (thanks to @dmitrykiselyov).
|
||||
* comments: `removeAllButFirst` now operates on each CSS tree, rather than the
|
||||
first one passed to cssnano.
|
||||
|
||||
# 1.3.3
|
||||
|
||||
* Fixes incorrect minification of `border:none` to `border:0 0`.
|
||||
|
||||
# 1.3.2
|
||||
|
||||
* Improved selector minifying logic, leading to better compression of attribute
|
||||
selectors.
|
||||
* Improved comment discarding logic.
|
||||
|
||||
# 1.3.1
|
||||
|
||||
* Fixes crash on undefined `decl.before` from prior AST.
|
||||
|
||||
# 1.3.0
|
||||
|
||||
* Added support for bundling cssnano using webpack (thanks to @MoOx).
|
||||
|
||||
# 1.2.1
|
||||
|
||||
* Fixed a bug where a CSS function keyword inside its value would throw
|
||||
an error.
|
||||
|
||||
# 1.2.0
|
||||
|
||||
* Better support for merging properties without the existance of a shorthand
|
||||
override.
|
||||
* Can now 'merge forward' adjacent rules as well as the previous 'merge behind'
|
||||
behaviour, leading to better compression.
|
||||
* Selector re-ordering now happens last in the chain of plugins, to help clean
|
||||
up merged selectors.
|
||||
|
||||
# 1.1.0
|
||||
|
||||
* Now can merge identifiers such as `@keyframes` and `@counter-style` if they
|
||||
have duplicated properties but are named differently.
|
||||
* Fixes an issue where duplicated keyframes with the same name would cause
|
||||
an infinite loop.
|
||||
|
||||
# 1.0.2
|
||||
|
||||
* Improve module loading logic (thanks to @tunnckoCore).
|
||||
* Improve minification of numeric values, with better support for `rem`,
|
||||
trailing zeroes and slash/comma separated values
|
||||
(thanks to @TrySound & @tunnckoCore).
|
||||
* Fixed an issue where `-webkit-tap-highlight-color` values were being
|
||||
incorrectly transformed to `transparent`. This is not supported in Safari.
|
||||
* Added support for viewport units (thanks to @TrySound).
|
||||
* Add MIT license file.
|
||||
|
||||
# 1.0.1
|
||||
|
||||
* Add repository/author links to package.json.
|
||||
|
||||
# 1.0.0
|
||||
|
||||
* Initial release.
|
||||
22
build/node_modules/cssnano/LICENSE-MIT
generated
vendored
Normal file
22
build/node_modules/cssnano/LICENSE-MIT
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
56
build/node_modules/cssnano/README.md
generated
vendored
Normal file
56
build/node_modules/cssnano/README.md
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<img width="360" src="https://rawgit.com/ben-eb/cssnano/master/media/logo.svg" alt="cssnano">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
> A modular minifier, built on top of the [PostCSS] ecosystem.
|
||||
|
||||
[][ci] [](https://ci.appveyor.com/project/ben-eb/cssnano/branch/master) [](https://coveralls.io/github/ben-eb/cssnano?branch=master) [][npm] [][deps] [](https://gitter.im/ben-eb/cssnano?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
cssnano is a modular minifier that aims to utilise small modules from the
|
||||
PostCSS ecosystem, rather than being an all-encompassing module that may be
|
||||
difficult to contribute to. Because it is written on top of PostCSS, it is able
|
||||
to do more than simple whitespace transforms - including advanced optimisations
|
||||
such as custom identifier reduction, `z-index` rebasing, and adjacent selector
|
||||
merging.
|
||||
|
||||
Note that cssnano enables aggressive optimisations by default, which might not
|
||||
always be what you want. Set `options.safe` to `true` if you want to disable
|
||||
this. In future versions, only safe options will be enabled by default, starting
|
||||
from [version 4][v4].
|
||||
|
||||
For further details check out the [website](http://cssnano.co/):
|
||||
|
||||
* [Installation guide for your build process](http://cssnano.co/usage/).
|
||||
* [Full list of optimisations](http://cssnano.co/optimisations/).
|
||||
* [Customise the output (options documentation)](http://cssnano.co/options/).
|
||||
|
||||
You can now [try cssnano online](https://runkit.com/npm/cssnano) via Runkit!
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
|
||||
|
||||
## Links
|
||||
|
||||
Please help to support this project by [purchasing a cssnano sticker][sticker].
|
||||
|
||||
[sticker]: https://www.stickermule.com/uk/marketplace/11086-cssnano
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Ben Briggs](http://beneb.info)
|
||||
|
||||
|
||||
[PostCSS]: https://github.com/postcss/postcss
|
||||
|
||||
[ci]: https://travis-ci.org/ben-eb/cssnano
|
||||
[deps]: https://gemnasium.com/ben-eb/cssnano
|
||||
[npm]: http://badge.fury.io/js/cssnano
|
||||
[v4]: https://github.com/ben-eb/cssnano/issues/88
|
||||
310
build/node_modules/cssnano/dist/index.js
generated
vendored
Normal file
310
build/node_modules/cssnano/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,310 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _decamelize = require('decamelize');
|
||||
|
||||
var _decamelize2 = _interopRequireDefault(_decamelize);
|
||||
|
||||
var _defined = require('defined');
|
||||
|
||||
var _defined2 = _interopRequireDefault(_defined);
|
||||
|
||||
var _objectAssign = require('object-assign');
|
||||
|
||||
var _objectAssign2 = _interopRequireDefault(_objectAssign);
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcss2 = _interopRequireDefault(_postcss);
|
||||
|
||||
var _postcssFilterPlugins2 = require('postcss-filter-plugins');
|
||||
|
||||
var _postcssFilterPlugins3 = _interopRequireDefault(_postcssFilterPlugins2);
|
||||
|
||||
var _postcssDiscardComments = require('postcss-discard-comments');
|
||||
|
||||
var _postcssDiscardComments2 = _interopRequireDefault(_postcssDiscardComments);
|
||||
|
||||
var _postcssReduceInitial = require('postcss-reduce-initial');
|
||||
|
||||
var _postcssReduceInitial2 = _interopRequireDefault(_postcssReduceInitial);
|
||||
|
||||
var _postcssMinifyGradients = require('postcss-minify-gradients');
|
||||
|
||||
var _postcssMinifyGradients2 = _interopRequireDefault(_postcssMinifyGradients);
|
||||
|
||||
var _postcssSvgo = require('postcss-svgo');
|
||||
|
||||
var _postcssSvgo2 = _interopRequireDefault(_postcssSvgo);
|
||||
|
||||
var _postcssReduceTransforms = require('postcss-reduce-transforms');
|
||||
|
||||
var _postcssReduceTransforms2 = _interopRequireDefault(_postcssReduceTransforms);
|
||||
|
||||
var _autoprefixer = require('autoprefixer');
|
||||
|
||||
var _autoprefixer2 = _interopRequireDefault(_autoprefixer);
|
||||
|
||||
var _postcssZindex = require('postcss-zindex');
|
||||
|
||||
var _postcssZindex2 = _interopRequireDefault(_postcssZindex);
|
||||
|
||||
var _postcssConvertValues = require('postcss-convert-values');
|
||||
|
||||
var _postcssConvertValues2 = _interopRequireDefault(_postcssConvertValues);
|
||||
|
||||
var _postcssCalc = require('postcss-calc');
|
||||
|
||||
var _postcssCalc2 = _interopRequireDefault(_postcssCalc);
|
||||
|
||||
var _postcssColormin = require('postcss-colormin');
|
||||
|
||||
var _postcssColormin2 = _interopRequireDefault(_postcssColormin);
|
||||
|
||||
var _postcssOrderedValues = require('postcss-ordered-values');
|
||||
|
||||
var _postcssOrderedValues2 = _interopRequireDefault(_postcssOrderedValues);
|
||||
|
||||
var _postcssMinifySelectors = require('postcss-minify-selectors');
|
||||
|
||||
var _postcssMinifySelectors2 = _interopRequireDefault(_postcssMinifySelectors);
|
||||
|
||||
var _postcssMinifyParams = require('postcss-minify-params');
|
||||
|
||||
var _postcssMinifyParams2 = _interopRequireDefault(_postcssMinifyParams);
|
||||
|
||||
var _postcssNormalizeCharset = require('postcss-normalize-charset');
|
||||
|
||||
var _postcssNormalizeCharset2 = _interopRequireDefault(_postcssNormalizeCharset);
|
||||
|
||||
var _postcssMinifyFontValues = require('postcss-minify-font-values');
|
||||
|
||||
var _postcssMinifyFontValues2 = _interopRequireDefault(_postcssMinifyFontValues);
|
||||
|
||||
var _postcssDiscardUnused = require('postcss-discard-unused');
|
||||
|
||||
var _postcssDiscardUnused2 = _interopRequireDefault(_postcssDiscardUnused);
|
||||
|
||||
var _postcssNormalizeUrl = require('postcss-normalize-url');
|
||||
|
||||
var _postcssNormalizeUrl2 = _interopRequireDefault(_postcssNormalizeUrl);
|
||||
|
||||
var _postcssMergeIdents = require('postcss-merge-idents');
|
||||
|
||||
var _postcssMergeIdents2 = _interopRequireDefault(_postcssMergeIdents);
|
||||
|
||||
var _postcssReduceIdents = require('postcss-reduce-idents');
|
||||
|
||||
var _postcssReduceIdents2 = _interopRequireDefault(_postcssReduceIdents);
|
||||
|
||||
var _postcssMergeLonghand = require('postcss-merge-longhand');
|
||||
|
||||
var _postcssMergeLonghand2 = _interopRequireDefault(_postcssMergeLonghand);
|
||||
|
||||
var _postcssDiscardDuplicates = require('postcss-discard-duplicates');
|
||||
|
||||
var _postcssDiscardDuplicates2 = _interopRequireDefault(_postcssDiscardDuplicates);
|
||||
|
||||
var _postcssDiscardOverridden = require('postcss-discard-overridden');
|
||||
|
||||
var _postcssDiscardOverridden2 = _interopRequireDefault(_postcssDiscardOverridden);
|
||||
|
||||
var _postcssMergeRules = require('postcss-merge-rules');
|
||||
|
||||
var _postcssMergeRules2 = _interopRequireDefault(_postcssMergeRules);
|
||||
|
||||
var _postcssDiscardEmpty = require('postcss-discard-empty');
|
||||
|
||||
var _postcssDiscardEmpty2 = _interopRequireDefault(_postcssDiscardEmpty);
|
||||
|
||||
var _postcssUniqueSelectors = require('postcss-unique-selectors');
|
||||
|
||||
var _postcssUniqueSelectors2 = _interopRequireDefault(_postcssUniqueSelectors);
|
||||
|
||||
var _functionOptimiser = require('./lib/functionOptimiser');
|
||||
|
||||
var _functionOptimiser2 = _interopRequireDefault(_functionOptimiser);
|
||||
|
||||
var _filterOptimiser = require('./lib/filterOptimiser');
|
||||
|
||||
var _filterOptimiser2 = _interopRequireDefault(_filterOptimiser);
|
||||
|
||||
var _normalizeString = require('./lib/normalizeString');
|
||||
|
||||
var _normalizeString2 = _interopRequireDefault(_normalizeString);
|
||||
|
||||
var _normalizeUnicode = require('./lib/normalizeUnicode');
|
||||
|
||||
var _normalizeUnicode2 = _interopRequireDefault(_normalizeUnicode);
|
||||
|
||||
var _reduceDisplayValues = require('./lib/reduceDisplayValues');
|
||||
|
||||
var _reduceDisplayValues2 = _interopRequireDefault(_reduceDisplayValues);
|
||||
|
||||
var _reduceBackgroundRepeat = require('./lib/reduceBackgroundRepeat');
|
||||
|
||||
var _reduceBackgroundRepeat2 = _interopRequireDefault(_reduceBackgroundRepeat);
|
||||
|
||||
var _reducePositions = require('./lib/reducePositions');
|
||||
|
||||
var _reducePositions2 = _interopRequireDefault(_reducePositions);
|
||||
|
||||
var _core = require('./lib/core');
|
||||
|
||||
var _core2 = _interopRequireDefault(_core);
|
||||
|
||||
var _reduceTimingFunctions = require('./lib/reduceTimingFunctions');
|
||||
|
||||
var _reduceTimingFunctions2 = _interopRequireDefault(_reduceTimingFunctions);
|
||||
|
||||
var _styleCache = require('./lib/styleCache');
|
||||
|
||||
var _styleCache2 = _interopRequireDefault(_styleCache);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
// Processors
|
||||
var processors = {
|
||||
postcssFilterPlugins: function postcssFilterPlugins() {
|
||||
return (0, _postcssFilterPlugins3.default)({ silent: true });
|
||||
},
|
||||
postcssDiscardComments: _postcssDiscardComments2.default,
|
||||
postcssMinifyGradients: _postcssMinifyGradients2.default,
|
||||
postcssReduceInitial: _postcssReduceInitial2.default,
|
||||
postcssSvgo: _postcssSvgo2.default,
|
||||
reduceDisplayValues: _reduceDisplayValues2.default,
|
||||
postcssReduceTransforms: _postcssReduceTransforms2.default,
|
||||
autoprefixer: _autoprefixer2.default,
|
||||
postcssZindex: _postcssZindex2.default,
|
||||
postcssConvertValues: _postcssConvertValues2.default,
|
||||
reduceTimingFunctions: _reduceTimingFunctions2.default,
|
||||
postcssCalc: _postcssCalc2.default,
|
||||
postcssColormin: _postcssColormin2.default,
|
||||
postcssOrderedValues: _postcssOrderedValues2.default,
|
||||
postcssMinifySelectors: _postcssMinifySelectors2.default,
|
||||
postcssMinifyParams: _postcssMinifyParams2.default,
|
||||
postcssNormalizeCharset: _postcssNormalizeCharset2.default,
|
||||
postcssDiscardOverridden: _postcssDiscardOverridden2.default,
|
||||
normalizeString: _normalizeString2.default,
|
||||
normalizeUnicode: _normalizeUnicode2.default,
|
||||
// minify-font-values should be run before discard-unused
|
||||
postcssMinifyFontValues: _postcssMinifyFontValues2.default,
|
||||
postcssDiscardUnused: _postcssDiscardUnused2.default,
|
||||
postcssNormalizeUrl: _postcssNormalizeUrl2.default,
|
||||
functionOptimiser: _functionOptimiser2.default,
|
||||
filterOptimiser: _filterOptimiser2.default,
|
||||
reduceBackgroundRepeat: _reduceBackgroundRepeat2.default,
|
||||
reducePositions: _reducePositions2.default,
|
||||
core: _core2.default,
|
||||
// Optimisations after this are sensitive to previous optimisations in
|
||||
// the pipe, such as whitespace normalising/selector re-ordering
|
||||
postcssMergeIdents: _postcssMergeIdents2.default,
|
||||
postcssReduceIdents: _postcssReduceIdents2.default,
|
||||
postcssMergeLonghand: _postcssMergeLonghand2.default,
|
||||
postcssDiscardDuplicates: _postcssDiscardDuplicates2.default,
|
||||
postcssMergeRules: _postcssMergeRules2.default,
|
||||
postcssDiscardEmpty: _postcssDiscardEmpty2.default,
|
||||
postcssUniqueSelectors: _postcssUniqueSelectors2.default,
|
||||
styleCache: _styleCache2.default
|
||||
};
|
||||
|
||||
var defaultOptions = {
|
||||
autoprefixer: {
|
||||
add: false
|
||||
},
|
||||
postcssConvertValues: {
|
||||
length: false
|
||||
},
|
||||
postcssNormalizeCharset: {
|
||||
add: false
|
||||
}
|
||||
};
|
||||
|
||||
var safeOptions = {
|
||||
postcssConvertValues: {
|
||||
length: false
|
||||
},
|
||||
postcssDiscardUnused: {
|
||||
disable: true
|
||||
},
|
||||
postcssMergeIdents: {
|
||||
disable: true
|
||||
},
|
||||
postcssReduceIdents: {
|
||||
counterStyle: false,
|
||||
gridTemplate: false,
|
||||
keyframes: false
|
||||
},
|
||||
postcssNormalizeUrl: {
|
||||
stripWWW: false
|
||||
},
|
||||
postcssZindex: {
|
||||
disable: true
|
||||
}
|
||||
};
|
||||
|
||||
var cssnano = _postcss2.default.plugin('cssnano', function () {
|
||||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
|
||||
// Prevent PostCSS from throwing when safe is defined
|
||||
if (options.safe === true) {
|
||||
options.isSafe = true;
|
||||
options.safe = null;
|
||||
}
|
||||
|
||||
var safe = options.isSafe;
|
||||
var proc = (0, _postcss2.default)();
|
||||
var warnings = [];
|
||||
|
||||
if (typeof options.fontFamily !== 'undefined' || typeof options.minifyFontWeight !== 'undefined') {
|
||||
warnings.push('The fontFamily & minifyFontWeight options have been ' + 'consolidated into minifyFontValues, and are now deprecated.');
|
||||
if (!options.minifyFontValues) {
|
||||
options.minifyFontValues = options.fontFamily;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof options.singleCharset !== 'undefined') {
|
||||
warnings.push('The singleCharset option has been renamed to ' + 'normalizeCharset, and is now deprecated.');
|
||||
options.normalizeCharset = options.singleCharset;
|
||||
}
|
||||
|
||||
if (warnings.length) {
|
||||
proc.use(_postcss2.default.plugin('cssnano', function () {
|
||||
return function (css, result) {
|
||||
return warnings.forEach(function (w) {
|
||||
return result.warn(w);
|
||||
});
|
||||
};
|
||||
}));
|
||||
}
|
||||
|
||||
Object.keys(processors).forEach(function (plugin) {
|
||||
var shortName = plugin.replace('postcss', '');
|
||||
shortName = shortName.slice(0, 1).toLowerCase() + shortName.slice(1);
|
||||
|
||||
var opts = (0, _defined2.default)(options[shortName], options[plugin], options[(0, _decamelize2.default)(plugin, '-')]);
|
||||
|
||||
if (opts === false) {
|
||||
opts = { disable: true };
|
||||
}
|
||||
|
||||
opts = (0, _objectAssign2.default)({}, defaultOptions[plugin], safe ? safeOptions[plugin] : null, opts);
|
||||
|
||||
if (!opts.disable) {
|
||||
proc.use(processors[plugin](opts));
|
||||
}
|
||||
});
|
||||
|
||||
return proc;
|
||||
});
|
||||
|
||||
cssnano.process = function (css) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
options.map = options.map || (options.sourcemap ? true : null);
|
||||
return (0, _postcss2.default)([cssnano(options)]).process(css, options);
|
||||
};
|
||||
|
||||
exports.default = cssnano;
|
||||
module.exports = exports['default'];
|
||||
46
build/node_modules/cssnano/dist/lib/core.js
generated
vendored
Normal file
46
build/node_modules/cssnano/dist/lib/core.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var atrule = 'atrule';
|
||||
var decl = 'decl';
|
||||
var rule = 'rule';
|
||||
|
||||
function minimiseWhitespace(node) {
|
||||
var type = node.type;
|
||||
|
||||
if (~[decl, rule, atrule].indexOf(type) && node.raws.before) {
|
||||
node.raws.before = node.raws.before.replace(/\s/g, '');
|
||||
}
|
||||
if (type === decl) {
|
||||
// Ensure that !important values do not have any excess whitespace
|
||||
if (node.important) {
|
||||
node.raws.important = '!important';
|
||||
}
|
||||
// Remove whitespaces around ie 9 hack
|
||||
node.value = node.value.replace(/\s*(\\9)\s*/, '$1');
|
||||
// Remove extra semicolons and whitespace before the declaration
|
||||
if (node.raws.before) {
|
||||
var prev = node.prev();
|
||||
if (prev && prev.type !== rule) {
|
||||
node.raws.before = node.raws.before.replace(/;/g, '');
|
||||
}
|
||||
}
|
||||
node.raws.between = ':';
|
||||
node.raws.semicolon = false;
|
||||
} else if (type === rule || type === atrule) {
|
||||
node.raws.between = node.raws.after = '';
|
||||
node.raws.semicolon = false;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = (0, _postcss.plugin)('cssnano-core', function () {
|
||||
return function (css) {
|
||||
css.walk(minimiseWhitespace);
|
||||
// Remove final newline
|
||||
css.raws.after = '';
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
||||
8
build/node_modules/cssnano/dist/lib/evenValues.js
generated
vendored
Normal file
8
build/node_modules/cssnano/dist/lib/evenValues.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = getEvenValues;
|
||||
function getEvenValues(list, index) {
|
||||
return index % 2 === 0;
|
||||
}
|
||||
module.exports = exports["default"];
|
||||
26
build/node_modules/cssnano/dist/lib/filterOptimiser.js
generated
vendored
Normal file
26
build/node_modules/cssnano/dist/lib/filterOptimiser.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcssValueParser = require('postcss-value-parser');
|
||||
|
||||
var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function filterOptimiser(decl) {
|
||||
decl.value = (0, _postcssValueParser2.default)(decl.value).walk(function (node) {
|
||||
if (node.type === 'function' || node.type === 'div' && node.value === ',') {
|
||||
node.before = node.after = '';
|
||||
}
|
||||
}).toString();
|
||||
}
|
||||
|
||||
exports.default = (0, _postcss.plugin)('cssnano-filter-optimiser', function () {
|
||||
return function (css) {
|
||||
return css.walkDecls(/filter/, filterOptimiser);
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
||||
46
build/node_modules/cssnano/dist/lib/functionOptimiser.js
generated
vendored
Normal file
46
build/node_modules/cssnano/dist/lib/functionOptimiser.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcssValueParser = require('postcss-value-parser');
|
||||
|
||||
var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function reduceCalcWhitespaces(node) {
|
||||
if (node.type === 'space') {
|
||||
node.value = ' ';
|
||||
} else if (node.type === 'function') {
|
||||
node.before = node.after = '';
|
||||
}
|
||||
}
|
||||
|
||||
function reduceWhitespaces(node) {
|
||||
if (node.type === 'space') {
|
||||
node.value = ' ';
|
||||
} else if (node.type === 'div') {
|
||||
node.before = node.after = '';
|
||||
} else if (node.type === 'function') {
|
||||
node.before = node.after = '';
|
||||
if (node.value === 'calc') {
|
||||
_postcssValueParser2.default.walk(node.nodes, reduceCalcWhitespaces);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function transformDecls(decl) {
|
||||
if (!/filter/.test(decl.prop)) {
|
||||
decl.value = (0, _postcssValueParser2.default)(decl.value).walk(reduceWhitespaces).toString();
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = (0, _postcss.plugin)('cssnano-function-optimiser', function () {
|
||||
return function (css) {
|
||||
return css.walkDecls(transformDecls);
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
||||
15
build/node_modules/cssnano/dist/lib/getArguments.js
generated
vendored
Normal file
15
build/node_modules/cssnano/dist/lib/getArguments.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = getArguments;
|
||||
function getArguments(node) {
|
||||
return node.nodes.reduce(function (list, child) {
|
||||
if (child.type !== 'div') {
|
||||
list[list.length - 1].push(child);
|
||||
} else {
|
||||
list.push([]);
|
||||
}
|
||||
return list;
|
||||
}, [[]]);
|
||||
}
|
||||
module.exports = exports['default'];
|
||||
14
build/node_modules/cssnano/dist/lib/getMatch.js
generated
vendored
Normal file
14
build/node_modules/cssnano/dist/lib/getMatch.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = getMatchFactory;
|
||||
function getMatchFactory(mappings) {
|
||||
return function getMatch(args) {
|
||||
return args.reduce(function (list, arg, i) {
|
||||
return list.filter(function (keyword) {
|
||||
return keyword[1][i] === arg;
|
||||
});
|
||||
}, mappings);
|
||||
};
|
||||
}
|
||||
module.exports = exports["default"];
|
||||
228
build/node_modules/cssnano/dist/lib/normalizeString.js
generated
vendored
Normal file
228
build/node_modules/cssnano/dist/lib/normalizeString.js
generated
vendored
Normal file
@@ -0,0 +1,228 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||||
|
||||
var postcss = require('postcss');
|
||||
var valueParser = require('postcss-value-parser');
|
||||
|
||||
/*
|
||||
* Constants (parser usage)
|
||||
*/
|
||||
|
||||
var SINGLE_QUOTE = 39;
|
||||
var DOUBLE_QUOTE = 34;
|
||||
var BACKSLASH = 92;
|
||||
var NEWLINE = 10;
|
||||
var SPACE = 32;
|
||||
var FEED = 12;
|
||||
var TAB = 9;
|
||||
var CR = 13;
|
||||
|
||||
var WORD_END = /[ \n\t\r\f'"\\]/g;
|
||||
|
||||
/*
|
||||
* Constants (node type strings)
|
||||
*/
|
||||
|
||||
var C_STRING = 'string';
|
||||
var C_ESCAPED_SINGLE_QUOTE = 'escapedSingleQuote';
|
||||
var C_ESCAPED_DOUBLE_QUOTE = 'escapedDoubleQuote';
|
||||
var C_SINGLE_QUOTE = 'singleQuote';
|
||||
var C_DOUBLE_QUOTE = 'doubleQuote';
|
||||
var C_NEWLINE = 'newline';
|
||||
var C_SINGLE = 'single';
|
||||
|
||||
/*
|
||||
* Literals
|
||||
*/
|
||||
|
||||
var L_SINGLE_QUOTE = '\'';
|
||||
var L_DOUBLE_QUOTE = '"';
|
||||
var L_NEWLINE = '\\\n';
|
||||
|
||||
/*
|
||||
* Parser nodes
|
||||
*/
|
||||
|
||||
var T_ESCAPED_SINGLE_QUOTE = { type: C_ESCAPED_SINGLE_QUOTE, value: '\\\'' };
|
||||
var T_ESCAPED_DOUBLE_QUOTE = { type: C_ESCAPED_DOUBLE_QUOTE, value: '\\"' };
|
||||
var T_SINGLE_QUOTE = { type: C_SINGLE_QUOTE, value: L_SINGLE_QUOTE };
|
||||
var T_DOUBLE_QUOTE = { type: C_DOUBLE_QUOTE, value: L_DOUBLE_QUOTE };
|
||||
var T_NEWLINE = { type: C_NEWLINE, value: L_NEWLINE };
|
||||
|
||||
function stringify(ast) {
|
||||
return ast.nodes.reduce(function (str, _ref) {
|
||||
var value = _ref.value;
|
||||
|
||||
// Collapse multiple line strings automatically
|
||||
if (value === L_NEWLINE) {
|
||||
return str;
|
||||
}
|
||||
return str + value;
|
||||
}, '');
|
||||
}
|
||||
|
||||
function parse(str) {
|
||||
var code = void 0,
|
||||
next = void 0,
|
||||
value = void 0;
|
||||
var pos = 0;
|
||||
var len = str.length;
|
||||
|
||||
var ast = {
|
||||
nodes: [],
|
||||
types: {
|
||||
escapedSingleQuote: 0,
|
||||
escapedDoubleQuote: 0,
|
||||
singleQuote: 0,
|
||||
doubleQuote: 0
|
||||
},
|
||||
quotes: false
|
||||
};
|
||||
|
||||
while (pos < len) {
|
||||
code = str.charCodeAt(pos);
|
||||
switch (code) {
|
||||
case SPACE:
|
||||
case TAB:
|
||||
case CR:
|
||||
case FEED:
|
||||
next = pos;
|
||||
do {
|
||||
next += 1;
|
||||
code = str.charCodeAt(next);
|
||||
} while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED);
|
||||
|
||||
ast.nodes.push({
|
||||
type: 'space',
|
||||
value: str.slice(pos, next)
|
||||
});
|
||||
pos = next - 1;
|
||||
break;
|
||||
case SINGLE_QUOTE:
|
||||
ast.nodes.push(T_SINGLE_QUOTE);
|
||||
ast.types[C_SINGLE_QUOTE]++;
|
||||
ast.quotes = true;
|
||||
break;
|
||||
case DOUBLE_QUOTE:
|
||||
ast.nodes.push(T_DOUBLE_QUOTE);
|
||||
ast.types[C_DOUBLE_QUOTE]++;
|
||||
ast.quotes = true;
|
||||
break;
|
||||
case BACKSLASH:
|
||||
next = pos + 1;
|
||||
if (str.charCodeAt(next) === SINGLE_QUOTE) {
|
||||
ast.nodes.push(T_ESCAPED_SINGLE_QUOTE);
|
||||
ast.types[C_ESCAPED_SINGLE_QUOTE]++;
|
||||
ast.quotes = true;
|
||||
pos = next;
|
||||
break;
|
||||
} else if (str.charCodeAt(next) === DOUBLE_QUOTE) {
|
||||
ast.nodes.push(T_ESCAPED_DOUBLE_QUOTE);
|
||||
ast.types[C_ESCAPED_DOUBLE_QUOTE]++;
|
||||
ast.quotes = true;
|
||||
pos = next;
|
||||
break;
|
||||
} else if (str.charCodeAt(next) === NEWLINE) {
|
||||
ast.nodes.push(T_NEWLINE);
|
||||
pos = next;
|
||||
break;
|
||||
}
|
||||
/*
|
||||
* We need to fall through here to handle the token as
|
||||
* a whole word. The missing 'break' is intentional.
|
||||
*/
|
||||
default:
|
||||
WORD_END.lastIndex = pos + 1;
|
||||
WORD_END.test(str);
|
||||
|
||||
if (WORD_END.lastIndex === 0) {
|
||||
next = len - 1;
|
||||
} else {
|
||||
next = WORD_END.lastIndex - 2;
|
||||
}
|
||||
|
||||
value = str.slice(pos, next + 1);
|
||||
|
||||
ast.nodes.push({
|
||||
type: C_STRING,
|
||||
value: value
|
||||
});
|
||||
|
||||
pos = next;
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
|
||||
return ast;
|
||||
}
|
||||
|
||||
function changeWrappingQuotes(node, ast) {
|
||||
var types = ast.types;
|
||||
|
||||
if (types[C_SINGLE_QUOTE] || types[C_DOUBLE_QUOTE]) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (node.quote === L_SINGLE_QUOTE && types[C_ESCAPED_SINGLE_QUOTE] > 0 && !types[C_ESCAPED_DOUBLE_QUOTE]) {
|
||||
node.quote = L_DOUBLE_QUOTE;
|
||||
}
|
||||
|
||||
if (node.quote === L_DOUBLE_QUOTE && types[C_ESCAPED_DOUBLE_QUOTE] > 0 && !types[C_ESCAPED_SINGLE_QUOTE]) {
|
||||
node.quote = L_SINGLE_QUOTE;
|
||||
}
|
||||
|
||||
ast.nodes = ast.nodes.reduce(function (newAst, child) {
|
||||
if (child.type === C_ESCAPED_DOUBLE_QUOTE && node.quote === L_SINGLE_QUOTE) {
|
||||
return [].concat(newAst, [T_DOUBLE_QUOTE]);
|
||||
}
|
||||
if (child.type === C_ESCAPED_SINGLE_QUOTE && node.quote === L_DOUBLE_QUOTE) {
|
||||
return [].concat(newAst, [T_SINGLE_QUOTE]);
|
||||
}
|
||||
return [].concat(newAst, [child]);
|
||||
}, []);
|
||||
}
|
||||
|
||||
function normalize(value, preferredQuote) {
|
||||
if (!value || !value.length) {
|
||||
return value;
|
||||
}
|
||||
return valueParser(value).walk(function (child) {
|
||||
if (child.type !== C_STRING) {
|
||||
return;
|
||||
}
|
||||
var ast = parse(child.value);
|
||||
if (ast.quotes) {
|
||||
changeWrappingQuotes(child, ast);
|
||||
} else if (preferredQuote === C_SINGLE) {
|
||||
child.quote = L_SINGLE_QUOTE;
|
||||
} else {
|
||||
child.quote = L_DOUBLE_QUOTE;
|
||||
}
|
||||
child.value = stringify(ast);
|
||||
}).toString();
|
||||
}
|
||||
|
||||
exports.default = postcss.plugin('cssnano-normalize-string', function (opts) {
|
||||
var _preferredQuote$opts = _extends({
|
||||
preferredQuote: 'double'
|
||||
}, opts),
|
||||
preferredQuote = _preferredQuote$opts.preferredQuote;
|
||||
|
||||
return function (css) {
|
||||
css.walk(function (node) {
|
||||
if (node.type === 'rule') {
|
||||
node.selector = normalize(node.selector, preferredQuote);
|
||||
}
|
||||
if (node.type === 'decl') {
|
||||
node.value = normalize(node.value, preferredQuote);
|
||||
}
|
||||
if (node.type === 'atrule') {
|
||||
node.params = normalize(node.params, preferredQuote);
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
||||
67
build/node_modules/cssnano/dist/lib/normalizeUnicode.js
generated
vendored
Normal file
67
build/node_modules/cssnano/dist/lib/normalizeUnicode.js
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcss2 = _interopRequireDefault(_postcss);
|
||||
|
||||
var _postcssValueParser = require('postcss-value-parser');
|
||||
|
||||
var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function unicode(range) {
|
||||
var values = range.slice(2).split('-');
|
||||
if (values.length < 2) {
|
||||
return range;
|
||||
}
|
||||
var left = values[0].split('');
|
||||
var right = values[1].split('');
|
||||
|
||||
if (left.length !== right.length) {
|
||||
return range;
|
||||
}
|
||||
|
||||
var questionCounter = 0;
|
||||
|
||||
var merged = left.reduce(function (group, value, index) {
|
||||
if (group === false) {
|
||||
return false;
|
||||
}
|
||||
if (value === right[index] && !questionCounter) {
|
||||
return group + value;
|
||||
}
|
||||
if (value === '0' && right[index] === 'f') {
|
||||
questionCounter++;
|
||||
return group + '?';
|
||||
}
|
||||
return false;
|
||||
}, 'u+');
|
||||
|
||||
/*
|
||||
* The maximum number of wildcard characters (?) for ranges is 5.
|
||||
*/
|
||||
|
||||
if (merged && questionCounter < 6) {
|
||||
return merged;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
exports.default = _postcss2.default.plugin('cssnano-normalize-unicode', function () {
|
||||
return function (css) {
|
||||
css.walkDecls(/^unicode-range$/i, function (node) {
|
||||
node.prop = 'unicode-range';
|
||||
node.value = (0, _postcssValueParser2.default)(node.value).walk(function (child) {
|
||||
if (child.type === 'word') {
|
||||
child.value = unicode(child.value.toLowerCase());
|
||||
}
|
||||
return false;
|
||||
}).toString();
|
||||
});
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
||||
93
build/node_modules/cssnano/dist/lib/reduceBackgroundRepeat.js
generated
vendored
Normal file
93
build/node_modules/cssnano/dist/lib/reduceBackgroundRepeat.js
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcss2 = _interopRequireDefault(_postcss);
|
||||
|
||||
var _postcssValueParser = require('postcss-value-parser');
|
||||
|
||||
var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
|
||||
|
||||
var _evenValues = require('./evenValues');
|
||||
|
||||
var _evenValues2 = _interopRequireDefault(_evenValues);
|
||||
|
||||
var _getArguments = require('./getArguments');
|
||||
|
||||
var _getArguments2 = _interopRequireDefault(_getArguments);
|
||||
|
||||
var _getMatch = require('./getMatch');
|
||||
|
||||
var _getMatch2 = _interopRequireDefault(_getMatch);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var mappings = [['repeat-x', ['repeat', 'no-repeat']], ['repeat-y', ['no-repeat', 'repeat']], ['repeat', ['repeat', 'repeat']], ['space', ['space', 'space']], ['round', ['round', 'round']], ['no-repeat', ['no-repeat', 'no-repeat']]];
|
||||
|
||||
var repeat = [mappings[0][0], mappings[1][0], mappings[2][0], mappings[3][0], mappings[4][0], mappings[5][0]];
|
||||
|
||||
var getMatch = (0, _getMatch2.default)(mappings);
|
||||
|
||||
function transform(decl) {
|
||||
var values = (0, _postcssValueParser2.default)(decl.value);
|
||||
if (values.nodes.length === 1) {
|
||||
return;
|
||||
}
|
||||
var args = (0, _getArguments2.default)(values);
|
||||
var relevant = [];
|
||||
args.forEach(function (arg) {
|
||||
relevant.push({
|
||||
start: null,
|
||||
end: null
|
||||
});
|
||||
arg.forEach(function (part, index) {
|
||||
var isRepeat = ~repeat.indexOf(part.value);
|
||||
var len = relevant.length - 1;
|
||||
if (relevant[len].start === null && isRepeat) {
|
||||
relevant[len].start = index;
|
||||
relevant[len].end = index;
|
||||
return;
|
||||
}
|
||||
if (relevant[len].start !== null) {
|
||||
if (part.type === 'space') {
|
||||
return;
|
||||
} else if (isRepeat) {
|
||||
relevant[len].end = index;
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
});
|
||||
});
|
||||
relevant.forEach(function (range, index) {
|
||||
if (range.start === null) {
|
||||
return;
|
||||
}
|
||||
var val = args[index].slice(range.start, range.end + 1);
|
||||
if (val.length !== 3) {
|
||||
return;
|
||||
}
|
||||
var match = getMatch(val.filter(_evenValues2.default).map(function (n) {
|
||||
return n.value;
|
||||
}));
|
||||
if (match.length) {
|
||||
args[index][range.start].value = match[0][0];
|
||||
args[index][range.start + 1].value = '';
|
||||
args[index][range.end].value = '';
|
||||
}
|
||||
});
|
||||
decl.value = values.toString();
|
||||
}
|
||||
|
||||
var plugin = _postcss2.default.plugin('cssnano-reduce-background-repeat', function () {
|
||||
return function (css) {
|
||||
return css.walkDecls(/background(-repeat|$)/, transform);
|
||||
};
|
||||
});
|
||||
|
||||
plugin.mappings = mappings;
|
||||
|
||||
exports.default = plugin;
|
||||
module.exports = exports['default'];
|
||||
55
build/node_modules/cssnano/dist/lib/reduceDisplayValues.js
generated
vendored
Normal file
55
build/node_modules/cssnano/dist/lib/reduceDisplayValues.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcss2 = _interopRequireDefault(_postcss);
|
||||
|
||||
var _postcssValueParser = require('postcss-value-parser');
|
||||
|
||||
var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
|
||||
|
||||
var _evenValues = require('./evenValues');
|
||||
|
||||
var _evenValues2 = _interopRequireDefault(_evenValues);
|
||||
|
||||
var _getMatch = require('./getMatch');
|
||||
|
||||
var _getMatch2 = _interopRequireDefault(_getMatch);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/**
|
||||
* Specification: https://drafts.csswg.org/css-display/#the-display-properties
|
||||
*/
|
||||
|
||||
var mappings = [['block', ['block', 'flow']], ['flow-root', ['block', 'flow-root']], ['inline', ['inline', 'flow']], ['inline-block', ['inline', 'flow-root']], ['run-in', ['run-in', 'flow']], ['list-item', ['list-item', 'block', 'flow']], ['inline-list-item', ['list-item', 'inline', 'flow']], ['flex', ['block', 'flex']], ['inline-flex', ['inline', 'flex']], ['grid', ['block', 'grid']], ['inline-grid', ['inline', 'grid']], ['ruby', ['inline', 'ruby']], ['table', ['block', 'table']], ['inline-table', ['inline', 'table']], ['table-cell', ['table-cell', 'flow']], ['table-caption', ['table-caption', 'flow']], ['ruby-base', ['ruby-base', 'flow']], ['ruby-text', ['ruby-text', 'flow']]];
|
||||
|
||||
var getMatch = (0, _getMatch2.default)(mappings);
|
||||
|
||||
function transform(node) {
|
||||
var _valueParser = (0, _postcssValueParser2.default)(node.value),
|
||||
nodes = _valueParser.nodes;
|
||||
|
||||
if (nodes.length === 1) {
|
||||
return;
|
||||
}
|
||||
var match = getMatch(nodes.filter(_evenValues2.default).map(function (n) {
|
||||
return n.value;
|
||||
}));
|
||||
if (match.length) {
|
||||
node.value = match[0][0];
|
||||
}
|
||||
}
|
||||
|
||||
var plugin = _postcss2.default.plugin('cssnano-reduce-display-values', function () {
|
||||
return function (css) {
|
||||
return css.walkDecls('display', transform);
|
||||
};
|
||||
});
|
||||
|
||||
plugin.mappings = mappings;
|
||||
|
||||
exports.default = plugin;
|
||||
module.exports = exports['default'];
|
||||
119
build/node_modules/cssnano/dist/lib/reducePositions.js
generated
vendored
Normal file
119
build/node_modules/cssnano/dist/lib/reducePositions.js
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcssValueParser = require('postcss-value-parser');
|
||||
|
||||
var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
|
||||
|
||||
var _has = require('has');
|
||||
|
||||
var _has2 = _interopRequireDefault(_has);
|
||||
|
||||
var _getArguments = require('./getArguments');
|
||||
|
||||
var _getArguments2 = _interopRequireDefault(_getArguments);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var directions = ['top', 'right', 'bottom', 'left', 'center'];
|
||||
var properties = ['background', 'background-position', '-webkit-perspective-origin', 'perspective-origin'];
|
||||
|
||||
var center = '50%';
|
||||
|
||||
var horizontal = {
|
||||
right: '100%',
|
||||
left: '0'
|
||||
};
|
||||
|
||||
var vertical = {
|
||||
bottom: '100%',
|
||||
top: '0'
|
||||
};
|
||||
|
||||
function transform(decl) {
|
||||
if (!~properties.indexOf(decl.prop)) {
|
||||
return;
|
||||
}
|
||||
var values = (0, _postcssValueParser2.default)(decl.value);
|
||||
var args = (0, _getArguments2.default)(values);
|
||||
var relevant = [];
|
||||
args.forEach(function (arg) {
|
||||
relevant.push({
|
||||
start: null,
|
||||
end: null
|
||||
});
|
||||
arg.forEach(function (part, index) {
|
||||
var isPosition = ~directions.indexOf(part.value) || (0, _postcssValueParser.unit)(part.value);
|
||||
var len = relevant.length - 1;
|
||||
if (relevant[len].start === null && isPosition) {
|
||||
relevant[len].start = index;
|
||||
relevant[len].end = index;
|
||||
return;
|
||||
}
|
||||
if (relevant[len].start !== null) {
|
||||
if (part.type === 'space') {
|
||||
return;
|
||||
} else if (isPosition) {
|
||||
relevant[len].end = index;
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
});
|
||||
});
|
||||
relevant.forEach(function (range, index) {
|
||||
if (range.start === null) {
|
||||
return;
|
||||
}
|
||||
var position = args[index].slice(range.start, range.end + 1);
|
||||
if (position.length > 3) {
|
||||
return;
|
||||
}
|
||||
if (position.length === 1 || position[2].value === 'center') {
|
||||
if (position[2]) {
|
||||
position[2].value = position[1].value = '';
|
||||
}
|
||||
var value = position[0].value;
|
||||
|
||||
var map = _extends({}, horizontal, {
|
||||
center: center
|
||||
});
|
||||
if ((0, _has2.default)(map, value)) {
|
||||
position[0].value = map[value];
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (position[0].value === 'center' && ~directions.indexOf(position[2].value)) {
|
||||
position[0].value = position[1].value = '';
|
||||
var _value = position[2].value;
|
||||
|
||||
if ((0, _has2.default)(horizontal, _value)) {
|
||||
position[2].value = horizontal[_value];
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((0, _has2.default)(horizontal, position[0].value) && (0, _has2.default)(vertical, position[2].value)) {
|
||||
position[0].value = horizontal[position[0].value];
|
||||
position[2].value = vertical[position[2].value];
|
||||
return;
|
||||
} else if ((0, _has2.default)(vertical, position[0].value) && (0, _has2.default)(horizontal, position[2].value)) {
|
||||
var first = position[0].value;
|
||||
position[0].value = horizontal[position[2].value];
|
||||
position[2].value = vertical[first];
|
||||
return;
|
||||
}
|
||||
});
|
||||
decl.value = values.toString();
|
||||
}
|
||||
|
||||
exports.default = (0, _postcss.plugin)('cssnano-reduce-positions', function () {
|
||||
return function (css) {
|
||||
return css.walkDecls(transform);
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
||||
67
build/node_modules/cssnano/dist/lib/reduceTimingFunctions.js
generated
vendored
Normal file
67
build/node_modules/cssnano/dist/lib/reduceTimingFunctions.js
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
var _postcssValueParser = require('postcss-value-parser');
|
||||
|
||||
var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
|
||||
|
||||
var _evenValues = require('./evenValues');
|
||||
|
||||
var _evenValues2 = _interopRequireDefault(_evenValues);
|
||||
|
||||
var _getMatch = require('./getMatch');
|
||||
|
||||
var _getMatch2 = _interopRequireDefault(_getMatch);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var keywords = [['ease', [0.25, 0.1, 0.25, 1]], ['linear', [0, 0, 1, 1]], ['ease-in', [0.42, 0, 1, 1]], ['ease-out', [0, 0, 0.58, 1]], ['ease-in-out', [0.42, 0, 0.58, 1]]];
|
||||
|
||||
var getValue = function getValue(node) {
|
||||
return parseFloat(node.value);
|
||||
};
|
||||
var getMatch = (0, _getMatch2.default)(keywords);
|
||||
|
||||
function reduce(node) {
|
||||
if (node.type !== 'function') {
|
||||
return false;
|
||||
}
|
||||
if (node.value === 'steps') {
|
||||
// Don't bother checking the step-end case as it has the same length
|
||||
// as steps(1)
|
||||
if (getValue(node.nodes[0]) === 1 && node.nodes[2] && node.nodes[2].value === 'start') {
|
||||
node.type = 'word';
|
||||
node.value = 'step-start';
|
||||
delete node.nodes;
|
||||
return;
|
||||
}
|
||||
// The end case is actually the browser default, so it isn't required.
|
||||
if (node.nodes[2] && node.nodes[2].value === 'end') {
|
||||
node.nodes = [node.nodes[0]];
|
||||
return;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (node.value === 'cubic-bezier') {
|
||||
var match = getMatch(node.nodes.filter(_evenValues2.default).map(getValue));
|
||||
|
||||
if (match.length) {
|
||||
node.type = 'word';
|
||||
node.value = match[0][0];
|
||||
delete node.nodes;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = (0, _postcss.plugin)('cssnano-reduce-timing-functions', function () {
|
||||
return function (css) {
|
||||
css.walkDecls(/(animation|transition)(-timing-function|$)/, function (decl) {
|
||||
decl.value = (0, _postcssValueParser2.default)(decl.value).walk(reduce).toString();
|
||||
});
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
||||
24
build/node_modules/cssnano/dist/lib/styleCache.js
generated
vendored
Normal file
24
build/node_modules/cssnano/dist/lib/styleCache.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _postcss = require('postcss');
|
||||
|
||||
exports.default = (0, _postcss.plugin)('cssnano-reset-stylecache', function () {
|
||||
return function (css, result) {
|
||||
result.root.rawCache = {
|
||||
colon: ':',
|
||||
indent: '',
|
||||
beforeDecl: '',
|
||||
beforeRule: '',
|
||||
beforeOpen: '',
|
||||
beforeClose: '',
|
||||
beforeComment: '',
|
||||
after: '',
|
||||
emptyBody: '',
|
||||
commentLeft: '',
|
||||
commentRight: ''
|
||||
};
|
||||
};
|
||||
});
|
||||
module.exports = exports['default'];
|
||||
1
build/node_modules/cssnano/node_modules/.bin/browserslist
generated
vendored
Symbolic link
1
build/node_modules/cssnano/node_modules/.bin/browserslist
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../browserslist/cli.js
|
||||
65
build/node_modules/cssnano/node_modules/ansi-styles/index.js
generated
vendored
Normal file
65
build/node_modules/cssnano/node_modules/ansi-styles/index.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
'use strict';
|
||||
|
||||
function assembleStyles () {
|
||||
var styles = {
|
||||
modifiers: {
|
||||
reset: [0, 0],
|
||||
bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
|
||||
dim: [2, 22],
|
||||
italic: [3, 23],
|
||||
underline: [4, 24],
|
||||
inverse: [7, 27],
|
||||
hidden: [8, 28],
|
||||
strikethrough: [9, 29]
|
||||
},
|
||||
colors: {
|
||||
black: [30, 39],
|
||||
red: [31, 39],
|
||||
green: [32, 39],
|
||||
yellow: [33, 39],
|
||||
blue: [34, 39],
|
||||
magenta: [35, 39],
|
||||
cyan: [36, 39],
|
||||
white: [37, 39],
|
||||
gray: [90, 39]
|
||||
},
|
||||
bgColors: {
|
||||
bgBlack: [40, 49],
|
||||
bgRed: [41, 49],
|
||||
bgGreen: [42, 49],
|
||||
bgYellow: [43, 49],
|
||||
bgBlue: [44, 49],
|
||||
bgMagenta: [45, 49],
|
||||
bgCyan: [46, 49],
|
||||
bgWhite: [47, 49]
|
||||
}
|
||||
};
|
||||
|
||||
// fix humans
|
||||
styles.colors.grey = styles.colors.gray;
|
||||
|
||||
Object.keys(styles).forEach(function (groupName) {
|
||||
var group = styles[groupName];
|
||||
|
||||
Object.keys(group).forEach(function (styleName) {
|
||||
var style = group[styleName];
|
||||
|
||||
styles[styleName] = group[styleName] = {
|
||||
open: '\u001b[' + style[0] + 'm',
|
||||
close: '\u001b[' + style[1] + 'm'
|
||||
};
|
||||
});
|
||||
|
||||
Object.defineProperty(styles, groupName, {
|
||||
value: group,
|
||||
enumerable: false
|
||||
});
|
||||
});
|
||||
|
||||
return styles;
|
||||
}
|
||||
|
||||
Object.defineProperty(module, 'exports', {
|
||||
enumerable: true,
|
||||
get: assembleStyles
|
||||
});
|
||||
21
build/node_modules/cssnano/node_modules/ansi-styles/license
generated
vendored
Normal file
21
build/node_modules/cssnano/node_modules/ansi-styles/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
93
build/node_modules/cssnano/node_modules/ansi-styles/package.json
generated
vendored
Normal file
93
build/node_modules/cssnano/node_modules/ansi-styles/package.json
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"ansi-styles@2.2.1",
|
||||
"/Users/asciidisco/Desktop/asciidisco.com/build"
|
||||
]
|
||||
],
|
||||
"_from": "ansi-styles@2.2.1",
|
||||
"_id": "ansi-styles@2.2.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
||||
"_location": "/cssnano/ansi-styles",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "ansi-styles@2.2.1",
|
||||
"name": "ansi-styles",
|
||||
"escapedName": "ansi-styles",
|
||||
"rawSpec": "2.2.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.2.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cssnano/chalk"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||
"_spec": "2.2.1",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/chalk/ansi-styles/issues"
|
||||
},
|
||||
"description": "ANSI escape codes for styling strings in the terminal",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/chalk/ansi-styles#readme",
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
{
|
||||
"name": "Joshua Appelman",
|
||||
"email": "jappelman@xebia.com",
|
||||
"url": "jbnicolai.com"
|
||||
}
|
||||
],
|
||||
"name": "ansi-styles",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chalk/ansi-styles.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "2.2.1"
|
||||
}
|
||||
86
build/node_modules/cssnano/node_modules/ansi-styles/readme.md
generated
vendored
Normal file
86
build/node_modules/cssnano/node_modules/ansi-styles/readme.md
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
# ansi-styles [](https://travis-ci.org/chalk/ansi-styles)
|
||||
|
||||
> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
|
||||
|
||||
You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
|
||||
|
||||

|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save ansi-styles
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var ansi = require('ansi-styles');
|
||||
|
||||
console.log(ansi.green.open + 'Hello world!' + ansi.green.close);
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
Each style has an `open` and `close` property.
|
||||
|
||||
|
||||
## Styles
|
||||
|
||||
### Modifiers
|
||||
|
||||
- `reset`
|
||||
- `bold`
|
||||
- `dim`
|
||||
- `italic` *(not widely supported)*
|
||||
- `underline`
|
||||
- `inverse`
|
||||
- `hidden`
|
||||
- `strikethrough` *(not widely supported)*
|
||||
|
||||
### Colors
|
||||
|
||||
- `black`
|
||||
- `red`
|
||||
- `green`
|
||||
- `yellow`
|
||||
- `blue`
|
||||
- `magenta`
|
||||
- `cyan`
|
||||
- `white`
|
||||
- `gray`
|
||||
|
||||
### Background colors
|
||||
|
||||
- `bgBlack`
|
||||
- `bgRed`
|
||||
- `bgGreen`
|
||||
- `bgYellow`
|
||||
- `bgBlue`
|
||||
- `bgMagenta`
|
||||
- `bgCyan`
|
||||
- `bgWhite`
|
||||
|
||||
|
||||
## Advanced usage
|
||||
|
||||
By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
|
||||
|
||||
- `ansi.modifiers`
|
||||
- `ansi.colors`
|
||||
- `ansi.bgColors`
|
||||
|
||||
|
||||
###### Example
|
||||
|
||||
```js
|
||||
console.log(ansi.colors.green.open);
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
123
build/node_modules/cssnano/node_modules/autoprefixer/AUTHORS
generated
vendored
Normal file
123
build/node_modules/cssnano/node_modules/autoprefixer/AUTHORS
generated
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
# This is the official list of Autoprefixer authors for copyright purposes.
|
||||
#
|
||||
# This does not necessarily list everyone who has contributed code, since in
|
||||
# some cases, their employer may be the copyright holder. To see the full list
|
||||
# of contributors, see the revision history in source control or
|
||||
# https://github.com/postcss/autoprefixer/graphs/contributors
|
||||
#
|
||||
# Authors who wish to be recognized in this file should add themselves (or
|
||||
# their employer, as appropriate).
|
||||
|
||||
Aaron <me@aaron.md>
|
||||
Adam Lynch <contact@adamlynch.ie>
|
||||
Adonis K <aklp08@gmail.com>
|
||||
Adriaan <https://github.com/harianus>
|
||||
Aleksei Androsov <aandrosov@yandex-team.ru>
|
||||
Aleksey Shvayka <shvaikalesh@gmail.com>
|
||||
Aleks Hudochenkov <aleks@hudochenkov.com>
|
||||
Alexey Plutalov <demiazz.py@gmail.com>
|
||||
Anders Olsen Sandvik <https://github.com/Andersos>
|
||||
Andreas Lind <andreas@one.com>
|
||||
Andrew Rhoads <andrew.c.rhoads@gmail.com
|
||||
Andrey Deryabin <deriabin@gmail.com>
|
||||
Andrey Sitnik <andrey@sitnik.ru>
|
||||
Andrey Taritsyn <taritsyn@gmail.com>
|
||||
Andy Trevorah <a.trevorah@gmail.com>
|
||||
Anton Khlynovskiy <subzey@gmail.com>
|
||||
aruseni <aruseni.magiku@gmail.com>
|
||||
Ben Briggs <beneb.info@gmail.com>
|
||||
bernig <https://github.com/bernig>
|
||||
Bogdan Chadkin <trysound@yandex.ru>
|
||||
brainopia <brainopia@evilmartians.com>
|
||||
Brandon Mathis <brandon@imathis.com>
|
||||
Chad von Nau <chad@vonnau.com>
|
||||
Chi Vinh Le <vinh@wikiwi.io>
|
||||
Cory House <housecor@gmail.com>
|
||||
Cory Simmons <cory@mojotech.com>
|
||||
Craig Martin <https://github.com/craigmichaelmartin>
|
||||
Damon <motoxer4533@gmail.com>
|
||||
Daniel Garcia-Carrillo <garciacarrillo.daniel@gmail.com>
|
||||
Daniel Tschinder <daniel@tschinder.de>
|
||||
David Pike <david@evolution7.com.au>
|
||||
Denis Sokolov <denis@sokolov.cc>
|
||||
Dominik Porada <dominik@porada.co>
|
||||
Dominik Schilling <dominikschilling+git@gmail.com>
|
||||
dotch <ch.weiss@hotmail.de>
|
||||
Efremov Alexey <lexich121@gmail.com>
|
||||
eitanr <eitanr@wix.com>
|
||||
Erik Sundahl <esundahl@gmail.com>
|
||||
Eugene Datsky <eugene@datsky.ru>
|
||||
Evilebot Tnawi <sheo13666q@gmail.com>
|
||||
Forrest York <https://github.com/badisa>
|
||||
Google Inc.
|
||||
Gregory Eremin <magnolia_fan@me.com>
|
||||
GU Yiling <justice360@gmail.com>
|
||||
Hallvord R. M. Steen <hallvord@hallvord.com>
|
||||
heady <https://github.com/heady>
|
||||
Iain Beeston <iain.beeston@gmail.com>
|
||||
Igor Adamenko <https://github.com/igoradamenko>
|
||||
Jack Moore <hello@jacklmoore.com>
|
||||
Jason Kuhrt <jasonkuhrt@me.com>
|
||||
Jeff Escalante <hello@jenius.me>
|
||||
Johannes J. Schmidt <schmidt@netzmerk.com>
|
||||
John Kreitlow <jkreitlow@deepfocus.net>
|
||||
Jonathan Ong <jonathanrichardong@gmail.com>
|
||||
Josh Gillies <github@joshgilli.es>
|
||||
jvdanilo <jvdanilo@gmail.com>
|
||||
Kieran <Kieranju@gmail.com>
|
||||
Kir Shatrov <shatrov@me.com>
|
||||
kizu <kizmarh@gmail.com>
|
||||
Leonya Khachaturov <leonidkhachaturov@gmail.com>
|
||||
Lovchikov Anton <besyanya@yandex.ru>
|
||||
L.T <ec.huyinghuan@gmail.com>
|
||||
Luciano Battagliero <lucianobattagliero+git@gmail.com>
|
||||
Luke Page <luke.a.page@gmail.com>
|
||||
martco <martco@gmail.com>
|
||||
Matt Smith <runner_28@hotmail.com>
|
||||
Maxime Thirouin <m@moox.io>
|
||||
Max Mechanic <max@philo.com>
|
||||
Michael Beil <michaelbeil@me.com>
|
||||
Michael Scott Hertzberg <mshertzberg@gmail.com>
|
||||
Michał Gołębiowski <m.goleb@gmail.com>
|
||||
Mikael Jorhult <mikael@jorhult.se>
|
||||
Morton Fox <github@qslw.com>
|
||||
mvasilkov <mvasilkov@gmail.com>
|
||||
Nick Howes <nick@nickhowes.co.uk>
|
||||
Nick Schonning <nschonni@gmail.com>
|
||||
nickspielgist <dev@nickspiel.me>
|
||||
Niels Dequeker <niels.dequeker@gmail.com>
|
||||
Nikolay Burlov <kohgpat@gmail.com>
|
||||
Paul Statezny <Paulstatezny@gmail.com>
|
||||
Peter Zotov <whitequark@whitequark.org>
|
||||
Rafael Silva <rafael@rafaelsilva.net>
|
||||
Ray Lehnhoff <raymond.lehnhoff@gmail.com>
|
||||
ReadmeCritic <frankensteinbot@gmail.com>
|
||||
Reinaldo Schiehll <rn.schiehll@gmail.com>
|
||||
René Stalder <rene@whatwedo.ch>
|
||||
Richard Wang <richardwa@google.com>
|
||||
Rob Howell <rob@robhowell.com>
|
||||
Roland Warmerdam <rowno@webspirited.com>
|
||||
Sasha Koss <koss@nocorp.me>
|
||||
Sean Anderson <Sean.Palmer.Anderson@gmail.com>
|
||||
Sergey Belov <peimei@ya.ru>
|
||||
Sergey Leschina <mail@putnik.ws>
|
||||
sethjgore <sethjgore@gmail.com>
|
||||
Šime Vidas <sime.vidas@gmail.com>
|
||||
Simon Lydell <simon.lydell@gmail.com>
|
||||
Sindre Sorhus <sindresorhus@gmail.com>
|
||||
Stephen Edgar <stephen@netweb.com.au>
|
||||
Steve Mao <https://github.com/stevemao>
|
||||
Stig Otnes Kolstad <stig@stigok.net>
|
||||
Subash Pathak <sbspk@msn.com>
|
||||
sunhao <sunhao_1988@msn.cn>
|
||||
tomdavenport <playmusic@me.com>
|
||||
Tony Ganch <tonyganch@gmail.com>
|
||||
Vegard Andreas Larsen <vegard@xaltra.net>
|
||||
Vera Surkova <vera@surkova.se>
|
||||
Vincent De Oliveira <vincent@iamvdo.me>
|
||||
Vishnu Ravi <vishnu@vishnu.io>
|
||||
Vladimir Pouzanov <farcaller@gmail.com>
|
||||
vladkens <vladkens@yandex.ru>
|
||||
Даниил Пронин <mail@grawl.ru>
|
||||
一丝 <jie.lijie@alibaba-inc.com>
|
||||
刘祺 <gucong@gmail.com>
|
||||
688
build/node_modules/cssnano/node_modules/autoprefixer/CHANGELOG.md
generated
vendored
Normal file
688
build/node_modules/cssnano/node_modules/autoprefixer/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,688 @@
|
||||
# Change Log
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 6.7.7
|
||||
* Fix `order` for non-digit values.
|
||||
|
||||
## 6.7.6
|
||||
* Fix `font-kerning` (by Chi Vinh Le).
|
||||
|
||||
## 6.7.5
|
||||
* Fix `text-decoration-skip` in iOS (by Chi Vinh Le).
|
||||
* Fix `clip-path` (by Chi Vinh Le).
|
||||
|
||||
## 6.7.4
|
||||
* Improve `browsers` option perfomance.
|
||||
* Update CoffeeScript compiler.
|
||||
|
||||
## 6.7.3
|
||||
* Fix compatibility with “Intrinsic & Extrinsic Sizing” spec update.
|
||||
|
||||
## 6.7.2
|
||||
* Do not prefix grid/flexbox in `@supports` on `grid: false`/`flexbox: false`.
|
||||
|
||||
## 6.7.1
|
||||
* Update Browserslist with `last n version` fix.
|
||||
|
||||
## 6.7 “Krungthep doot thep saang”
|
||||
* Add Electron support in browsers list (by Kilian Valkhof).
|
||||
* Add `flex-flow` partial support for Flexbox 2009 specification.
|
||||
* Fix browsers `0` version issue in some Can I Use data.
|
||||
|
||||
## 6.6.1
|
||||
* Add metadata to use Autoprefixer in JSS tests (by Chi Vinh Le).
|
||||
|
||||
## 6.6 “Kaiyuan”
|
||||
* Add `browserslist` key in `package.json` support.
|
||||
* Add support for separated environments in browserslist config.
|
||||
* Add `browserslist-stats.json` file support to load custom usage statistics.
|
||||
|
||||
## 6.5.4
|
||||
* Fix unitless 0 basis in IE10/IE11 shorthand flex (by Google).
|
||||
|
||||
## 6.5.3
|
||||
* Add error for popular mistake with `browser` option instead of `browsers`.
|
||||
|
||||
## 6.5.2
|
||||
* Clean prefixes data (by Reinaldo Schiehll).
|
||||
|
||||
## 6.5.1
|
||||
* Fix selectors with `:--` prefix support.
|
||||
|
||||
## 6.5 “Einigkeit und Recht und Freiheit”
|
||||
* Add `defaults` keyword to browsers requirements.
|
||||
* Fix CSS Grid Layout support.
|
||||
* Fix `align-self` cleaning.
|
||||
|
||||
## 6.4.1
|
||||
* Fix node cloning after some PostCSS plugins.
|
||||
|
||||
## 6.4 “Hic et ubique terrarum”
|
||||
* Add `:any-link` selector support.
|
||||
* Add `text-decoration-skip` support.
|
||||
* Add `transition: duration property` support.
|
||||
* Fix `-webkit-` prefix for `backface-visibility`.
|
||||
* Fix `rad` unit support in gradients (by 刘祺).
|
||||
* Fix `transition` support in Opera 12.
|
||||
* Removed Safari TP Grid prefixes support.
|
||||
|
||||
## 6.3.7
|
||||
* Fix rare `Cannot read property 'constructor' of null` issue.
|
||||
|
||||
## 6.3.6
|
||||
* Add Safari TP prefix support for Grid Layout.
|
||||
|
||||
## 6.3.5
|
||||
* Fix duplicate prefixes for `-ms-interpolation-mode`.
|
||||
|
||||
## 6.3.4
|
||||
* Show users coverage for selected browsers in `info()`.
|
||||
|
||||
## 6.3.3
|
||||
* Fix transition warning.
|
||||
|
||||
## 6.3.2
|
||||
* Fix jspm support (by Sean Anderson).
|
||||
|
||||
## 6.3.1
|
||||
* Fix compatibility with Flexibility polyfill.
|
||||
|
||||
## 6.3 “Pro rege et lege”
|
||||
* Add Grid Layout support.
|
||||
* Add `text-spacing` support.
|
||||
* Add `> 10% in my stats` browsers query with custom usage statistics.
|
||||
* Add options to disable `@supports`, Flexbox or Grid support.
|
||||
* Fix compatibility with other PostCSS plugins.
|
||||
|
||||
## 6.2.3
|
||||
* Fix error on broken transition with double comma.
|
||||
|
||||
## 6.2.2
|
||||
* Fix issues in broken transitions.
|
||||
|
||||
## 6.2.1
|
||||
* Fix AST error in transition warning (by @jvdanilo).
|
||||
|
||||
## 6.2 “Fluctuat nec mergitur”
|
||||
* Use `fill` instead of `fill-available` according spec changes (by 一丝).
|
||||
* Add `fill` support for logical dimension properties (by 一丝).
|
||||
* Add `text-emphasis` support (by 一丝).
|
||||
* Add prefixes to `@supports` only for compatible browsers.
|
||||
* Add `rad`, `grad` and `turn` units support to linear gradients.
|
||||
* Add some `deg` directions support for old WebKit linear gradients.
|
||||
* Fix `@supports` parenthesis (by @heady).
|
||||
* Add warning when prefixes could not be generated
|
||||
for complicated `transition-property` values.
|
||||
* Add warning for outdated `fill-available` value.
|
||||
* Add warning for wrong `text-emphasis-position` value.
|
||||
* Add “time capsule” warning for prefix-less future.
|
||||
* Normalizes all warning messages.
|
||||
|
||||
## 6.1.2
|
||||
* Fix gradient hack on some parameters (by Alexey Efremov).
|
||||
|
||||
## 6.1.1
|
||||
* Fix `cursor: grab` and `cursor: grabbing` support.
|
||||
|
||||
## 6.1 “Bil-shaʿb wa lil-shaʿb”
|
||||
* Change `transition` support to output more robust CSS.
|
||||
* Add `:read-only` support.
|
||||
* Add support for `appearance` with any values.
|
||||
* Add CSS-in-JS support via `postcss-js`.
|
||||
* Add loud `/*! autoprefixer: off */` control comments support.
|
||||
* Convert `rotateZ` to `rotate` for `-ms-transform`.
|
||||
* Use `postcss-value-parser` to carefully work with gradients.
|
||||
* Remove `-ms-transform-style` and `-o-transform-style` that never existed.
|
||||
|
||||
## 6.0.3
|
||||
* Fix old gradient direction warning.
|
||||
|
||||
## 6.0.2
|
||||
* Remove unnecessary `-khtml-` prefix too.
|
||||
|
||||
## 6.0.1
|
||||
* Fix `cross-fade()` support (by 一丝).
|
||||
|
||||
## 6.0 “Eureka”
|
||||
* CLI was removed from `autoprefixer` package to `autoprefixer-cli`.
|
||||
* `autoprefixer-core` and `autoprefixer` packages was merged back.
|
||||
* Remove `autoprefixer(opt).process(css)`, use `autoprefixer.process(css, opt)`.
|
||||
* Remove `safe` option. Use separated Safe parser from PostCSS.
|
||||
* Remove Opera 12.1 from default query.
|
||||
* Use PostCSS 5.0 API.
|
||||
* Add custom syntaxes support.
|
||||
* Add `image-set` support (by 一丝).
|
||||
* Add `mask-border` support (by 一丝).
|
||||
* Add `filter()` function support (by Vincent De Oliveira).
|
||||
* Add `backdrop-filter` support (by Vincent De Oliveira).
|
||||
* Add `element()` support (by Vincent De Oliveira).
|
||||
* Add CSS Regions support.
|
||||
* Add Scroll Snap Points support.
|
||||
* Add `writing-mode` support.
|
||||
* Add `::backdrop` support.
|
||||
* Add `cross-fade()` support.
|
||||
* Add other `break-` properties support.
|
||||
* Add Microsoft Edge support (by Andrey Polischuk).
|
||||
* Add `not` keyword and exclude browsers by query.
|
||||
* Add version ranges `IE 6-9` (by Ben Briggs).
|
||||
* Fix `filter` in `transition` support on Safari.
|
||||
* Fix `url()` parsing.
|
||||
* Fix `pixelated` cleaning.
|
||||
* Always show old gradient direction warning.
|
||||
|
||||
## 5.2.1
|
||||
* Fix parent-less node issue on some cases (by Josh Gillies).
|
||||
|
||||
## 5.2 “Dont tread on me”
|
||||
* Add `appearance` support.
|
||||
* Warn users on old gradient direction or flexbox syntax.
|
||||
* Add `add: false` option to disable new prefixes adding.
|
||||
* Make Autoprefixer 30% faster.
|
||||
* Use PostCSS 4.1 plugin API.
|
||||
* Add prefixes for `pixelated` instead of `crisp-edges` in `image-rendering`.
|
||||
* Do not add `::placeholder` prefixes for `:placeholder-shown`.
|
||||
* Fix `text-decoration` prefixes.
|
||||
* `autoprefixer.process()` was deprecated. Use PostCSS API.
|
||||
|
||||
## 5.1.11
|
||||
* Update `num2fraction` to fix resolution media query (by 一丝).
|
||||
|
||||
## 5.1.10
|
||||
* Do not generate `-webkit-image-rendering`.
|
||||
|
||||
## 5.1.9
|
||||
* Fix DynJS compatibility (by Nick Howes).
|
||||
|
||||
## 5.1.8
|
||||
* Fix gradients in `mask` and `mask-image` properties.
|
||||
* Fix old webkit prefix on some unsupported gradients.
|
||||
|
||||
## 5.1.7
|
||||
* Fix placeholder selector (by Vincent De Oliveira).
|
||||
|
||||
## 5.1.6
|
||||
* Use official `::placeholder-shown` selector (by Vincent De Oliveira).
|
||||
|
||||
## 5.1.5
|
||||
* Add transition support for CSS Masks properties.
|
||||
|
||||
## 5.1.4
|
||||
* Use `-webkit-` prefix for Opera Mobile 24.
|
||||
|
||||
## 5.1.3
|
||||
* Add IE support for `image-rendering: crisp-edges`.
|
||||
|
||||
## 5.1.2
|
||||
* Add never existed `@-ms-keyframes` to common mistake.
|
||||
|
||||
## 5.1.1
|
||||
* Safer value split in `flex` hack.
|
||||
|
||||
## 5.1 “Jianyuan”
|
||||
* Add support for resolution media query (by 一丝).
|
||||
* Higher accuracy while removing prefixes in values.
|
||||
* Add support for logical properties (by 一丝).
|
||||
* Add `@viewport` support.
|
||||
* Add `text-overflow` support (by 一丝).
|
||||
* Add `text-emphasis` support (by 一丝).
|
||||
* Add `image-rendering: crisp-edges` support.
|
||||
* Add `text-align-last` support.
|
||||
* Return `autoprefixer.defaults` as alias to current `browserslist.defaults`.
|
||||
* Save code style while adding prefixes to `@keyframes` and `@viewport`.
|
||||
* Do not remove `-webkit-background-clip` with non-spec `text` value.
|
||||
* Fix `-webkit-filter` in `transition`.
|
||||
* Better support for browser versions joined on Can I Use
|
||||
like `ios_saf 7.0-7.1` (by Vincent De Oliveira).
|
||||
* Fix compatibility with `postcss-import` (by Jason Kuhrt).
|
||||
* Fix Flexbox prefixes for BlackBerry and UC Browser.
|
||||
* Fix gradient prefixes for old Chrome.
|
||||
|
||||
## 5.0 “Pravda vítězí”
|
||||
* Use PostCSS 4.0.
|
||||
* Use Browserslist to parse browsers queries.
|
||||
* Use global `browserslist` config.
|
||||
* Add `> 5% in US` query to select browsers by usage in some country.
|
||||
* Add `object-fit` and `object-position` properties support.
|
||||
* Add CSS Shape properties support.
|
||||
* Fix UC Browser name in debug info.
|
||||
* Remove `autoprefixer.defaults` and use defaults from Browserslist.
|
||||
|
||||
## 4.0.2
|
||||
* Remove `o-border-radius`, which is common mistake in legacy CSS.
|
||||
|
||||
## 4.0.1
|
||||
* Fix `@supports` support with brackets in values (by Vincent De Oliveira).
|
||||
|
||||
## 4.0 “Indivisibiliter ac Inseparabiliter”
|
||||
* Become 2.5 times fatser by new PostCSS 3.0 parser.
|
||||
* Do not remove outdated prefixes by `remove: false` option.
|
||||
* `map.inline` and `map.sourcesContent` options are now `true` by default.
|
||||
* Add `box-decoration-break` support.
|
||||
* Do not add old `-webkit-` prefix for gradients with `px` units.
|
||||
* Use previous source map to show origin source of CSS syntax error.
|
||||
* Use `from` option from previous source map `file` field.
|
||||
* Set `to` value to `from` if `to` option is missing.
|
||||
* Trim Unicode BOM on source maps parsing.
|
||||
* Parse at-rules without spaces like `@import"file"`.
|
||||
* Better previous `sourceMappingURL` annotation comment cleaning.
|
||||
* Do not remove previous `sourceMappingURL` comment on `map.annotation: false`.
|
||||
|
||||
## 3.1.2
|
||||
* Update Firefox ESR version from 24 to 31.
|
||||
|
||||
## 3.1.1
|
||||
* Use Flexbox 2009 spec for Android stock browser < 4.4.
|
||||
|
||||
## 3.1 “Satyameva Jayate”
|
||||
* Do not remove comments from prefixed values (by Eitan Rousso).
|
||||
* Allow Safari 6.1 to use final Flexbox spec (by John Kreitlow).
|
||||
* Fix `filter` value in `transition` in Webkits.
|
||||
* Show greetings if your browsers don’t require any prefixes.
|
||||
* Add `<=` and `<` browsers requirement (by Andreas Lind).
|
||||
|
||||
## 3.0.1
|
||||
* Fix `autoprefixer.postcss` in callbacks.
|
||||
|
||||
## 3.0 “Liberté, Égalité, Fraternité”
|
||||
* Project was split to autoprefixer (with CLI) and autoprefixer-core.
|
||||
* `autoprefixer()` now receives only `options` object with `browsers` key.
|
||||
* GNU format for syntax error messages from PostCSS 2.2.
|
||||
|
||||
## 2.2 “Mobilis in mobili”
|
||||
* Allow to disable Autoprefixer for some rule by control comment.
|
||||
* Use PostCSS 2.1 with Safe Mode option and broken source line
|
||||
in CSS syntax error messages.
|
||||
|
||||
## 2.1.1
|
||||
* Fix `-webkit-background-size` hack for `contain` and `cover` values.
|
||||
* Don’t add `-webkit-` prefix to `filter` with SVG (by Vincent De Oliveira).
|
||||
|
||||
## 2.1 “Eleftheria i thanatos”
|
||||
* Add support for `clip-path` and `mask` properties.
|
||||
* Return `-webkit-` prefix to `filter` with SVG URI.
|
||||
|
||||
## 2.0.2
|
||||
* Add readable names for new browsers from 2.0 release.
|
||||
* Don’t add `-webkit-` prefix to `filter` with SVG URI.
|
||||
* Don’t add `-o-` prefix 3D transforms.
|
||||
|
||||
## 2.0.1
|
||||
* Save declaration style, when clone declaration to prefix.
|
||||
|
||||
## 2.0 “Hongik Ingan”
|
||||
* Based on PostCSS 1.0.
|
||||
See [options changes](https://github.com/postcss/postcss/releases/tag/1.0.0).
|
||||
* Restore visual cascade after declaration removing.
|
||||
* Enable visual cascade by default.
|
||||
* Prefix declareation in `@supports` at-rule conditions.
|
||||
* Add all browsers from Can I Use: `ie_mob`, `and_chr`, `and_ff`,
|
||||
`op_mob` and `op_mini`.
|
||||
* Allow to use latest Autoprefixer from GitHub by npm.
|
||||
* Add `--no-cascade`, `--annotation` and `--sources-content` options to binary.
|
||||
|
||||
## 1.3.1
|
||||
* Fix gradient hack, when `background` property contains color.
|
||||
|
||||
## 1.3 “Tenka Fubu”
|
||||
* Add `text-size-adjust` support.
|
||||
* Add `background-size` to support Android 2.
|
||||
|
||||
## 1.2 “Meiji”
|
||||
* Use Can I Use data from official `caniuse-db` npm package.
|
||||
* Remove package data update from binary.
|
||||
* Use increment value instead of current date in minor versions.
|
||||
|
||||
## 1.1 “Nutrisco et extingo”
|
||||
* Add source map annotation comment support.
|
||||
* Add inline source map support.
|
||||
* Autodetect previous source map.
|
||||
* Fix source maps support on Windows.
|
||||
* Fix source maps support in subdirectory.
|
||||
* Prefix selector even if it is already prefixed by developer.
|
||||
* Add option `cascade` to create nice visual cascade of prefixes.
|
||||
* Fix flexbox support for IE 10 (by Roland Warmerdam).
|
||||
* Better `break-inside` support.
|
||||
* Fix prefixing, when two same properties are near.
|
||||
|
||||
### 20140222:
|
||||
* Add `touch-action` support.
|
||||
|
||||
### 20140226:
|
||||
* Chrome 33 is moved to released versions.
|
||||
* Add Chrome 36 data.
|
||||
|
||||
### 20140302:
|
||||
* Add `text-decoration-*` properties support.
|
||||
* Update browsers usage statistics.
|
||||
* Use new PostCSS version.
|
||||
|
||||
### 20140319:
|
||||
* Check already prefixed properties after current declaration.
|
||||
* Normalize spaces before already prefixed check.
|
||||
* Firefox 28 is moved to released versions.
|
||||
* Add Firefox 31 data.
|
||||
* Add some Blackberry data.
|
||||
|
||||
### 20140327:
|
||||
* Don’t use `-ms-transform` in `@keyframes`, because IE 9 doesn’t support
|
||||
animations.
|
||||
* Update BlackBerry 10 data.
|
||||
|
||||
### 20140403:
|
||||
* Update browsers usage statistics.
|
||||
* Opera 20 is moved to released versions.
|
||||
* Add Opera 22 data.
|
||||
|
||||
### 20140410:
|
||||
* Chrome 34 is moved to released versions.
|
||||
* Add Chrome 37 data.
|
||||
* Fix Chrome 36 data.
|
||||
|
||||
### 20140429:
|
||||
* Fix `display: inline-flex` support by 2009 spec.
|
||||
* Fix old WebKit gradient converter (by Sergey Belov).
|
||||
* Fix CSS 3 cursors data (by Nick Schonning).
|
||||
|
||||
### 20140430:
|
||||
* Separate 2D and 3D transform prefixes to clean unnecessary `-ms-` prefixes.
|
||||
* Firefox 29 is moved to released versions.
|
||||
* Add Firefox 32 data.
|
||||
|
||||
### 20140510
|
||||
* Do not add `-ms-` prefix for `transform` with 3D functions.
|
||||
* Update browsers global usage statistics.
|
||||
|
||||
### 20140512
|
||||
* Remove unnecessary `-moz-` prefix for `wavy` in `text-decoration`.
|
||||
* Update Safari data for font properties.
|
||||
|
||||
### 20140521
|
||||
* Chrome 36 is moved to released versions.
|
||||
* Add Chrome 38 data.
|
||||
|
||||
### 20140523
|
||||
* Opera 21 is moved to released versions.
|
||||
* Add Opera 23 data.
|
||||
|
||||
### 20140605
|
||||
* Allow to parse gradients without space between color and position.
|
||||
* Add iOS 8, Safari 8 and Android 4.4.3 data.
|
||||
* Update browsers usage statistics.
|
||||
|
||||
## 1.0 “Plus ultra”
|
||||
* Source map support.
|
||||
* Save origin indents and code formatting.
|
||||
* Change CSS parser to PostCSS.
|
||||
* Preserve vendor-prefixed properties put right after unprefixed ones.
|
||||
* Rename `compile()` to `process()` and return result object,
|
||||
instead of CSS string.
|
||||
* Rename `inspect()` to `info()`.
|
||||
* Add in binary `-d` option to specify output directory.
|
||||
* Binary now will not concat output files.
|
||||
* Allow to select last versions for specified browser.
|
||||
* Add full browser names aliases: `firefox`, `explorer` and `blackberry`.
|
||||
* Ignore case in browser names.
|
||||
* Change license to MIT.
|
||||
* Add prefixes inside custom at-rules.
|
||||
* Add only necessary prefixes to selector inside prefixed at-rule.
|
||||
* Safer backgrounds list parser in gradient hack.
|
||||
* Prefix `@keyframes` inside `@media`.
|
||||
* Don’t prefix values for CSS3 PIE properties.
|
||||
* Binary now shows file name in syntax error.
|
||||
* Use browserify to build standalone version.
|
||||
|
||||
### 20131225:
|
||||
* Fix deprecated API convertor.
|
||||
* Add `::placeholder` support for Firefix >= 18.
|
||||
* Fix vendor prefixes order.
|
||||
|
||||
### 20140103:
|
||||
* Add `-webkit-` prefix for `sticky` position.
|
||||
* Update browsers popularity statistics.
|
||||
|
||||
### 20140109:
|
||||
* Add selectors and at-rules sections to debug info.
|
||||
* Fix outdated prefixes cleaning.
|
||||
|
||||
### 20140110:
|
||||
* Add `Firefox ESR` browser requirement.
|
||||
* Opera 18 is moved to released versions.
|
||||
* Add Opera 20 data.
|
||||
|
||||
### 20140117:
|
||||
* Chrome 32 is moved to released versions.
|
||||
* Add Opera 34 data.
|
||||
|
||||
### 20140130:
|
||||
* Fix flexbox properties names in transitions.
|
||||
* Add Chrome 35 and Firefox 29 data.
|
||||
|
||||
### 20140203:
|
||||
* Android 4.4 stock browser and Opera 19 are moved to released versions.
|
||||
* Add Opera 21 data.
|
||||
* Update browsers usage statistics.
|
||||
|
||||
### 20140213:
|
||||
* Add case insensitive to IE’s filter hack (by Dominik Schilling).
|
||||
* Improve selector prefixing in some rare cases (by Simon Lydell).
|
||||
* Firefox 27 is moved to released versions.
|
||||
* Add Firefox 30 data.
|
||||
|
||||
## 0.8 “Unbowed, Unbent, Unbroken”
|
||||
* Add more browsers to defaults ("> 1%, last 2 versions, ff 17, opera 12.1"
|
||||
instead of just "last 2 browsers").
|
||||
* Keep vendor prefixes without unprefixed version (like vendor-specific hacks).
|
||||
* Convert gradients to old WebKit syntax (actual for Android 2.3).
|
||||
* Better support for several syntaxes with one prefix (like Flexbox and
|
||||
gradients in WebKit).
|
||||
* Add intrinsic and extrinsic sizing values support.
|
||||
* Remove never existed prefixes from common mistakes (like -ms-transition).
|
||||
* Add Opera 17 data.
|
||||
* Fix selector prefixes order.
|
||||
* Fix browser versions order in inspect.
|
||||
|
||||
### 20130903:
|
||||
* Fix old WebKit gradients convertor on rgba() colors.
|
||||
* Allow to write old direction syntax in gradients.
|
||||
|
||||
### 20130906:
|
||||
* Fix direction syntax in radial gradients.
|
||||
* Don’t prefix IE filter with modern syntax.
|
||||
|
||||
### 20130911:
|
||||
* Fix parsing property name with spaces.
|
||||
|
||||
### 20130919:
|
||||
* Fix processing custom framework prefixes (by Johannes J. Schmidt).
|
||||
* Concat outputs if several files compiled to one output.
|
||||
* Decrease standalone build size by removing unnecessary Binary class.
|
||||
* iOS 7 is moved to released versions.
|
||||
* Clean up binary code (by Simon Lydell).
|
||||
|
||||
### 20130923:
|
||||
* Firefox 24 is moved to released versions.
|
||||
|
||||
### 20131001:
|
||||
* Add support for grab, grabbing, zoom-in and zoom-out cursor values.
|
||||
|
||||
### 20131006:
|
||||
* Chrome 30 is moved to released versions.
|
||||
|
||||
### 20131007:
|
||||
* Don’t add another prefixes in rule with prefixed selector.
|
||||
|
||||
### 20131009:
|
||||
* Opera 17 is moved to released versions.
|
||||
|
||||
### 20131015:
|
||||
* Fix converting multiple gradients to old webkit syntax (by Aleksei Androsov).
|
||||
|
||||
### 20131017:
|
||||
* Fix @host at-rule parsing.
|
||||
|
||||
### 20131020:
|
||||
* IE 11 and Andrid 4.3 is moved to released versions.
|
||||
* Add Opera 18 data.
|
||||
* Add @namespace support.
|
||||
* Sort browser versions in data file.
|
||||
|
||||
### 20131029:
|
||||
* Add Safari 6.1 data.
|
||||
* Add fx alias for Firefox.
|
||||
|
||||
### 20131104:
|
||||
* Update Android future version to 4.4.
|
||||
* Google Chrome 32 added to future versions list.
|
||||
* Firefox 25 now is actual version, 27 and 28 added to future versions.
|
||||
* Browsers statistics are updated.
|
||||
|
||||
### 20131205:
|
||||
* Google Chrome 33 added to future releases list.
|
||||
* Google Chrome 31 moved to current releases list.
|
||||
|
||||
### 20131209:
|
||||
* Use old webkit gradients for old iOS and Safari (by Chad von Nau).
|
||||
* Fix direction conversion for old webkit gradients (by Chad von Nau).
|
||||
* Update browsers popularity statistics.
|
||||
|
||||
### 20131213:
|
||||
* Firefox ESR in default browsers was changed to 24 version.
|
||||
* Firefox 26 was moved to current releases list.
|
||||
* Firefox 28 was added to future releases list.
|
||||
|
||||
## 0.7 “We Do Not Sow”
|
||||
* Add vendor prefixes to selectors.
|
||||
* Add ::selection and ::placeholder selectors support.
|
||||
* Allow to load support data from Can I Use pull requests.
|
||||
* Remove deprecated API.
|
||||
|
||||
### 20130806:
|
||||
* Add hyphens support.
|
||||
|
||||
### 20130807:
|
||||
* Add tab-size support.
|
||||
* Add :fullscreen support.
|
||||
|
||||
### 20130808:
|
||||
* Allow to select browser versions by > and >= operator.
|
||||
* Fix flex properties in transition.
|
||||
|
||||
### 20130810:
|
||||
* Add Firefox 25 data.
|
||||
|
||||
### 20130824:
|
||||
* Add Chrome 31 and 30 data.
|
||||
* Fix CSS comments parsing (by vladkens).
|
||||
|
||||
## 0.6 “As High As Honor”
|
||||
* New faster API, which cache preprocessed data. Old API is deprecated.
|
||||
* A lot of perfomance improvements.
|
||||
* Add Opera 15 -webkit- prefix support.
|
||||
* Update Chrome 29 and Safari 7 prefixes data.
|
||||
* Add minor browsers in popularity select.
|
||||
* Better syntax error messages.
|
||||
|
||||
### 20130721:
|
||||
* Add Chrome 30 data.
|
||||
|
||||
### 20130728:
|
||||
* Don’t remove non-standard -webkit-background-clip: text.
|
||||
* Don’t remove IE hack on CSS parse.
|
||||
|
||||
### 20130729:
|
||||
* Add Opera 16 data.
|
||||
* Fix “Invalid range in character class” error on Firefox.
|
||||
|
||||
### 20130730:
|
||||
* Fix correct clone comments inside keyframes (by Alexey Plutalov).
|
||||
* Fix angle recalculation in gradients (by Roman Komarov).
|
||||
|
||||
### 20130731:
|
||||
* Add border-image support.
|
||||
|
||||
## 0.5 “Ours is the Fury”
|
||||
* Rewrite Autoprefixer to be more flexible.
|
||||
* Use css, instead of Rework, to fix CSS parsing errors faster.
|
||||
* Fix a lot of CSS parsing errors.
|
||||
|
||||
### 20130616:
|
||||
* More useful message for CSS parsing errors.
|
||||
* Remove old WebKit gradient syntax.
|
||||
* Fix parsing error on comment with braces.
|
||||
|
||||
### 20130617:
|
||||
* Remove old Mozilla border-radius.
|
||||
* Don’t prefix old IE filter.
|
||||
* Remove old background-clip, background-size and background-origin prefixes.
|
||||
* Speed up regexps in values.
|
||||
* Allow to hack property declarations.
|
||||
|
||||
### 20130625:
|
||||
* Convert flexbox properties to 2009 and 2012 specifications.
|
||||
* Improve messages on syntax errors.
|
||||
|
||||
### 20130626:
|
||||
* Add Firefox 24 data.
|
||||
* Add prefixes for font-feature-settings.
|
||||
|
||||
### 20130629:
|
||||
* Fix convert flex properties to old box-flex.
|
||||
|
||||
## 0.4 “Winter Is Coming”
|
||||
* Remove outdated prefixes.
|
||||
* Add border-radius and box-shadow properties to database.
|
||||
* Change degrees in webkit gradients.
|
||||
|
||||
### 20130515:
|
||||
* Add old syntax in gradient direction.
|
||||
* Add old syntax for display: flex.
|
||||
* Update browser global usage statistics.
|
||||
|
||||
### 20130521:
|
||||
* Add Firefox 23 data.
|
||||
|
||||
### 20130524:
|
||||
* Add Chrome 29 data.
|
||||
|
||||
### 20130528:
|
||||
* Fix compatibilty with Rework from git master.
|
||||
* Add minor browsers to data, which can be selected only directly.
|
||||
|
||||
### 20130530:
|
||||
* Add Opera 15 and iOS 6.1 data.
|
||||
* Fix iOS versions in properties and values data.
|
||||
|
||||
### 20130603:
|
||||
* Use latest Rework 0.15 with a lot of CSS parsing fixes.
|
||||
* Update browsers usage statistics.
|
||||
|
||||
## 0.3 “Growing Strong”
|
||||
* Rename `autoprefixer.filter()` to `autoprefixer.rework()`.
|
||||
* Use own filters instead of Rework’s `prefix` and `prefixValue`.
|
||||
* Smarter value prefixer without false match “order” in “border”.
|
||||
* 40% faster.
|
||||
* Don’t add unnecessary properties instead of Rework’s `prefixValue`.
|
||||
* Don’t change properties order.
|
||||
* Sort properties and values in inspect output.
|
||||
* Add main to component config (by Jonathan Ong).
|
||||
* Fix documentation (by Sergey Leschina and Mark Vasilkov).
|
||||
|
||||
### 20130424:
|
||||
* Fix value override in prefixer.
|
||||
|
||||
### 20130427:
|
||||
* Prefix several same values in one property.
|
||||
* Fix Windows support in binary.
|
||||
* Improve print errors in binary.
|
||||
|
||||
### 20130502:
|
||||
* Don’t add -webkit- prefix to IE filter.
|
||||
* Don’t duplicate prefixes on second run.
|
||||
|
||||
## 0.2 “Hear Me Roar!”
|
||||
* Update parse libraries.
|
||||
* Use component package manager to build standalone script.
|
||||
* Add inspect to standalone script.
|
||||
|
||||
## 0.1 “Fire and Blood”
|
||||
* Initial release.
|
||||
20
build/node_modules/cssnano/node_modules/autoprefixer/LICENSE
generated
vendored
Normal file
20
build/node_modules/cssnano/node_modules/autoprefixer/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2013 Andrey Sitnik <andrey@sitnik.ru>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
568
build/node_modules/cssnano/node_modules/autoprefixer/README.md
generated
vendored
Normal file
568
build/node_modules/cssnano/node_modules/autoprefixer/README.md
generated
vendored
Normal file
@@ -0,0 +1,568 @@
|
||||
# Autoprefixer [![Build Status][ci-img]][ci]
|
||||
|
||||
<img align="right" width="94" height="71"
|
||||
src="http://postcss.github.io/autoprefixer/logo.svg"
|
||||
title="Autoprefixer logo by Anton Lovchikov">
|
||||
|
||||
[PostCSS] plugin to parse CSS and add vendor prefixes to CSS rules using values
|
||||
from [Can I Use]. It is [recommended] by Google and used in Twitter and Taobao.
|
||||
|
||||
Write your CSS rules without vendor prefixes (in fact, forget about them
|
||||
entirely):
|
||||
|
||||
```css
|
||||
:fullscreen a {
|
||||
display: flex
|
||||
}
|
||||
```
|
||||
|
||||
Autoprefixer will use the data based on current browser popularity and property
|
||||
support to apply prefixes for you. You can try the [interactive demo]
|
||||
of Autoprefixer.
|
||||
|
||||
```css
|
||||
:-webkit-full-screen a {
|
||||
display: -webkit-box;
|
||||
display: flex
|
||||
}
|
||||
:-moz-full-screen a {
|
||||
display: flex
|
||||
}
|
||||
:-ms-fullscreen a {
|
||||
display: -ms-flexbox;
|
||||
display: flex
|
||||
}
|
||||
:fullscreen a {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex
|
||||
}
|
||||
```
|
||||
|
||||
Twitter account for news and releases: [@autoprefixer].
|
||||
|
||||
<a href="https://evilmartians.com/?utm_source=autoprefixer">
|
||||
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
|
||||
</a>
|
||||
|
||||
[interactive demo]: http://autoprefixer.github.io/
|
||||
[@autoprefixer]: https://twitter.com/autoprefixer
|
||||
[recommended]: https://developers.google.com/web/tools/setup/setup-buildtools#dont-trip-up-with-vendor-prefixes
|
||||
[Can I Use]: http://caniuse.com/
|
||||
[PostCSS]: https://github.com/postcss/postcss
|
||||
[ci-img]: https://travis-ci.org/postcss/autoprefixer.svg
|
||||
[ci]: https://travis-ci.org/postcss/autoprefixer
|
||||
|
||||
## Features
|
||||
|
||||
### Write Pure CSS
|
||||
|
||||
Working with Autoprefixer is simple: just forget about vendor prefixes
|
||||
and write normal CSS according to the latest W3C specs. You don’t need
|
||||
a special language (like Sass) or remember where you must use mixins.
|
||||
|
||||
Autoprefixer supports selectors (like `:fullscreen` and `::selection`),
|
||||
unit function (`calc()`), at‑rules (`@supports` and `@keyframes`)
|
||||
and properties.
|
||||
|
||||
Because Autoprefixer is a postprocessor for CSS,
|
||||
you can also use it with preprocessors such as Sass, Stylus or LESS.
|
||||
|
||||
### Flexbox, Filters, etc.
|
||||
|
||||
Just write normal CSS according to the latest W3C specs and Autoprefixer
|
||||
will produce the code for old browsers.
|
||||
|
||||
```css
|
||||
a {
|
||||
display: flex;
|
||||
}
|
||||
```
|
||||
|
||||
compiles to:
|
||||
|
||||
```css
|
||||
a {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex
|
||||
}
|
||||
```
|
||||
|
||||
Autoprefixer has [27 special hacks] to fix web browser differences.
|
||||
|
||||
[27 special hacks]: https://github.com/postcss/autoprefixer/tree/master/lib/hacks
|
||||
|
||||
### Only Actual Prefixes
|
||||
|
||||
Autoprefixer utilizes the most recent data from [Can I Use]
|
||||
to add only necessary vendor prefixes.
|
||||
|
||||
It also removes old, unnecessary prefixes from your CSS
|
||||
(like `border-radius` prefixes, produced by many CSS libraries).
|
||||
|
||||
```css
|
||||
a {
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
```
|
||||
|
||||
compiles to:
|
||||
|
||||
```css
|
||||
a {
|
||||
border-radius: 5px;
|
||||
}
|
||||
```
|
||||
|
||||
[Can I Use]: http://caniuse.com/
|
||||
|
||||
## Browsers
|
||||
|
||||
Autoprefixer uses [Browserslist], so you can specify the browsers
|
||||
you want to target in your project by queries like `last 2 versions`
|
||||
or `> 5%`.
|
||||
|
||||
The best way to provide browsers is `browserslist` config
|
||||
or `package.json` with `browserslist` key. Put it in your project root.
|
||||
|
||||
We recommend to avoid Autoprefixer option and use `browserslist` config
|
||||
or `package.json`. In this case browsers will be shared with other tools
|
||||
like [babel-preset-env] or [Stylelint].
|
||||
|
||||
See [Browserslist docs] for queries, browser names, config format,
|
||||
and default value.
|
||||
|
||||
[Browserslist docs]: https://github.com/ai/browserslist#queries
|
||||
[babel-preset-env]: https://github.com/babel/babel-preset-env
|
||||
[Browserslist]: https://github.com/ai/browserslist
|
||||
[Stylelint]: http://stylelint.io/
|
||||
|
||||
## Outdated Prefixes
|
||||
|
||||
By default, Autoprefixer also removes outdated prefixes.
|
||||
|
||||
You can disable this behavior with the `remove: false` option. If you have
|
||||
no legacy code, this option will make Autoprefixer about 10% faster.
|
||||
|
||||
Also, you can set the `add: false` option. Autoprefixer will only clean outdated
|
||||
prefixes, but will not add any new prefixes.
|
||||
|
||||
Autoprefixer adds new prefixes between any unprefixed properties and already
|
||||
written prefixes in your CSS. If it will break the expected prefixes order,
|
||||
you can clean all prefixes from your CSS and then
|
||||
add the necessary prefixes again:
|
||||
|
||||
```js
|
||||
var cleaner = postcss([ autoprefixer({ add: false, browsers: [] }) ]);
|
||||
var prefixer = postcss([ autoprefixer ]);
|
||||
|
||||
cleaner.process(css).then(function (cleaned) {
|
||||
return prefixer.process(cleaned.css)
|
||||
}).then(function (result) {
|
||||
console.log(result.css);
|
||||
});
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
#### No prefixes in production
|
||||
|
||||
Many other tools contain Autoprefixer. For example, webpack uses Autoprefixer
|
||||
to minify CSS by cleaning unnecessary prefixes.
|
||||
|
||||
If you set browsers list to Autoprefixer by `browsers` option, only first
|
||||
Autoprefixer will know your browsers. Autoprefixer inside webpack will use
|
||||
default browsers list. As result, webpack will remove prefixes, that first
|
||||
Autoprefixer added.
|
||||
|
||||
You need to put your browsers to [`browserslist` config] in project root —
|
||||
as result all tools (Autoprefixer, cssnano, doiuse, cssnext) will use same
|
||||
browsers list.
|
||||
|
||||
[`browserslist` config]: https://github.com/ai/browserslist#config-file
|
||||
|
||||
#### Does it add polyfills?
|
||||
|
||||
No. Autoprefixer only adds prefixes.
|
||||
|
||||
Most new CSS features will require client side JavaScript to handle a new
|
||||
behavior correctly.
|
||||
|
||||
Depending on what you consider to be a “polyfill”, you can take a look at some
|
||||
other tools and libraries. If you are just looking for syntax sugar,
|
||||
you might take a look at:
|
||||
|
||||
- [Oldie], a PostCSS plugin that handles some IE hacks (opacity, rgba, etc).
|
||||
- [postcss-flexbugs-fixes], a PostCSS plugin to fix flexbox issues.
|
||||
- [cssnext], a tool that allows you to write standard CSS syntax non-implemented
|
||||
yet in browsers (custom properties, custom media, color functions, etc).
|
||||
|
||||
[postcss-flexbugs-fixes]: https://github.com/luisrudge/postcss-flexbugs-fixes
|
||||
[cssnext]: https://github.com/MoOx/postcss-cssnext
|
||||
[Oldie]: https://github.com/jonathantneal/oldie
|
||||
|
||||
#### Why doesn’t Autoprefixer add prefixes to `border-radius`?
|
||||
|
||||
Developers are often surprised by how few prefixes are required today.
|
||||
If Autoprefixer doesn’t add prefixes to your CSS, check if they’re still
|
||||
required on [Can I Use].
|
||||
|
||||
There is a [list with all supported] properties, values, and selectors.
|
||||
|
||||
[list with all supported]: https://github.com/postcss/autoprefixer/wiki/support-list
|
||||
[Can I Use]: http://caniuse.com/
|
||||
|
||||
#### Why Autoprefixer uses unprefixed properties in `@-webkit-keyframes`?
|
||||
|
||||
Browser teams can remove some prefixes before others. So we try to use
|
||||
all combinations of prefixed/unprefixed values.
|
||||
|
||||
#### How to work with legacy `-webkit-` only code?
|
||||
|
||||
Autoprefixer needs unprefixed property to add prefixes. So if you only
|
||||
wrote `-webkit-gradient` without W3C’s `gradient`,
|
||||
Autoprefixer will not add other prefixes.
|
||||
|
||||
But [PostCSS] has a plugins to convert CSS to unprefixed state.
|
||||
Use them before Autoprefixer:
|
||||
|
||||
* [postcss-unprefix]
|
||||
* [postcss-flexboxfixer]
|
||||
* [postcss-gradientfixer]
|
||||
|
||||
[postcss-gradientfixer]: https://github.com/hallvors/postcss-gradientfixer
|
||||
[postcss-flexboxfixer]: https://github.com/hallvors/postcss-flexboxfixer
|
||||
[postcss-unprefix]: https://github.com/yisibl/postcss-unprefix
|
||||
|
||||
#### Does Autoprefixer add `-epub-` prefix?
|
||||
|
||||
No, Autoprefixer works only with browsers prefixes from Can I Use.
|
||||
But you can use [postcss-epub](https://github.com/Rycochet/postcss-epub)
|
||||
for prefixing ePub3 properties.
|
||||
|
||||
#### Why doesn’t Autoprefixer transform generic font-family `system-ui`?
|
||||
|
||||
`system-ui` is technically not a prefix and the transformation is not future-proof. But you can use [postcss-font-family-system-ui](https://github.com/JLHwung/postcss-font-family-system-ui) to transform `system-ui` to a practical font-family list.
|
||||
|
||||
## Usage
|
||||
|
||||
### Gulp
|
||||
|
||||
In Gulp you can use [gulp-postcss] with `autoprefixer` npm package.
|
||||
|
||||
```js
|
||||
gulp.task('autoprefixer', function () {
|
||||
var postcss = require('gulp-postcss');
|
||||
var sourcemaps = require('gulp-sourcemaps');
|
||||
var autoprefixer = require('autoprefixer');
|
||||
|
||||
return gulp.src('./src/*.css')
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(postcss([ autoprefixer() ]))
|
||||
.pipe(sourcemaps.write('.'))
|
||||
.pipe(gulp.dest('./dest'));
|
||||
});
|
||||
```
|
||||
|
||||
With `gulp-postcss` you also can combine Autoprefixer
|
||||
with [other PostCSS plugins].
|
||||
|
||||
[other PostCSS plugins]: https://github.com/postcss/postcss#plugins
|
||||
[gulp-postcss]: https://github.com/postcss/gulp-postcss
|
||||
|
||||
### Webpack
|
||||
|
||||
In [webpack] you can use [postcss-loader] with `autoprefixer`
|
||||
and [other PostCSS plugins].
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
loader: "style-loader!css-loader!postcss-loader"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
And create a `postcss.config.js` with:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
[other PostCSS plugins]: https://github.com/postcss/postcss#plugins
|
||||
[postcss-loader]: https://github.com/postcss/postcss-loader
|
||||
[webpack]: http://webpack.github.io/
|
||||
|
||||
### Grunt
|
||||
|
||||
In Grunt you can use [grunt-postcss] with `autoprefixer` npm package.
|
||||
|
||||
```js
|
||||
module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks('grunt-postcss');
|
||||
|
||||
grunt.initConfig({
|
||||
postcss: {
|
||||
options: {
|
||||
map: true,
|
||||
processors: [
|
||||
require('autoprefixer')
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
src: 'css/*.css'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.registerTask('default', ['postcss:dist']);
|
||||
};
|
||||
```
|
||||
|
||||
With `grunt-postcss` you also can combine Autoprefixer
|
||||
with [other PostCSS plugins].
|
||||
|
||||
[other PostCSS plugins]: https://github.com/postcss/postcss#plugins
|
||||
[grunt-postcss]: https://github.com/nDmitry/grunt-postcss
|
||||
|
||||
### Other Build Tools:
|
||||
|
||||
* **Ruby on Rails**: [autoprefixer-rails]
|
||||
* **Brunch**: [postcss-brunch]
|
||||
* **Broccoli**: [broccoli-postcss]
|
||||
* **Middleman**: [middleman-autoprefixer]
|
||||
* **Mincer**: add `autoprefixer` npm package and enable it:
|
||||
`environment.enable('autoprefixer')`
|
||||
* **Jekyll**: add `autoprefixer-rails` and `jekyll-assets` to `Gemfile`
|
||||
|
||||
[middleman-autoprefixer]: https://github.com/middleman/middleman-autoprefixer
|
||||
[autoprefixer-rails]: https://github.com/ai/autoprefixer-rails
|
||||
[broccoli-postcss]: https://github.com/jeffjewiss/broccoli-postcss
|
||||
[postcss-brunch]: https://github.com/iamvdo/postcss-brunch
|
||||
|
||||
### Preprocessors
|
||||
|
||||
* **Less**: [less-plugin-autoprefix]
|
||||
* **Stylus**: [autoprefixer-stylus]
|
||||
* **Compass**: [autoprefixer-rails#compass]
|
||||
|
||||
[less-plugin-autoprefix]: https://github.com/less/less-plugin-autoprefix
|
||||
[autoprefixer-stylus]: https://github.com/jenius/autoprefixer-stylus
|
||||
[autoprefixer-rails#compass]: https://github.com/ai/autoprefixer-rails#compass
|
||||
|
||||
### CSS-in-JS
|
||||
|
||||
There is [postcss-js] to use Autoprefixer in React Inline Styles, [Free Style],
|
||||
Radium and other CSS-in-JS solutions.
|
||||
|
||||
```js
|
||||
let prefixer = postcssJs.sync([ autoprefixer ]);
|
||||
let style = prefixer({
|
||||
display: 'flex'
|
||||
});
|
||||
```
|
||||
|
||||
[postcss-js]: https://github.com/postcss/postcss-js
|
||||
[Free Style]: https://github.com/blakeembrey/free-style
|
||||
|
||||
### GUI Tools
|
||||
|
||||
* [CodeKit](https://incident57.com/codekit/help.html#autoprefixer)
|
||||
* [Prepros](https://prepros.io)
|
||||
|
||||
### CLI
|
||||
|
||||
You can use the [postcss-cli] to run Autoprefixer from CLI:
|
||||
|
||||
```sh
|
||||
npm install --global postcss-cli autoprefixer
|
||||
postcss --use autoprefixer *.css -d build/
|
||||
```
|
||||
|
||||
See `postcss -h` for help.
|
||||
|
||||
[postcss-cli]: https://github.com/postcss/postcss-cli
|
||||
|
||||
### JavaScript
|
||||
|
||||
You can use Autoprefixer with [PostCSS] in your Node.js application
|
||||
or if you want to develop an Autoprefixer plugin for new environment.
|
||||
|
||||
```js
|
||||
var autoprefixer = require('autoprefixer');
|
||||
var postcss = require('postcss');
|
||||
|
||||
postcss([ autoprefixer ]).process(css).then(function (result) {
|
||||
result.warnings().forEach(function (warn) {
|
||||
console.warn(warn.toString());
|
||||
});
|
||||
console.log(result.css);
|
||||
});
|
||||
```
|
||||
|
||||
There is also [standalone build] for the browser or as a non-Node.js runtime.
|
||||
|
||||
You can use [html-autoprefixer] to process HTML with inlined CSS.
|
||||
|
||||
[html-autoprefixer]: https://github.com/RebelMail/html-autoprefixer
|
||||
[standalone build]: https://raw.github.com/ai/autoprefixer-rails/master/vendor/autoprefixer.js
|
||||
[PostCSS]: https://github.com/postcss/postcss
|
||||
|
||||
### Text Editors and IDE
|
||||
|
||||
Autoprefixer should be used in assets build tools. Text editor plugins are not
|
||||
a good solution, because prefixes decrease code readability and you will need
|
||||
to change value in all prefixed properties.
|
||||
|
||||
I recommend you to learn how to use build tools like [Gulp].
|
||||
They work much better and will open you a whole new world of useful plugins
|
||||
and automatization.
|
||||
|
||||
But, if you can’t move to a build tool, you can use text editor plugins:
|
||||
|
||||
* [Sublime Text](https://github.com/sindresorhus/sublime-autoprefixer)
|
||||
* [Brackets](https://github.com/mikaeljorhult/brackets-autoprefixer)
|
||||
* [Atom Editor](https://github.com/sindresorhus/atom-autoprefixer)
|
||||
* [Visual Studio](http://vswebessentials.com/)
|
||||
|
||||
[Gulp]: http://gulpjs.com/
|
||||
|
||||
## Warnings
|
||||
|
||||
Autoprefixer uses the [PostCSS warning API] to warn about really important problems
|
||||
in your CSS:
|
||||
|
||||
* Old direction syntax in gradients.
|
||||
* Old unprefixed `display: box` instead of `display: flex`
|
||||
by latest specification version.
|
||||
|
||||
You can get warnings from `result.warnings()`:
|
||||
|
||||
```js
|
||||
result.warnings().forEach(function (warn) {
|
||||
console.warn(warn.toString());
|
||||
});
|
||||
```
|
||||
|
||||
Every Autoprefixer runner should display this warnings.
|
||||
|
||||
[PostCSS warning API]: https://github.com/postcss/postcss/blob/master/docs/api.md#warning-class
|
||||
|
||||
## Disabling
|
||||
|
||||
Autoprefixer was designed to have no interface – it just works.
|
||||
If you need some browser specific hack just write a prefixed property
|
||||
after the unprefixed one.
|
||||
|
||||
```css
|
||||
a {
|
||||
transform: scale(0.5);
|
||||
-moz-transform: scale(0.6);
|
||||
}
|
||||
```
|
||||
|
||||
If some prefixes were generated in a wrong way,
|
||||
please create an issue on GitHub.
|
||||
|
||||
Autoprefixer has 4 features, which can be disabled by options:
|
||||
|
||||
* `supports: false` will disable `@supports` parameters prefixing.
|
||||
* `flexbox: false` will disable flexbox properties prefixing.
|
||||
Or `flexbox: "no-2009"` will add prefixes only for final and IE
|
||||
versions of specification.
|
||||
* `grid: false` will disable Grid Layout prefixes for IE.
|
||||
* `remove: false` will disable cleaning outdated prefixes.
|
||||
|
||||
If you do not need Autoprefixer in some part of your CSS,
|
||||
you can use control comments to disable Autoprefixer.
|
||||
|
||||
```css
|
||||
a {
|
||||
transition: 1s; /* it will be prefixed */
|
||||
}
|
||||
|
||||
b {
|
||||
/* autoprefixer: off */
|
||||
transition: 1s; /* it will not be prefixed */
|
||||
}
|
||||
```
|
||||
|
||||
Control comments disable Autoprefixer within the whole rule in which
|
||||
you place it. In the above example, Autoprefixer will be disabled
|
||||
in the entire `b` rule scope, not only after the comment.
|
||||
|
||||
You can also use comments recursively:
|
||||
|
||||
```css
|
||||
/* autoprefixer: off */
|
||||
@supports (transition: all) {
|
||||
/* autoprefixer: on */
|
||||
a {
|
||||
/* autoprefixer: off */
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In Sass/SCSS you can use all the disable options above, add an exclamation mark
|
||||
in the start of comment: `/*! autoprefixer: off */`.
|
||||
|
||||
## Options
|
||||
|
||||
Function `autoprefixer(options)` returns new PostCSS plugin.
|
||||
See [PostCSS API] for plugin usage documentation.
|
||||
|
||||
```js
|
||||
var plugin = autoprefixer({ cascade: false });
|
||||
```
|
||||
|
||||
There are 8 options:
|
||||
|
||||
* `browsers` (array): list of browsers query (like `last 2 versions`),
|
||||
which are supported in your project. We recommend to use `browserslist`
|
||||
config or `browserslist` key in `package.json`, rather than this option
|
||||
to share browsers with other tools. See [Browserslist docs] for available
|
||||
queries and default value.
|
||||
* `env` (string): environment for Browserslist.
|
||||
* `cascade` (boolean): should Autoprefixer use Visual Cascade,
|
||||
if CSS is uncompressed. Default: `true`
|
||||
* `add` (boolean): should Autoprefixer add prefixes. Default is `true`.
|
||||
* `remove` (boolean): should Autoprefixer [remove outdated] prefixes.
|
||||
Default is `true`.
|
||||
* `supports` (boolean): should Autoprefixer add prefixes for `@supports`
|
||||
parameters. Default is `true`.
|
||||
* `flexbox` (boolean|string): should Autoprefixer add prefixes for flexbox
|
||||
properties. With `"no-2009"` value Autoprefixer will add prefixes only
|
||||
for final and IE versions of specification. Default is `true`.
|
||||
* `grid` (boolean): should Autoprefixer add IE prefixes for Grid Layout
|
||||
properties. Default is `true`.
|
||||
* `stats` (object): custom [usage statistics] for `> 10% in my stats`
|
||||
browsers query.
|
||||
|
||||
Plugin object has `info()` method for debugging purpose.
|
||||
|
||||
You can use PostCSS processor to process several CSS files
|
||||
to increase performance.
|
||||
|
||||
[usage statistics]: https://github.com/ai/browserslist#custom-usage-data
|
||||
[PostCSS API]: https://github.com/postcss/postcss/blob/master/docs/api.md
|
||||
|
||||
## Debug
|
||||
|
||||
You can check which browsers are selected and which properties will be prefixed:
|
||||
|
||||
```js
|
||||
var info = autoprefixer().info();
|
||||
console.log(info);
|
||||
```
|
||||
669
build/node_modules/cssnano/node_modules/autoprefixer/data/prefixes.js
generated
vendored
Normal file
669
build/node_modules/cssnano/node_modules/autoprefixer/data/prefixes.js
generated
vendored
Normal file
@@ -0,0 +1,669 @@
|
||||
(function() {
|
||||
var add, backdropFilter, bckgrndImgOpts, boxdecorbreak, crispedges, cursorsGrab, cursorsNewer, decoration, devdaptation, elementFunction, feature, filterFunction, flexbox, fullscreen, gradients, grid, logicalProps, prefix, readOnly, resolution, result, sort, textAlignLast, textSizeAdjust, textSpacing, transforms3d, userSelectNone, writingMode,
|
||||
slice = [].slice;
|
||||
|
||||
sort = function(array) {
|
||||
return array.sort(function(a, b) {
|
||||
var d;
|
||||
a = a.split(' ');
|
||||
b = b.split(' ');
|
||||
if (a[0] > b[0]) {
|
||||
return 1;
|
||||
} else if (a[0] < b[0]) {
|
||||
return -1;
|
||||
} else {
|
||||
d = parseFloat(a[1]) - parseFloat(b[1]);
|
||||
if (d > 0) {
|
||||
return 1;
|
||||
} else if (d < 0) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
feature = function(data, opts, callback) {
|
||||
var browser, match, need, ref, ref1, support, version, versions;
|
||||
if (!callback) {
|
||||
ref = [opts, {}], callback = ref[0], opts = ref[1];
|
||||
}
|
||||
match = opts.match || /\sx($|\s)/;
|
||||
need = [];
|
||||
ref1 = data.stats;
|
||||
for (browser in ref1) {
|
||||
versions = ref1[browser];
|
||||
for (version in versions) {
|
||||
support = versions[version];
|
||||
if (support.match(match)) {
|
||||
need.push(browser + ' ' + version);
|
||||
}
|
||||
}
|
||||
}
|
||||
return callback(sort(need));
|
||||
};
|
||||
|
||||
result = {};
|
||||
|
||||
prefix = function() {
|
||||
var data, i, j, k, len, name, names, results;
|
||||
names = 2 <= arguments.length ? slice.call(arguments, 0, j = arguments.length - 1) : (j = 0, []), data = arguments[j++];
|
||||
results = [];
|
||||
for (k = 0, len = names.length; k < len; k++) {
|
||||
name = names[k];
|
||||
result[name] = {};
|
||||
results.push((function() {
|
||||
var results1;
|
||||
results1 = [];
|
||||
for (i in data) {
|
||||
results1.push(result[name][i] = data[i]);
|
||||
}
|
||||
return results1;
|
||||
})());
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
add = function() {
|
||||
var data, j, k, len, name, names, results;
|
||||
names = 2 <= arguments.length ? slice.call(arguments, 0, j = arguments.length - 1) : (j = 0, []), data = arguments[j++];
|
||||
results = [];
|
||||
for (k = 0, len = names.length; k < len; k++) {
|
||||
name = names[k];
|
||||
results.push(result[name].browsers = sort(result[name].browsers.concat(data.browsers)));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
module.exports = result;
|
||||
|
||||
feature(require('caniuse-db/features-json/border-radius.json'), function(browsers) {
|
||||
return prefix('border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius', {
|
||||
mistakes: ['-khtml-', '-ms-', '-o-'],
|
||||
browsers: browsers,
|
||||
feature: 'border-radius'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-boxshadow.json'), function(browsers) {
|
||||
return prefix('box-shadow', {
|
||||
mistakes: ['-khtml-'],
|
||||
browsers: browsers,
|
||||
feature: 'css-boxshadow'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-animation.json'), function(browsers) {
|
||||
return prefix('animation', 'animation-name', 'animation-duration', 'animation-delay', 'animation-direction', 'animation-fill-mode', 'animation-iteration-count', 'animation-play-state', 'animation-timing-function', '@keyframes', {
|
||||
mistakes: ['-khtml-', '-ms-'],
|
||||
browsers: browsers,
|
||||
feature: 'css-animation'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-transitions.json'), function(browsers) {
|
||||
return prefix('transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function', {
|
||||
mistakes: ['-khtml-', '-ms-'],
|
||||
browsers: browsers,
|
||||
feature: 'css-transitions'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/transforms2d.json'), function(browsers) {
|
||||
return prefix('transform', 'transform-origin', {
|
||||
browsers: browsers,
|
||||
feature: 'transforms2d'
|
||||
});
|
||||
});
|
||||
|
||||
transforms3d = require('caniuse-db/features-json/transforms3d.json');
|
||||
|
||||
feature(transforms3d, function(browsers) {
|
||||
prefix('perspective', 'perspective-origin', {
|
||||
browsers: browsers,
|
||||
feature: 'transforms3d'
|
||||
});
|
||||
return prefix('transform-style', {
|
||||
mistakes: ['-ms-', '-o-'],
|
||||
browsers: browsers,
|
||||
feature: 'transforms3d'
|
||||
});
|
||||
});
|
||||
|
||||
feature(transforms3d, {
|
||||
match: /y\sx|y\s#2/
|
||||
}, function(browsers) {
|
||||
return prefix('backface-visibility', {
|
||||
mistakes: ['-ms-', '-o-'],
|
||||
browsers: browsers,
|
||||
feature: 'transforms3d'
|
||||
});
|
||||
});
|
||||
|
||||
gradients = require('caniuse-db/features-json/css-gradients.json');
|
||||
|
||||
feature(gradients, {
|
||||
match: /y\sx/
|
||||
}, function(browsers) {
|
||||
return prefix('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', {
|
||||
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
||||
mistakes: ['-ms-'],
|
||||
browsers: browsers,
|
||||
feature: 'css-gradients'
|
||||
});
|
||||
});
|
||||
|
||||
feature(gradients, {
|
||||
match: /a\sx/
|
||||
}, function(browsers) {
|
||||
browsers = browsers.map(function(i) {
|
||||
if (/op/.test(i)) {
|
||||
return i;
|
||||
} else {
|
||||
return i + " old";
|
||||
}
|
||||
});
|
||||
return add('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', {
|
||||
browsers: browsers,
|
||||
feature: 'css-gradients'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css3-boxsizing.json'), function(browsers) {
|
||||
return prefix('box-sizing', {
|
||||
browsers: browsers,
|
||||
feature: 'css3-boxsizing'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-filters.json'), function(browsers) {
|
||||
return prefix('filter', {
|
||||
browsers: browsers,
|
||||
feature: 'css-filters'
|
||||
});
|
||||
});
|
||||
|
||||
filterFunction = require('caniuse-db/features-json/css-filter-function.json');
|
||||
|
||||
feature(filterFunction, function(browsers) {
|
||||
return prefix('filter-function', {
|
||||
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
||||
browsers: browsers,
|
||||
feature: 'css-filter-function'
|
||||
});
|
||||
});
|
||||
|
||||
backdropFilter = require('caniuse-db/features-json/css-backdrop-filter.json');
|
||||
|
||||
feature(backdropFilter, function(browsers) {
|
||||
return prefix('backdrop-filter', {
|
||||
browsers: browsers,
|
||||
feature: 'css-backdrop-filter'
|
||||
});
|
||||
});
|
||||
|
||||
elementFunction = require('caniuse-db/features-json/css-element-function.json');
|
||||
|
||||
feature(elementFunction, function(browsers) {
|
||||
return prefix('element', {
|
||||
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
||||
browsers: browsers,
|
||||
feature: 'css-element-function'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/multicolumn.json'), function(browsers) {
|
||||
prefix('columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', {
|
||||
browsers: browsers,
|
||||
feature: 'multicolumn'
|
||||
});
|
||||
return prefix('column-count', 'column-rule-style', 'column-span', 'column-fill', 'break-before', 'break-after', 'break-inside', {
|
||||
browsers: browsers,
|
||||
feature: 'multicolumn'
|
||||
});
|
||||
});
|
||||
|
||||
userSelectNone = require('caniuse-db/features-json/user-select-none.json');
|
||||
|
||||
feature(userSelectNone, function(browsers) {
|
||||
return prefix('user-select', {
|
||||
mistakes: ['-khtml-'],
|
||||
browsers: browsers,
|
||||
feature: 'user-select-none'
|
||||
});
|
||||
});
|
||||
|
||||
flexbox = require('caniuse-db/features-json/flexbox.json');
|
||||
|
||||
feature(flexbox, {
|
||||
match: /a\sx/
|
||||
}, function(browsers) {
|
||||
browsers = browsers.map(function(i) {
|
||||
if (/ie|firefox/.test(i)) {
|
||||
return i;
|
||||
} else {
|
||||
return i + " 2009";
|
||||
}
|
||||
});
|
||||
prefix('display-flex', 'inline-flex', {
|
||||
props: ['display'],
|
||||
browsers: browsers,
|
||||
feature: 'flexbox'
|
||||
});
|
||||
prefix('flex', 'flex-grow', 'flex-shrink', 'flex-basis', {
|
||||
browsers: browsers,
|
||||
feature: 'flexbox'
|
||||
});
|
||||
return prefix('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', {
|
||||
browsers: browsers,
|
||||
feature: 'flexbox'
|
||||
});
|
||||
});
|
||||
|
||||
feature(flexbox, {
|
||||
match: /y\sx/
|
||||
}, function(browsers) {
|
||||
add('display-flex', 'inline-flex', {
|
||||
browsers: browsers,
|
||||
feature: 'flexbox'
|
||||
});
|
||||
add('flex', 'flex-grow', 'flex-shrink', 'flex-basis', {
|
||||
browsers: browsers,
|
||||
feature: 'flexbox'
|
||||
});
|
||||
return add('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', {
|
||||
browsers: browsers,
|
||||
feature: 'flexbox'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/calc.json'), function(browsers) {
|
||||
return prefix('calc', {
|
||||
props: ['*'],
|
||||
browsers: browsers,
|
||||
feature: 'calc'
|
||||
});
|
||||
});
|
||||
|
||||
bckgrndImgOpts = require('caniuse-db/features-json/background-img-opts.json');
|
||||
|
||||
feature(bckgrndImgOpts, function(browsers) {
|
||||
return prefix('background-clip', 'background-origin', 'background-size', {
|
||||
browsers: browsers,
|
||||
feature: 'background-img-opts'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/font-feature.json'), function(browsers) {
|
||||
return prefix('font-feature-settings', 'font-variant-ligatures', 'font-language-override', {
|
||||
browsers: browsers,
|
||||
feature: 'font-feature'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/font-kerning.json'), function(browsers) {
|
||||
return prefix('font-kerning', {
|
||||
browsers: browsers,
|
||||
feature: 'font-kerning'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/border-image.json'), function(browsers) {
|
||||
return prefix('border-image', {
|
||||
browsers: browsers,
|
||||
feature: 'border-image'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-selection.json'), function(browsers) {
|
||||
return prefix('::selection', {
|
||||
selector: true,
|
||||
browsers: browsers,
|
||||
feature: 'css-selection'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-placeholder.json'), function(browsers) {
|
||||
browsers = browsers.map(function(i) {
|
||||
var name, ref, version;
|
||||
ref = i.split(' '), name = ref[0], version = ref[1];
|
||||
if (name === 'firefox' && parseFloat(version) <= 18) {
|
||||
return i + ' old';
|
||||
} else {
|
||||
return i;
|
||||
}
|
||||
});
|
||||
return prefix('::placeholder', {
|
||||
selector: true,
|
||||
browsers: browsers,
|
||||
feature: 'css-placeholder'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-hyphens.json'), function(browsers) {
|
||||
return prefix('hyphens', {
|
||||
browsers: browsers,
|
||||
feature: 'css-hyphens'
|
||||
});
|
||||
});
|
||||
|
||||
fullscreen = require('caniuse-db/features-json/fullscreen.json');
|
||||
|
||||
feature(fullscreen, function(browsers) {
|
||||
return prefix(':fullscreen', {
|
||||
selector: true,
|
||||
browsers: browsers,
|
||||
feature: 'fullscreen'
|
||||
});
|
||||
});
|
||||
|
||||
feature(fullscreen, {
|
||||
match: /x(\s#2|$)/
|
||||
}, function(browsers) {
|
||||
return prefix('::backdrop', {
|
||||
selector: true,
|
||||
browsers: browsers,
|
||||
feature: 'fullscreen'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css3-tabsize.json'), function(browsers) {
|
||||
return prefix('tab-size', {
|
||||
browsers: browsers,
|
||||
feature: 'css3-tabsize'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/intrinsic-width.json'), function(browsers) {
|
||||
return prefix('max-content', 'min-content', 'fit-content', 'fill', 'fill-available', 'stretch', {
|
||||
props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size'],
|
||||
browsers: browsers,
|
||||
feature: 'intrinsic-width'
|
||||
});
|
||||
});
|
||||
|
||||
cursorsNewer = require('caniuse-db/features-json/css3-cursors-newer.json');
|
||||
|
||||
feature(cursorsNewer, function(browsers) {
|
||||
return prefix('zoom-in', 'zoom-out', {
|
||||
props: ['cursor'],
|
||||
browsers: browsers,
|
||||
feature: 'css3-cursors-newer'
|
||||
});
|
||||
});
|
||||
|
||||
cursorsGrab = require('caniuse-db/features-json/css3-cursors-grab.json');
|
||||
|
||||
feature(cursorsGrab, function(browsers) {
|
||||
return prefix('grab', 'grabbing', {
|
||||
props: ['cursor'],
|
||||
browsers: browsers,
|
||||
feature: 'css3-cursors-grab'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-sticky.json'), function(browsers) {
|
||||
return prefix('sticky', {
|
||||
props: ['position'],
|
||||
browsers: browsers,
|
||||
feature: 'css-sticky'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/pointer.json'), function(browsers) {
|
||||
return prefix('touch-action', {
|
||||
browsers: browsers,
|
||||
feature: 'pointer'
|
||||
});
|
||||
});
|
||||
|
||||
decoration = require('caniuse-db/features-json/text-decoration.json');
|
||||
|
||||
feature(decoration, function(browsers) {
|
||||
return prefix('text-decoration-style', 'text-decoration-color', 'text-decoration-line', {
|
||||
browsers: browsers,
|
||||
feature: 'text-decoration'
|
||||
});
|
||||
});
|
||||
|
||||
feature(decoration, {
|
||||
match: /x.*#[23]/
|
||||
}, function(browsers) {
|
||||
return prefix('text-decoration-skip', {
|
||||
browsers: browsers,
|
||||
feature: 'text-decoration'
|
||||
});
|
||||
});
|
||||
|
||||
textSizeAdjust = require('caniuse-db/features-json/text-size-adjust.json');
|
||||
|
||||
feature(textSizeAdjust, function(browsers) {
|
||||
return prefix('text-size-adjust', {
|
||||
browsers: browsers,
|
||||
feature: 'text-size-adjust'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-masks.json'), function(browsers) {
|
||||
prefix('mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-repeat', 'mask-border-repeat', 'mask-border-source', {
|
||||
browsers: browsers,
|
||||
feature: 'css-masks'
|
||||
});
|
||||
return prefix('mask', 'mask-position', 'mask-size', 'mask-border', 'mask-border-outset', 'mask-border-width', 'mask-border-slice', {
|
||||
browsers: browsers,
|
||||
feature: 'css-masks'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-clip-path.json'), function(browsers) {
|
||||
return prefix('clip-path', {
|
||||
browsers: browsers,
|
||||
feature: 'css-clip-path'
|
||||
});
|
||||
});
|
||||
|
||||
boxdecorbreak = require('caniuse-db/features-json/css-boxdecorationbreak.json');
|
||||
|
||||
feature(boxdecorbreak, function(browsers) {
|
||||
return prefix('box-decoration-break', {
|
||||
browsers: browsers,
|
||||
feature: 'css-boxdecorationbreak'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/object-fit.json'), function(browsers) {
|
||||
return prefix('object-fit', 'object-position', {
|
||||
browsers: browsers,
|
||||
feature: 'object-fit'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-shapes.json'), function(browsers) {
|
||||
return prefix('shape-margin', 'shape-outside', 'shape-image-threshold', {
|
||||
browsers: browsers,
|
||||
feature: 'css-shapes'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/text-overflow.json'), function(browsers) {
|
||||
return prefix('text-overflow', {
|
||||
browsers: browsers,
|
||||
feature: 'text-overflow'
|
||||
});
|
||||
});
|
||||
|
||||
devdaptation = require('caniuse-db/features-json/css-deviceadaptation.json');
|
||||
|
||||
feature(devdaptation, function(browsers) {
|
||||
return prefix('@viewport', {
|
||||
browsers: browsers,
|
||||
feature: 'css-deviceadaptation'
|
||||
});
|
||||
});
|
||||
|
||||
resolution = require('caniuse-db/features-json/css-media-resolution.json');
|
||||
|
||||
feature(resolution, {
|
||||
match: /( x($| )|a #3)/
|
||||
}, function(browsers) {
|
||||
return prefix('@resolution', {
|
||||
browsers: browsers,
|
||||
feature: 'css-media-resolution'
|
||||
});
|
||||
});
|
||||
|
||||
textAlignLast = require('caniuse-db/features-json/css-text-align-last.json');
|
||||
|
||||
feature(textAlignLast, function(browsers) {
|
||||
return prefix('text-align-last', {
|
||||
browsers: browsers,
|
||||
feature: 'css-text-align-last'
|
||||
});
|
||||
});
|
||||
|
||||
crispedges = require('caniuse-db/features-json/css-crisp-edges.json');
|
||||
|
||||
feature(crispedges, {
|
||||
match: /y x|a x #1/
|
||||
}, function(browsers) {
|
||||
return prefix('pixelated', {
|
||||
props: ['image-rendering'],
|
||||
browsers: browsers,
|
||||
feature: 'css-crisp-edges'
|
||||
});
|
||||
});
|
||||
|
||||
feature(crispedges, {
|
||||
match: /a x #2/
|
||||
}, function(browsers) {
|
||||
return prefix('image-rendering', {
|
||||
browsers: browsers,
|
||||
feature: 'css-crisp-edges'
|
||||
});
|
||||
});
|
||||
|
||||
logicalProps = require('caniuse-db/features-json/css-logical-props.json');
|
||||
|
||||
feature(logicalProps, function(browsers) {
|
||||
return prefix('border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', {
|
||||
browsers: browsers,
|
||||
feature: 'css-logical-props'
|
||||
});
|
||||
});
|
||||
|
||||
feature(logicalProps, {
|
||||
match: /x\s#2/
|
||||
}, function(browsers) {
|
||||
return prefix('border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', {
|
||||
browsers: browsers,
|
||||
feature: 'css-logical-props'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-appearance.json'), function(browsers) {
|
||||
return prefix('appearance', {
|
||||
browsers: browsers,
|
||||
feature: 'css-appearance'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-snappoints.json'), function(browsers) {
|
||||
return prefix('scroll-snap-type', 'scroll-snap-coordinate', 'scroll-snap-destination', 'scroll-snap-points-x', 'scroll-snap-points-y', {
|
||||
browsers: browsers,
|
||||
feature: 'css-snappoints'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-regions.json'), function(browsers) {
|
||||
return prefix('flow-into', 'flow-from', 'region-fragment', {
|
||||
browsers: browsers,
|
||||
feature: 'css-regions'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-image-set.json'), function(browsers) {
|
||||
return prefix('image-set', {
|
||||
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
||||
browsers: browsers,
|
||||
feature: 'css-image-set'
|
||||
});
|
||||
});
|
||||
|
||||
writingMode = require('caniuse-db/features-json/css-writing-mode.json');
|
||||
|
||||
feature(writingMode, {
|
||||
match: /a|x/
|
||||
}, function(browsers) {
|
||||
return prefix('writing-mode', {
|
||||
browsers: browsers,
|
||||
feature: 'css-writing-mode'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-cross-fade.json'), function(browsers) {
|
||||
return prefix('cross-fade', {
|
||||
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
||||
browsers: browsers,
|
||||
feature: 'css-cross-fade'
|
||||
});
|
||||
});
|
||||
|
||||
readOnly = require('caniuse-db/features-json/css-read-only-write.json');
|
||||
|
||||
feature(readOnly, function(browsers) {
|
||||
return prefix(':read-only', ':read-write', {
|
||||
selector: true,
|
||||
browsers: browsers,
|
||||
feature: 'css-read-only-write'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/text-emphasis.json'), function(browsers) {
|
||||
return prefix('text-emphasis', 'text-emphasis-position', 'text-emphasis-style', 'text-emphasis-color', {
|
||||
browsers: browsers,
|
||||
feature: 'text-emphasis'
|
||||
});
|
||||
});
|
||||
|
||||
grid = require('caniuse-db/features-json/css-grid.json');
|
||||
|
||||
feature(grid, function(browsers) {
|
||||
prefix('display-grid', 'inline-grid', {
|
||||
props: ['display'],
|
||||
browsers: browsers,
|
||||
feature: 'css-grid'
|
||||
});
|
||||
return prefix('grid-template-columns', 'grid-template-rows', 'grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end', 'grid-row', 'grid-column', {
|
||||
browsers: browsers,
|
||||
feature: 'css-grid'
|
||||
});
|
||||
});
|
||||
|
||||
feature(grid, {
|
||||
match: /a x/
|
||||
}, function(browsers) {
|
||||
return prefix('justify-items', 'grid-row-align', {
|
||||
browsers: browsers,
|
||||
feature: 'css-grid'
|
||||
});
|
||||
});
|
||||
|
||||
textSpacing = require('caniuse-db/features-json/css-text-spacing.json');
|
||||
|
||||
feature(textSpacing, function(browsers) {
|
||||
return prefix('text-spacing', {
|
||||
browsers: browsers,
|
||||
feature: 'css-text-spacing'
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-any-link.json'), function(browsers) {
|
||||
return prefix(':any-link', {
|
||||
selector: true,
|
||||
browsers: browsers,
|
||||
feature: 'css-any-link'
|
||||
});
|
||||
});
|
||||
|
||||
}).call(this);
|
||||
51
build/node_modules/cssnano/node_modules/autoprefixer/lib/at-rule.js
generated
vendored
Normal file
51
build/node_modules/cssnano/node_modules/autoprefixer/lib/at-rule.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
(function() {
|
||||
var AtRule, Prefixer,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Prefixer = require('./prefixer');
|
||||
|
||||
AtRule = (function(superClass) {
|
||||
extend(AtRule, superClass);
|
||||
|
||||
function AtRule() {
|
||||
return AtRule.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
AtRule.prototype.add = function(rule, prefix) {
|
||||
var already, cloned, prefixed;
|
||||
prefixed = prefix + rule.name;
|
||||
already = rule.parent.some(function(i) {
|
||||
return i.name === prefixed && i.params === rule.params;
|
||||
});
|
||||
if (already) {
|
||||
return;
|
||||
}
|
||||
cloned = this.clone(rule, {
|
||||
name: prefixed
|
||||
});
|
||||
return rule.parent.insertBefore(rule, cloned);
|
||||
};
|
||||
|
||||
AtRule.prototype.process = function(node) {
|
||||
var j, len, parent, prefix, ref, results;
|
||||
parent = this.parentPrefix(node);
|
||||
ref = this.prefixes;
|
||||
results = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
prefix = ref[j];
|
||||
if (parent && parent !== prefix) {
|
||||
continue;
|
||||
}
|
||||
results.push(this.add(node, prefix));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
return AtRule;
|
||||
|
||||
})(Prefixer);
|
||||
|
||||
module.exports = AtRule;
|
||||
|
||||
}).call(this);
|
||||
92
build/node_modules/cssnano/node_modules/autoprefixer/lib/autoprefixer.js
generated
vendored
Normal file
92
build/node_modules/cssnano/node_modules/autoprefixer/lib/autoprefixer.js
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
(function() {
|
||||
var Browsers, Prefixes, browserslist, cache, isPlainObject, postcss, timeCapsule,
|
||||
slice = [].slice;
|
||||
|
||||
browserslist = require('browserslist');
|
||||
|
||||
postcss = require('postcss');
|
||||
|
||||
Browsers = require('./browsers');
|
||||
|
||||
Prefixes = require('./prefixes');
|
||||
|
||||
isPlainObject = function(obj) {
|
||||
return Object.prototype.toString.apply(obj) === '[object Object]';
|
||||
};
|
||||
|
||||
cache = {};
|
||||
|
||||
timeCapsule = function(result, prefixes) {
|
||||
if (prefixes.browsers.selected.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (prefixes.add.selectors.length > 0) {
|
||||
return;
|
||||
}
|
||||
if (Object.keys(prefixes.add).length > 2) {
|
||||
return;
|
||||
}
|
||||
return result.warn('Greetings, time traveller. ' + 'We are in the golden age of prefix-less CSS, ' + 'where Autoprefixer is no longer needed for your stylesheet.');
|
||||
};
|
||||
|
||||
module.exports = postcss.plugin('autoprefixer', function() {
|
||||
var loadPrefixes, options, plugin, reqs;
|
||||
reqs = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
||||
if (reqs.length === 1 && isPlainObject(reqs[0])) {
|
||||
options = reqs[0];
|
||||
reqs = void 0;
|
||||
} else if (reqs.length === 0 || (reqs.length === 1 && (reqs[0] == null))) {
|
||||
reqs = void 0;
|
||||
} else if (reqs.length <= 2 && (reqs[0] instanceof Array || (reqs[0] == null))) {
|
||||
options = reqs[1];
|
||||
reqs = reqs[0];
|
||||
} else if (typeof reqs[reqs.length - 1] === 'object') {
|
||||
options = reqs.pop();
|
||||
}
|
||||
options || (options = {});
|
||||
if (options.browser) {
|
||||
throw new Error('Change `browser` option to `browsers` in Autoprefixer');
|
||||
}
|
||||
if (options.browsers != null) {
|
||||
reqs = options.browsers;
|
||||
}
|
||||
loadPrefixes = function(opts) {
|
||||
var browsers, key, stats;
|
||||
stats = options.stats;
|
||||
browsers = new Browsers(module.exports.data.browsers, reqs, opts, stats);
|
||||
key = browsers.selected.join(', ') + JSON.stringify(options);
|
||||
return cache[key] || (cache[key] = new Prefixes(module.exports.data.prefixes, browsers, options));
|
||||
};
|
||||
plugin = function(css, result) {
|
||||
var prefixes, ref;
|
||||
prefixes = loadPrefixes({
|
||||
from: (ref = css.source) != null ? ref.input.file : void 0,
|
||||
env: options.env
|
||||
});
|
||||
timeCapsule(result, prefixes);
|
||||
if (options.remove !== false) {
|
||||
prefixes.processor.remove(css);
|
||||
}
|
||||
if (options.add !== false) {
|
||||
return prefixes.processor.add(css, result);
|
||||
}
|
||||
};
|
||||
plugin.options = options;
|
||||
plugin.info = function(opts) {
|
||||
return require('./info')(loadPrefixes(opts));
|
||||
};
|
||||
return plugin;
|
||||
});
|
||||
|
||||
module.exports.data = {
|
||||
browsers: require('caniuse-db/data.json').agents,
|
||||
prefixes: require('../data/prefixes')
|
||||
};
|
||||
|
||||
module.exports.defaults = browserslist.defaults;
|
||||
|
||||
module.exports.info = function() {
|
||||
return module.exports().info();
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
46
build/node_modules/cssnano/node_modules/autoprefixer/lib/brackets.js
generated
vendored
Normal file
46
build/node_modules/cssnano/node_modules/autoprefixer/lib/brackets.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
(function() {
|
||||
var brackets, last;
|
||||
|
||||
last = function(array) {
|
||||
return array[array.length - 1];
|
||||
};
|
||||
|
||||
brackets = {
|
||||
parse: function(str) {
|
||||
var current, j, len, stack, sym;
|
||||
current = [''];
|
||||
stack = [current];
|
||||
for (j = 0, len = str.length; j < len; j++) {
|
||||
sym = str[j];
|
||||
if (sym === '(') {
|
||||
current = [''];
|
||||
last(stack).push(current);
|
||||
stack.push(current);
|
||||
} else if (sym === ')') {
|
||||
stack.pop();
|
||||
current = last(stack);
|
||||
current.push('');
|
||||
} else {
|
||||
current[current.length - 1] += sym;
|
||||
}
|
||||
}
|
||||
return stack[0];
|
||||
},
|
||||
stringify: function(ast) {
|
||||
var i, j, len, result;
|
||||
result = '';
|
||||
for (j = 0, len = ast.length; j < len; j++) {
|
||||
i = ast[j];
|
||||
if (typeof i === 'object') {
|
||||
result += '(' + brackets.stringify(i) + ')';
|
||||
} else {
|
||||
result += i;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = brackets;
|
||||
|
||||
}).call(this);
|
||||
86
build/node_modules/cssnano/node_modules/autoprefixer/lib/browsers.js
generated
vendored
Normal file
86
build/node_modules/cssnano/node_modules/autoprefixer/lib/browsers.js
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
(function() {
|
||||
var Browsers, browserslist, utils;
|
||||
|
||||
browserslist = require('browserslist');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
Browsers = (function() {
|
||||
Browsers.prefixes = function() {
|
||||
var data, i, name;
|
||||
if (this.prefixesCache) {
|
||||
return this.prefixesCache;
|
||||
}
|
||||
data = require('caniuse-db/data.json').agents;
|
||||
return this.prefixesCache = utils.uniq((function() {
|
||||
var results;
|
||||
results = [];
|
||||
for (name in data) {
|
||||
i = data[name];
|
||||
results.push("-" + i.prefix + "-");
|
||||
}
|
||||
return results;
|
||||
})()).sort(function(a, b) {
|
||||
return b.length - a.length;
|
||||
});
|
||||
};
|
||||
|
||||
Browsers.withPrefix = function(value) {
|
||||
if (!this.prefixesRegexp) {
|
||||
this.prefixesRegexp = RegExp("" + (this.prefixes().join('|')));
|
||||
}
|
||||
return this.prefixesRegexp.test(value);
|
||||
};
|
||||
|
||||
function Browsers(data1, requirements, options, stats) {
|
||||
this.data = data1;
|
||||
this.options = options;
|
||||
this.stats = stats;
|
||||
this.selected = this.parse(requirements);
|
||||
}
|
||||
|
||||
Browsers.prototype.parse = function(requirements) {
|
||||
var ref, ref1;
|
||||
return browserslist(requirements, {
|
||||
stats: this.stats,
|
||||
path: (ref = this.options) != null ? ref.from : void 0,
|
||||
env: (ref1 = this.options) != null ? ref1.env : void 0
|
||||
});
|
||||
};
|
||||
|
||||
Browsers.prototype.browsers = function(criteria) {
|
||||
var browser, data, ref, selected, versions;
|
||||
selected = [];
|
||||
ref = this.data;
|
||||
for (browser in ref) {
|
||||
data = ref[browser];
|
||||
versions = criteria(data).map(function(version) {
|
||||
return browser + " " + version;
|
||||
});
|
||||
selected = selected.concat(versions);
|
||||
}
|
||||
return selected;
|
||||
};
|
||||
|
||||
Browsers.prototype.prefix = function(browser) {
|
||||
var data, name, prefix, ref, version;
|
||||
ref = browser.split(' '), name = ref[0], version = ref[1];
|
||||
data = this.data[name];
|
||||
if (data.prefix_exceptions) {
|
||||
prefix = data.prefix_exceptions[version];
|
||||
}
|
||||
prefix || (prefix = data.prefix);
|
||||
return '-' + prefix + '-';
|
||||
};
|
||||
|
||||
Browsers.prototype.isSelected = function(browser) {
|
||||
return this.selected.indexOf(browser) !== -1;
|
||||
};
|
||||
|
||||
return Browsers;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Browsers;
|
||||
|
||||
}).call(this);
|
||||
162
build/node_modules/cssnano/node_modules/autoprefixer/lib/declaration.js
generated
vendored
Normal file
162
build/node_modules/cssnano/node_modules/autoprefixer/lib/declaration.js
generated
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
(function() {
|
||||
var Browsers, Declaration, Prefixer, utils,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Prefixer = require('./prefixer');
|
||||
|
||||
Browsers = require('./browsers');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
Declaration = (function(superClass) {
|
||||
extend(Declaration, superClass);
|
||||
|
||||
function Declaration() {
|
||||
return Declaration.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Declaration.prototype.check = function(decl) {
|
||||
return true;
|
||||
};
|
||||
|
||||
Declaration.prototype.prefixed = function(prop, prefix) {
|
||||
return prefix + prop;
|
||||
};
|
||||
|
||||
Declaration.prototype.normalize = function(prop) {
|
||||
return prop;
|
||||
};
|
||||
|
||||
Declaration.prototype.otherPrefixes = function(value, prefix) {
|
||||
var j, len, other, ref;
|
||||
ref = Browsers.prefixes();
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
other = ref[j];
|
||||
if (other === prefix) {
|
||||
continue;
|
||||
}
|
||||
if (value.indexOf(other) !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
Declaration.prototype.set = function(decl, prefix) {
|
||||
decl.prop = this.prefixed(decl.prop, prefix);
|
||||
return decl;
|
||||
};
|
||||
|
||||
Declaration.prototype.needCascade = function(decl) {
|
||||
return decl._autoprefixerCascade || (decl._autoprefixerCascade = this.all.options.cascade !== false && decl.raw('before').indexOf('\n') !== -1);
|
||||
};
|
||||
|
||||
Declaration.prototype.maxPrefixed = function(prefixes, decl) {
|
||||
var j, len, max, prefix;
|
||||
if (decl._autoprefixerMax) {
|
||||
return decl._autoprefixerMax;
|
||||
}
|
||||
max = 0;
|
||||
for (j = 0, len = prefixes.length; j < len; j++) {
|
||||
prefix = prefixes[j];
|
||||
prefix = utils.removeNote(prefix);
|
||||
if (prefix.length > max) {
|
||||
max = prefix.length;
|
||||
}
|
||||
}
|
||||
return decl._autoprefixerMax = max;
|
||||
};
|
||||
|
||||
Declaration.prototype.calcBefore = function(prefixes, decl, prefix) {
|
||||
var before, diff, i, j, max, ref;
|
||||
if (prefix == null) {
|
||||
prefix = '';
|
||||
}
|
||||
before = decl.raw('before');
|
||||
max = this.maxPrefixed(prefixes, decl);
|
||||
diff = max - utils.removeNote(prefix).length;
|
||||
for (i = j = 0, ref = diff; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
|
||||
before += ' ';
|
||||
}
|
||||
return before;
|
||||
};
|
||||
|
||||
Declaration.prototype.restoreBefore = function(decl) {
|
||||
var lines, min;
|
||||
lines = decl.raw('before').split("\n");
|
||||
min = lines[lines.length - 1];
|
||||
this.all.group(decl).up(function(prefixed) {
|
||||
var array, last;
|
||||
array = prefixed.raw('before').split("\n");
|
||||
last = array[array.length - 1];
|
||||
if (last.length < min.length) {
|
||||
return min = last;
|
||||
}
|
||||
});
|
||||
lines[lines.length - 1] = min;
|
||||
return decl.raws.before = lines.join("\n");
|
||||
};
|
||||
|
||||
Declaration.prototype.insert = function(decl, prefix, prefixes) {
|
||||
var already, cloned;
|
||||
cloned = this.set(this.clone(decl), prefix);
|
||||
if (!cloned) {
|
||||
return;
|
||||
}
|
||||
already = decl.parent.some(function(i) {
|
||||
return i.prop === cloned.prop && i.value === cloned.value;
|
||||
});
|
||||
if (already) {
|
||||
return;
|
||||
}
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
|
||||
}
|
||||
return decl.parent.insertBefore(decl, cloned);
|
||||
};
|
||||
|
||||
Declaration.prototype.isAlready = function(decl, prefixed) {
|
||||
var already;
|
||||
already = this.all.group(decl).up(function(i) {
|
||||
return i.prop === prefixed;
|
||||
});
|
||||
already || (already = this.all.group(decl).down(function(i) {
|
||||
return i.prop === prefixed;
|
||||
}));
|
||||
return already;
|
||||
};
|
||||
|
||||
Declaration.prototype.add = function(decl, prefix, prefixes) {
|
||||
var prefixed;
|
||||
prefixed = this.prefixed(decl.prop, prefix);
|
||||
if (this.isAlready(decl, prefixed) || this.otherPrefixes(decl.value, prefix)) {
|
||||
return;
|
||||
}
|
||||
return this.insert(decl, prefix, prefixes);
|
||||
};
|
||||
|
||||
Declaration.prototype.process = function(decl) {
|
||||
var prefixes;
|
||||
if (this.needCascade(decl)) {
|
||||
prefixes = Declaration.__super__.process.apply(this, arguments);
|
||||
if (prefixes != null ? prefixes.length : void 0) {
|
||||
this.restoreBefore(decl);
|
||||
return decl.raws.before = this.calcBefore(prefixes, decl);
|
||||
}
|
||||
} else {
|
||||
return Declaration.__super__.process.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Declaration.prototype.old = function(prop, prefix) {
|
||||
return [this.prefixed(prop, prefix)];
|
||||
};
|
||||
|
||||
return Declaration;
|
||||
|
||||
})(Prefixer);
|
||||
|
||||
module.exports = Declaration;
|
||||
|
||||
}).call(this);
|
||||
57
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/align-content.js
generated
vendored
Normal file
57
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/align-content.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
(function() {
|
||||
var AlignContent, Declaration, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
AlignContent = (function(superClass) {
|
||||
extend(AlignContent, superClass);
|
||||
|
||||
function AlignContent() {
|
||||
return AlignContent.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
AlignContent.names = ['align-content', 'flex-line-pack'];
|
||||
|
||||
AlignContent.oldValues = {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start',
|
||||
'space-between': 'justify',
|
||||
'space-around': 'distribute'
|
||||
};
|
||||
|
||||
AlignContent.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-line-pack';
|
||||
} else {
|
||||
return AlignContent.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
AlignContent.prototype.normalize = function(prop) {
|
||||
return 'align-content';
|
||||
};
|
||||
|
||||
AlignContent.prototype.set = function(decl, prefix) {
|
||||
var spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2012) {
|
||||
decl.value = AlignContent.oldValues[decl.value] || decl.value;
|
||||
return AlignContent.__super__.set.call(this, decl, prefix);
|
||||
} else if (spec === 'final') {
|
||||
return AlignContent.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return AlignContent;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = AlignContent;
|
||||
|
||||
}).call(this);
|
||||
57
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/align-items.js
generated
vendored
Normal file
57
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/align-items.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
(function() {
|
||||
var AlignItems, Declaration, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
AlignItems = (function(superClass) {
|
||||
extend(AlignItems, superClass);
|
||||
|
||||
function AlignItems() {
|
||||
return AlignItems.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
AlignItems.names = ['align-items', 'flex-align', 'box-align'];
|
||||
|
||||
AlignItems.oldValues = {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start'
|
||||
};
|
||||
|
||||
AlignItems.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-align';
|
||||
} else if (spec === 2012) {
|
||||
return prefix + 'flex-align';
|
||||
} else {
|
||||
return AlignItems.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
AlignItems.prototype.normalize = function(prop) {
|
||||
return 'align-items';
|
||||
};
|
||||
|
||||
AlignItems.prototype.set = function(decl, prefix) {
|
||||
var spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009 || spec === 2012) {
|
||||
decl.value = AlignItems.oldValues[decl.value] || decl.value;
|
||||
return AlignItems.__super__.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return AlignItems.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return AlignItems;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = AlignItems;
|
||||
|
||||
}).call(this);
|
||||
55
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/align-self.js
generated
vendored
Normal file
55
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/align-self.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
(function() {
|
||||
var AlignSelf, Declaration, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
AlignSelf = (function(superClass) {
|
||||
extend(AlignSelf, superClass);
|
||||
|
||||
function AlignSelf() {
|
||||
return AlignSelf.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
AlignSelf.names = ['align-self', 'flex-item-align'];
|
||||
|
||||
AlignSelf.oldValues = {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start'
|
||||
};
|
||||
|
||||
AlignSelf.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-item-align';
|
||||
} else {
|
||||
return AlignSelf.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
AlignSelf.prototype.normalize = function(prop) {
|
||||
return 'align-self';
|
||||
};
|
||||
|
||||
AlignSelf.prototype.set = function(decl, prefix) {
|
||||
var spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2012) {
|
||||
decl.value = AlignSelf.oldValues[decl.value] || decl.value;
|
||||
return AlignSelf.__super__.set.call(this, decl, prefix);
|
||||
} else if (spec === 'final') {
|
||||
return AlignSelf.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return AlignSelf;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = AlignSelf;
|
||||
|
||||
}).call(this);
|
||||
32
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/background-size.js
generated
vendored
Normal file
32
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/background-size.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
(function() {
|
||||
var BackgroundSize, Declaration,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BackgroundSize = (function(superClass) {
|
||||
extend(BackgroundSize, superClass);
|
||||
|
||||
function BackgroundSize() {
|
||||
return BackgroundSize.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
BackgroundSize.names = ['background-size'];
|
||||
|
||||
BackgroundSize.prototype.set = function(decl, prefix) {
|
||||
var value;
|
||||
value = decl.value.toLowerCase();
|
||||
if (prefix === '-webkit-' && value.indexOf(' ') === -1 && value !== 'contain' && value !== 'cover') {
|
||||
decl.value = decl.value + ' ' + decl.value;
|
||||
}
|
||||
return BackgroundSize.__super__.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return BackgroundSize;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = BackgroundSize;
|
||||
|
||||
}).call(this);
|
||||
35
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/block-logical.js
generated
vendored
Normal file
35
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/block-logical.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
(function() {
|
||||
var BlockLogical, Declaration,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BlockLogical = (function(superClass) {
|
||||
extend(BlockLogical, superClass);
|
||||
|
||||
function BlockLogical() {
|
||||
return BlockLogical.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
BlockLogical.names = ['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', 'border-before', 'border-after', 'margin-before', 'margin-after', 'padding-before', 'padding-after'];
|
||||
|
||||
BlockLogical.prototype.prefixed = function(prop, prefix) {
|
||||
return prefix + (prop.indexOf('-start') !== -1 ? prop.replace('-block-start', '-before') : prop.replace('-block-end', '-after'));
|
||||
};
|
||||
|
||||
BlockLogical.prototype.normalize = function(prop) {
|
||||
if (prop.indexOf('-before') !== -1) {
|
||||
return prop.replace('-before', '-block-start');
|
||||
} else {
|
||||
return prop.replace('-after', '-block-end');
|
||||
}
|
||||
};
|
||||
|
||||
return BlockLogical;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = BlockLogical;
|
||||
|
||||
}).call(this);
|
||||
28
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/border-image.js
generated
vendored
Normal file
28
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/border-image.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
(function() {
|
||||
var BorderImage, Declaration,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BorderImage = (function(superClass) {
|
||||
extend(BorderImage, superClass);
|
||||
|
||||
function BorderImage() {
|
||||
return BorderImage.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
BorderImage.names = ['border-image'];
|
||||
|
||||
BorderImage.prototype.set = function(decl, prefix) {
|
||||
decl.value = decl.value.replace(/\s+fill(\s)/, '$1');
|
||||
return BorderImage.__super__.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return BorderImage;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = BorderImage;
|
||||
|
||||
}).call(this);
|
||||
56
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/border-radius.js
generated
vendored
Normal file
56
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/border-radius.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
(function() {
|
||||
var BorderRadius, Declaration,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BorderRadius = (function(superClass) {
|
||||
var hor, i, j, len, len1, mozilla, normal, ref, ref1, ver;
|
||||
|
||||
extend(BorderRadius, superClass);
|
||||
|
||||
function BorderRadius() {
|
||||
return BorderRadius.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
BorderRadius.names = ['border-radius'];
|
||||
|
||||
BorderRadius.toMozilla = {};
|
||||
|
||||
BorderRadius.toNormal = {};
|
||||
|
||||
ref = ['top', 'bottom'];
|
||||
for (i = 0, len = ref.length; i < len; i++) {
|
||||
ver = ref[i];
|
||||
ref1 = ['left', 'right'];
|
||||
for (j = 0, len1 = ref1.length; j < len1; j++) {
|
||||
hor = ref1[j];
|
||||
normal = "border-" + ver + "-" + hor + "-radius";
|
||||
mozilla = "border-radius-" + ver + hor;
|
||||
BorderRadius.names.push(normal);
|
||||
BorderRadius.names.push(mozilla);
|
||||
BorderRadius.toMozilla[normal] = mozilla;
|
||||
BorderRadius.toNormal[mozilla] = normal;
|
||||
}
|
||||
}
|
||||
|
||||
BorderRadius.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-moz-') {
|
||||
return prefix + (BorderRadius.toMozilla[prop] || prop);
|
||||
} else {
|
||||
return BorderRadius.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
BorderRadius.prototype.normalize = function(prop) {
|
||||
return BorderRadius.toNormal[prop] || prop;
|
||||
};
|
||||
|
||||
return BorderRadius;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = BorderRadius;
|
||||
|
||||
}).call(this);
|
||||
64
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/break-props.js
generated
vendored
Normal file
64
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/break-props.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
(function() {
|
||||
var BreakProps, Declaration,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BreakProps = (function(superClass) {
|
||||
extend(BreakProps, superClass);
|
||||
|
||||
function BreakProps() {
|
||||
return BreakProps.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
BreakProps.names = ['break-inside', 'page-break-inside', 'column-break-inside', 'break-before', 'page-break-before', 'column-break-before', 'break-after', 'page-break-after', 'column-break-after'];
|
||||
|
||||
BreakProps.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return '-webkit-column-' + prop;
|
||||
} else if (prefix === '-moz-') {
|
||||
return 'page-' + prop;
|
||||
} else {
|
||||
return BreakProps.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
BreakProps.prototype.normalize = function(prop) {
|
||||
if (prop.indexOf('inside') !== -1) {
|
||||
return 'break-inside';
|
||||
} else if (prop.indexOf('before') !== -1) {
|
||||
return 'break-before';
|
||||
} else if (prop.indexOf('after') !== -1) {
|
||||
return 'break-after';
|
||||
}
|
||||
};
|
||||
|
||||
BreakProps.prototype.set = function(decl, prefix) {
|
||||
var v;
|
||||
v = decl.value;
|
||||
if (decl.prop === 'break-inside' && v === 'avoid-column' || v === 'avoid-page') {
|
||||
decl.value = 'avoid';
|
||||
}
|
||||
return BreakProps.__super__.set.apply(this, arguments);
|
||||
};
|
||||
|
||||
BreakProps.prototype.insert = function(decl, prefix, prefixes) {
|
||||
if (decl.prop !== 'break-inside') {
|
||||
return BreakProps.__super__.insert.apply(this, arguments);
|
||||
} else if (decl.value === 'avoid-region') {
|
||||
|
||||
} else if (decl.value === 'avoid-page' && prefix === '-webkit-') {
|
||||
|
||||
} else {
|
||||
return BreakProps.__super__.insert.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return BreakProps;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = BreakProps;
|
||||
|
||||
}).call(this);
|
||||
53
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/cross-fade.js
generated
vendored
Normal file
53
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/cross-fade.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
(function() {
|
||||
var CrossFade, OldValue, Value, list, utils,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
utils = require('../utils');
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
CrossFade = (function(superClass) {
|
||||
extend(CrossFade, superClass);
|
||||
|
||||
function CrossFade() {
|
||||
return CrossFade.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
CrossFade.names = ['cross-fade'];
|
||||
|
||||
CrossFade.prototype.replace = function(string, prefix) {
|
||||
return list.space(string).map((function(_this) {
|
||||
return function(value) {
|
||||
var after, args, close, match;
|
||||
if (value.slice(0, +_this.name.length + 1 || 9e9) !== _this.name + '(') {
|
||||
return value;
|
||||
}
|
||||
close = value.lastIndexOf(')');
|
||||
after = value.slice(close + 1);
|
||||
args = value.slice(_this.name.length + 1, +(close - 1) + 1 || 9e9);
|
||||
if (prefix === '-webkit-') {
|
||||
match = args.match(/\d*.?\d+%?/);
|
||||
if (match) {
|
||||
args = args.slice(match[0].length).trim();
|
||||
args += ', ' + match[0];
|
||||
} else {
|
||||
args += ', 0.5';
|
||||
}
|
||||
}
|
||||
return prefix + _this.name + '(' + args + ')' + after;
|
||||
};
|
||||
})(this)).join(' ');
|
||||
};
|
||||
|
||||
return CrossFade;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = CrossFade;
|
||||
|
||||
}).call(this);
|
||||
52
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/display-flex.js
generated
vendored
Normal file
52
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/display-flex.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
(function() {
|
||||
var DisplayFlex, OldValue, Value, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
DisplayFlex = (function(superClass) {
|
||||
extend(DisplayFlex, superClass);
|
||||
|
||||
DisplayFlex.names = ['display-flex', 'inline-flex'];
|
||||
|
||||
function DisplayFlex(name, prefixes) {
|
||||
DisplayFlex.__super__.constructor.apply(this, arguments);
|
||||
if (name === 'display-flex') {
|
||||
this.name = 'flex';
|
||||
}
|
||||
}
|
||||
|
||||
DisplayFlex.prototype.check = function(decl) {
|
||||
return decl.prop === 'display' && decl.value === this.name;
|
||||
};
|
||||
|
||||
DisplayFlex.prototype.prefixed = function(prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
return prefix + (spec === 2009 ? this.name === 'flex' ? 'box' : 'inline-box' : spec === 2012 ? this.name === 'flex' ? 'flexbox' : 'inline-flexbox' : spec === 'final' ? this.name : void 0);
|
||||
};
|
||||
|
||||
DisplayFlex.prototype.replace = function(string, prefix) {
|
||||
return this.prefixed(prefix);
|
||||
};
|
||||
|
||||
DisplayFlex.prototype.old = function(prefix) {
|
||||
var prefixed;
|
||||
prefixed = this.prefixed(prefix);
|
||||
if (prefixed) {
|
||||
return new OldValue(this.name, prefixed);
|
||||
}
|
||||
};
|
||||
|
||||
return DisplayFlex;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = DisplayFlex;
|
||||
|
||||
}).call(this);
|
||||
34
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/display-grid.js
generated
vendored
Normal file
34
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/display-grid.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
(function() {
|
||||
var DisplayGrid, OldValue, Value, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
DisplayGrid = (function(superClass) {
|
||||
extend(DisplayGrid, superClass);
|
||||
|
||||
DisplayGrid.names = ['display-grid', 'inline-grid'];
|
||||
|
||||
function DisplayGrid(name, prefixes) {
|
||||
DisplayGrid.__super__.constructor.apply(this, arguments);
|
||||
if (name === 'display-grid') {
|
||||
this.name = 'grid';
|
||||
}
|
||||
}
|
||||
|
||||
DisplayGrid.prototype.check = function(decl) {
|
||||
return decl.prop === 'display' && decl.value === this.name;
|
||||
};
|
||||
|
||||
return DisplayGrid;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = DisplayGrid;
|
||||
|
||||
}).call(this);
|
||||
72
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/filter-value.js
generated
vendored
Normal file
72
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/filter-value.js
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
(function() {
|
||||
var FilterValue, OldFilterValue, OldValue, Value, utils,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
utils = require('../utils');
|
||||
|
||||
OldFilterValue = (function(superClass) {
|
||||
extend(OldFilterValue, superClass);
|
||||
|
||||
function OldFilterValue() {
|
||||
return OldFilterValue.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
OldFilterValue.prototype.clean = function(decl) {
|
||||
return decl.value = utils.editList(decl.value, (function(_this) {
|
||||
return function(props) {
|
||||
if (props.every(function(i) {
|
||||
return i.indexOf(_this.unprefixed) !== 0;
|
||||
})) {
|
||||
return props;
|
||||
}
|
||||
return props.filter(function(i) {
|
||||
return i.indexOf(_this.prefixed) === -1;
|
||||
});
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
return OldFilterValue;
|
||||
|
||||
})(OldValue);
|
||||
|
||||
FilterValue = (function(superClass) {
|
||||
extend(FilterValue, superClass);
|
||||
|
||||
FilterValue.names = ['filter', 'filter-function'];
|
||||
|
||||
function FilterValue(name, prefixes) {
|
||||
FilterValue.__super__.constructor.apply(this, arguments);
|
||||
if (name === 'filter-function') {
|
||||
this.name = 'filter';
|
||||
}
|
||||
}
|
||||
|
||||
FilterValue.prototype.replace = function(value, prefix) {
|
||||
if (prefix === '-webkit-' && value.indexOf('filter(') === -1) {
|
||||
if (value.indexOf('-webkit-filter') === -1) {
|
||||
return FilterValue.__super__.replace.apply(this, arguments) + ', ' + value;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
} else {
|
||||
return FilterValue.__super__.replace.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
FilterValue.prototype.old = function(prefix) {
|
||||
return new OldFilterValue(this.name, prefix + this.name);
|
||||
};
|
||||
|
||||
return FilterValue;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = FilterValue;
|
||||
|
||||
}).call(this);
|
||||
29
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/filter.js
generated
vendored
Normal file
29
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/filter.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
(function() {
|
||||
var Declaration, Filter,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
Filter = (function(superClass) {
|
||||
extend(Filter, superClass);
|
||||
|
||||
function Filter() {
|
||||
return Filter.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Filter.names = ['filter'];
|
||||
|
||||
Filter.prototype.check = function(decl) {
|
||||
var v;
|
||||
v = decl.value;
|
||||
return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1 && v.indexOf('data:image/svg+xml') === -1;
|
||||
};
|
||||
|
||||
return Filter;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = Filter;
|
||||
|
||||
}).call(this);
|
||||
47
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-basis.js
generated
vendored
Normal file
47
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-basis.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
(function() {
|
||||
var Declaration, FlexBasis, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexBasis = (function(superClass) {
|
||||
extend(FlexBasis, superClass);
|
||||
|
||||
function FlexBasis() {
|
||||
return FlexBasis.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexBasis.names = ['flex-basis', 'flex-preferred-size'];
|
||||
|
||||
FlexBasis.prototype.normalize = function() {
|
||||
return 'flex-basis';
|
||||
};
|
||||
|
||||
FlexBasis.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-preferred-size';
|
||||
} else {
|
||||
return FlexBasis.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
FlexBasis.prototype.set = function(decl, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012 || spec === 'final') {
|
||||
return FlexBasis.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexBasis;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = FlexBasis;
|
||||
|
||||
}).call(this);
|
||||
71
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-direction.js
generated
vendored
Normal file
71
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-direction.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
(function() {
|
||||
var Declaration, FlexDirection, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexDirection = (function(superClass) {
|
||||
extend(FlexDirection, superClass);
|
||||
|
||||
function FlexDirection() {
|
||||
return FlexDirection.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexDirection.names = ['flex-direction', 'box-direction', 'box-orient'];
|
||||
|
||||
FlexDirection.prototype.normalize = function(prop) {
|
||||
return 'flex-direction';
|
||||
};
|
||||
|
||||
FlexDirection.prototype.insert = function(decl, prefix, prefixes) {
|
||||
var already, cloned, dir, orient, ref, spec, value;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec !== 2009) {
|
||||
return FlexDirection.__super__.insert.apply(this, arguments);
|
||||
} else {
|
||||
already = decl.parent.some(function(i) {
|
||||
return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
|
||||
});
|
||||
if (already) {
|
||||
return;
|
||||
}
|
||||
value = decl.value;
|
||||
orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
|
||||
dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
|
||||
cloned = this.clone(decl);
|
||||
cloned.prop = prefix + 'box-orient';
|
||||
cloned.value = orient;
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
|
||||
}
|
||||
decl.parent.insertBefore(decl, cloned);
|
||||
cloned = this.clone(decl);
|
||||
cloned.prop = prefix + 'box-direction';
|
||||
cloned.value = dir;
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
|
||||
}
|
||||
return decl.parent.insertBefore(decl, cloned);
|
||||
}
|
||||
};
|
||||
|
||||
FlexDirection.prototype.old = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
return [prefix + 'box-orient', prefix + 'box-direction'];
|
||||
} else {
|
||||
return FlexDirection.__super__.old.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexDirection;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = FlexDirection;
|
||||
|
||||
}).call(this);
|
||||
63
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-flow.js
generated
vendored
Normal file
63
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-flow.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
(function() {
|
||||
var Declaration, FlexFlow, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexFlow = (function(superClass) {
|
||||
extend(FlexFlow, superClass);
|
||||
|
||||
function FlexFlow() {
|
||||
return FlexFlow.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexFlow.names = ['flex-flow', 'box-direction', 'box-orient'];
|
||||
|
||||
FlexFlow.prototype.insert = function(decl, prefix, prefixes) {
|
||||
var already, cloned, dir, orient, ref, spec, value, values;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec !== 2009) {
|
||||
return FlexFlow.__super__.insert.apply(this, arguments);
|
||||
} else {
|
||||
values = decl.value.split(/\s+/).filter(function(i) {
|
||||
return i !== 'wrap' && i !== 'nowrap' && 'wrap-reverse';
|
||||
});
|
||||
if (values.length === 0) {
|
||||
return;
|
||||
}
|
||||
already = decl.parent.some(function(i) {
|
||||
return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
|
||||
});
|
||||
if (already) {
|
||||
return;
|
||||
}
|
||||
value = values[0];
|
||||
orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
|
||||
dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
|
||||
cloned = this.clone(decl);
|
||||
cloned.prop = prefix + 'box-orient';
|
||||
cloned.value = orient;
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
|
||||
}
|
||||
decl.parent.insertBefore(decl, cloned);
|
||||
cloned = this.clone(decl);
|
||||
cloned.prop = prefix + 'box-direction';
|
||||
cloned.value = dir;
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
|
||||
}
|
||||
return decl.parent.insertBefore(decl, cloned);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexFlow;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = FlexFlow;
|
||||
|
||||
}).call(this);
|
||||
41
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-grow.js
generated
vendored
Normal file
41
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-grow.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
(function() {
|
||||
var Declaration, Flex, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
Flex = (function(superClass) {
|
||||
extend(Flex, superClass);
|
||||
|
||||
function Flex() {
|
||||
return Flex.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Flex.names = ['flex-grow', 'flex-positive'];
|
||||
|
||||
Flex.prototype.normalize = function() {
|
||||
return 'flex';
|
||||
};
|
||||
|
||||
Flex.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-flex';
|
||||
} else if (spec === 2012) {
|
||||
return prefix + 'flex-positive';
|
||||
} else {
|
||||
return Flex.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Flex;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = Flex;
|
||||
|
||||
}).call(this);
|
||||
47
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-shrink.js
generated
vendored
Normal file
47
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-shrink.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
(function() {
|
||||
var Declaration, FlexShrink, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexShrink = (function(superClass) {
|
||||
extend(FlexShrink, superClass);
|
||||
|
||||
function FlexShrink() {
|
||||
return FlexShrink.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexShrink.names = ['flex-shrink', 'flex-negative'];
|
||||
|
||||
FlexShrink.prototype.normalize = function() {
|
||||
return 'flex-shrink';
|
||||
};
|
||||
|
||||
FlexShrink.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-negative';
|
||||
} else {
|
||||
return FlexShrink.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
FlexShrink.prototype.set = function(decl, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012 || spec === 'final') {
|
||||
return FlexShrink.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexShrink;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = FlexShrink;
|
||||
|
||||
}).call(this);
|
||||
11
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-spec.js
generated
vendored
Normal file
11
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-spec.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
(function() {
|
||||
module.exports = function(prefix) {
|
||||
var spec;
|
||||
spec = prefix === '-webkit- 2009' || prefix === '-moz-' ? 2009 : prefix === '-ms-' ? 2012 : prefix === '-webkit-' ? 'final' : void 0;
|
||||
if (prefix === '-webkit- 2009') {
|
||||
prefix = '-webkit-';
|
||||
}
|
||||
return [spec, prefix];
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
37
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-values.js
generated
vendored
Normal file
37
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-values.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
(function() {
|
||||
var FlexValues, OldValue, Value,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
FlexValues = (function(superClass) {
|
||||
extend(FlexValues, superClass);
|
||||
|
||||
function FlexValues() {
|
||||
return FlexValues.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexValues.names = ['flex', 'flex-grow', 'flex-shrink', 'flex-basis'];
|
||||
|
||||
FlexValues.prototype.prefixed = function(prefix) {
|
||||
return this.all.prefixed(this.name, prefix);
|
||||
};
|
||||
|
||||
FlexValues.prototype.replace = function(string, prefix) {
|
||||
return string.replace(this.regexp(), '$1' + this.prefixed(prefix) + '$3');
|
||||
};
|
||||
|
||||
FlexValues.prototype.old = function(prefix) {
|
||||
return new OldValue(this.name, this.prefixed(prefix));
|
||||
};
|
||||
|
||||
return FlexValues;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = FlexValues;
|
||||
|
||||
}).call(this);
|
||||
33
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-wrap.js
generated
vendored
Normal file
33
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex-wrap.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
(function() {
|
||||
var Declaration, FlexWrap, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexWrap = (function(superClass) {
|
||||
extend(FlexWrap, superClass);
|
||||
|
||||
function FlexWrap() {
|
||||
return FlexWrap.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexWrap.names = ['flex-wrap'];
|
||||
|
||||
FlexWrap.prototype.set = function(decl, prefix) {
|
||||
var spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec !== 2009) {
|
||||
return FlexWrap.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexWrap;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = FlexWrap;
|
||||
|
||||
}).call(this);
|
||||
64
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex.js
generated
vendored
Normal file
64
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/flex.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
(function() {
|
||||
var Declaration, Flex, flexSpec, list,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
Flex = (function(superClass) {
|
||||
extend(Flex, superClass);
|
||||
|
||||
function Flex() {
|
||||
return Flex.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Flex.names = ['flex', 'box-flex'];
|
||||
|
||||
Flex.oldValues = {
|
||||
'auto': '1',
|
||||
'none': '0'
|
||||
};
|
||||
|
||||
Flex.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-flex';
|
||||
} else {
|
||||
return Flex.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Flex.prototype.normalize = function() {
|
||||
return 'flex';
|
||||
};
|
||||
|
||||
Flex.prototype.set = function(decl, prefix) {
|
||||
var components, spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009) {
|
||||
decl.value = list.space(decl.value)[0];
|
||||
decl.value = Flex.oldValues[decl.value] || decl.value;
|
||||
return Flex.__super__.set.call(this, decl, prefix);
|
||||
} else if (spec === 2012) {
|
||||
components = list.space(decl.value);
|
||||
if (components.length === 3 && components[2] === '0') {
|
||||
decl.value = components.slice(0, 2).concat('0px').join(' ');
|
||||
}
|
||||
return Flex.__super__.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return Flex.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Flex;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = Flex;
|
||||
|
||||
}).call(this);
|
||||
33
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/fullscreen.js
generated
vendored
Normal file
33
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/fullscreen.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
(function() {
|
||||
var Fullscreen, Selector,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Selector = require('../selector');
|
||||
|
||||
Fullscreen = (function(superClass) {
|
||||
extend(Fullscreen, superClass);
|
||||
|
||||
function Fullscreen() {
|
||||
return Fullscreen.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Fullscreen.names = [':fullscreen'];
|
||||
|
||||
Fullscreen.prototype.prefixed = function(prefix) {
|
||||
if ('-webkit-' === prefix) {
|
||||
return ':-webkit-full-screen';
|
||||
} else if ('-moz-' === prefix) {
|
||||
return ':-moz-full-screen';
|
||||
} else {
|
||||
return ":" + prefix + "fullscreen";
|
||||
}
|
||||
};
|
||||
|
||||
return Fullscreen;
|
||||
|
||||
})(Selector);
|
||||
|
||||
module.exports = Fullscreen;
|
||||
|
||||
}).call(this);
|
||||
368
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/gradient.js
generated
vendored
Normal file
368
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/gradient.js
generated
vendored
Normal file
@@ -0,0 +1,368 @@
|
||||
(function() {
|
||||
var Gradient, OldValue, Value, isDirection, list, parser, range, utils,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty,
|
||||
slice = [].slice;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
utils = require('../utils');
|
||||
|
||||
parser = require('postcss-value-parser');
|
||||
|
||||
range = require('normalize-range');
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
isDirection = /top|left|right|bottom/gi;
|
||||
|
||||
Gradient = (function(superClass) {
|
||||
extend(Gradient, superClass);
|
||||
|
||||
function Gradient() {
|
||||
return Gradient.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Gradient.names = ['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'];
|
||||
|
||||
Gradient.prototype.replace = function(string, prefix) {
|
||||
var ast, changes, j, len, node, ref;
|
||||
ast = parser(string);
|
||||
ref = ast.nodes;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
node = ref[j];
|
||||
if (node.type === 'function' && node.value === this.name) {
|
||||
node.nodes = this.newDirection(node.nodes);
|
||||
node.nodes = this.normalize(node.nodes);
|
||||
if (prefix === '-webkit- old') {
|
||||
changes = this.oldWebkit(node);
|
||||
if (!changes) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
node.nodes = this.convertDirection(node.nodes);
|
||||
node.value = prefix + node.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ast.toString();
|
||||
};
|
||||
|
||||
Gradient.prototype.directions = {
|
||||
top: 'bottom',
|
||||
left: 'right',
|
||||
bottom: 'top',
|
||||
right: 'left'
|
||||
};
|
||||
|
||||
Gradient.prototype.oldDirections = {
|
||||
'top': 'left bottom, left top',
|
||||
'left': 'right top, left top',
|
||||
'bottom': 'left top, left bottom',
|
||||
'right': 'left top, right top',
|
||||
'top right': 'left bottom, right top',
|
||||
'top left': 'right bottom, left top',
|
||||
'right top': 'left bottom, right top',
|
||||
'right bottom': 'left top, right bottom',
|
||||
'bottom right': 'left top, right bottom',
|
||||
'bottom left': 'right top, left bottom',
|
||||
'left top': 'right bottom, left top',
|
||||
'left bottom': 'right top, left bottom'
|
||||
};
|
||||
|
||||
Gradient.prototype.replaceFirst = function() {
|
||||
var params, prefix, words;
|
||||
params = arguments[0], words = 2 <= arguments.length ? slice.call(arguments, 1) : [];
|
||||
prefix = words.map(function(i) {
|
||||
if (i === ' ') {
|
||||
return {
|
||||
type: 'space',
|
||||
value: i
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
type: 'word',
|
||||
value: i
|
||||
};
|
||||
}
|
||||
});
|
||||
return prefix.concat(params.slice(1));
|
||||
};
|
||||
|
||||
Gradient.prototype.normalizeUnit = function(str, full) {
|
||||
var deg, num;
|
||||
num = parseFloat(str);
|
||||
deg = (num / full) * 360;
|
||||
return deg + "deg";
|
||||
};
|
||||
|
||||
Gradient.prototype.normalize = function(nodes) {
|
||||
var num;
|
||||
if (!nodes[0]) {
|
||||
return nodes;
|
||||
}
|
||||
if (/-?\d+(.\d+)?grad/.test(nodes[0].value)) {
|
||||
nodes[0].value = this.normalizeUnit(nodes[0].value, 400);
|
||||
} else if (/-?\d+(.\d+)?rad/.test(nodes[0].value)) {
|
||||
nodes[0].value = this.normalizeUnit(nodes[0].value, 2 * Math.PI);
|
||||
} else if (/-?\d+(.\d+)?turn/.test(nodes[0].value)) {
|
||||
nodes[0].value = this.normalizeUnit(nodes[0].value, 1);
|
||||
} else if (nodes[0].value.indexOf('deg') !== -1) {
|
||||
num = parseFloat(nodes[0].value);
|
||||
num = range.wrap(0, 360, num);
|
||||
nodes[0].value = num + "deg";
|
||||
}
|
||||
if (nodes[0].value === '0deg') {
|
||||
nodes = this.replaceFirst(nodes, 'to', ' ', 'top');
|
||||
} else if (nodes[0].value === '90deg') {
|
||||
nodes = this.replaceFirst(nodes, 'to', ' ', 'right');
|
||||
} else if (nodes[0].value === '180deg') {
|
||||
nodes = this.replaceFirst(nodes, 'to', ' ', 'bottom');
|
||||
} else if (nodes[0].value === '270deg') {
|
||||
nodes = this.replaceFirst(nodes, 'to', ' ', 'left');
|
||||
}
|
||||
return nodes;
|
||||
};
|
||||
|
||||
Gradient.prototype.newDirection = function(params) {
|
||||
var i, j, ref;
|
||||
if (params[0].value === 'to') {
|
||||
return params;
|
||||
}
|
||||
if (!isDirection.test(params[0].value)) {
|
||||
return params;
|
||||
}
|
||||
params.unshift({
|
||||
type: 'word',
|
||||
value: 'to'
|
||||
}, {
|
||||
type: 'space',
|
||||
value: ' '
|
||||
});
|
||||
for (i = j = 2, ref = params.length; 2 <= ref ? j < ref : j > ref; i = 2 <= ref ? ++j : --j) {
|
||||
if (params[i].type === 'div') {
|
||||
break;
|
||||
}
|
||||
if (params[i].type === 'word') {
|
||||
params[i].value = this.revertDirection(params[i].value);
|
||||
}
|
||||
}
|
||||
return params;
|
||||
};
|
||||
|
||||
Gradient.prototype.convertDirection = function(params) {
|
||||
if (params.length > 0) {
|
||||
if (params[0].value === 'to') {
|
||||
this.fixDirection(params);
|
||||
} else if (params[0].value.indexOf('deg') !== -1) {
|
||||
this.fixAngle(params);
|
||||
} else if (params[2].value === 'at') {
|
||||
this.fixRadial(params);
|
||||
}
|
||||
}
|
||||
return params;
|
||||
};
|
||||
|
||||
Gradient.prototype.fixDirection = function(params) {
|
||||
var i, j, ref, results;
|
||||
params.splice(0, 2);
|
||||
results = [];
|
||||
for (i = j = 0, ref = params.length; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
|
||||
if (params[i].type === 'div') {
|
||||
break;
|
||||
}
|
||||
if (params[i].type === 'word') {
|
||||
results.push(params[i].value = this.revertDirection(params[i].value));
|
||||
} else {
|
||||
results.push(void 0);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
Gradient.prototype.fixAngle = function(params) {
|
||||
var first;
|
||||
first = params[0].value;
|
||||
first = parseFloat(first);
|
||||
first = Math.abs(450 - first) % 360;
|
||||
first = this.roundFloat(first, 3);
|
||||
return params[0].value = first + "deg";
|
||||
};
|
||||
|
||||
Gradient.prototype.fixRadial = function(params) {
|
||||
var first, i, j, ref, second;
|
||||
first = params[0];
|
||||
second = [];
|
||||
for (i = j = 4, ref = params.length; 4 <= ref ? j < ref : j > ref; i = 4 <= ref ? ++j : --j) {
|
||||
if (params[i].type === 'div') {
|
||||
break;
|
||||
} else {
|
||||
second.push(params[i]);
|
||||
}
|
||||
}
|
||||
return params.splice.apply(params, [0, i].concat(slice.call(second), [params[i + 2]], [first]));
|
||||
};
|
||||
|
||||
Gradient.prototype.revertDirection = function(word) {
|
||||
return this.directions[word.toLowerCase()] || word;
|
||||
};
|
||||
|
||||
Gradient.prototype.roundFloat = function(float, digits) {
|
||||
return parseFloat(float.toFixed(digits));
|
||||
};
|
||||
|
||||
Gradient.prototype.oldWebkit = function(node) {
|
||||
var i, j, k, len, len1, nodes, param, params, string;
|
||||
nodes = node.nodes;
|
||||
string = parser.stringify(node.nodes);
|
||||
if (this.name !== 'linear-gradient') {
|
||||
return false;
|
||||
}
|
||||
if (nodes[0] && nodes[0].value.indexOf('deg') !== -1) {
|
||||
return false;
|
||||
}
|
||||
if (string.indexOf('px') !== -1) {
|
||||
return false;
|
||||
}
|
||||
if (string.indexOf('-corner') !== -1) {
|
||||
return false;
|
||||
}
|
||||
if (string.indexOf('-side') !== -1) {
|
||||
return false;
|
||||
}
|
||||
params = [[]];
|
||||
for (j = 0, len = nodes.length; j < len; j++) {
|
||||
i = nodes[j];
|
||||
params[params.length - 1].push(i);
|
||||
if (i.type === 'div' && i.value === ',') {
|
||||
params.push([]);
|
||||
}
|
||||
}
|
||||
this.oldDirection(params);
|
||||
this.colorStops(params);
|
||||
node.nodes = [];
|
||||
for (k = 0, len1 = params.length; k < len1; k++) {
|
||||
param = params[k];
|
||||
node.nodes = node.nodes.concat(param);
|
||||
}
|
||||
node.nodes.unshift({
|
||||
type: 'word',
|
||||
value: 'linear'
|
||||
}, this.cloneDiv(node.nodes));
|
||||
node.value = '-webkit-gradient';
|
||||
return true;
|
||||
};
|
||||
|
||||
Gradient.prototype.oldDirection = function(params) {
|
||||
var div, j, len, node, old, ref, words;
|
||||
div = this.cloneDiv(params[0]);
|
||||
if (params[0][0].value !== 'to') {
|
||||
return params.unshift([
|
||||
{
|
||||
type: 'word',
|
||||
value: this.oldDirections.bottom
|
||||
}, div
|
||||
]);
|
||||
} else {
|
||||
words = [];
|
||||
ref = params[0].slice(2);
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
node = ref[j];
|
||||
if (node.type === 'word') {
|
||||
words.push(node.value.toLowerCase());
|
||||
}
|
||||
}
|
||||
words = words.join(' ');
|
||||
old = this.oldDirections[words] || words;
|
||||
return params[0] = [
|
||||
{
|
||||
type: 'word',
|
||||
value: old
|
||||
}, div
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
Gradient.prototype.cloneDiv = function(params) {
|
||||
var i, j, len;
|
||||
for (j = 0, len = params.length; j < len; j++) {
|
||||
i = params[j];
|
||||
if (i.type === 'div' && i.value === ',') {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return {
|
||||
type: 'div',
|
||||
value: ',',
|
||||
after: ' '
|
||||
};
|
||||
};
|
||||
|
||||
Gradient.prototype.colorStops = function(params) {
|
||||
var color, div, i, j, len, param, pos, results, stop;
|
||||
results = [];
|
||||
for (i = j = 0, len = params.length; j < len; i = ++j) {
|
||||
param = params[i];
|
||||
if (i === 0) {
|
||||
continue;
|
||||
}
|
||||
color = parser.stringify(param[0]);
|
||||
if (param[1] && param[1].type === 'word') {
|
||||
pos = param[1].value;
|
||||
} else if (param[2] && param[2].type === 'word') {
|
||||
pos = param[2].value;
|
||||
}
|
||||
stop = i === 1 && (!pos || pos === '0%') ? "from(" + color + ")" : i === params.length - 1 && (!pos || pos === '100%') ? "to(" + color + ")" : pos ? "color-stop(" + pos + ", " + color + ")" : "color-stop(" + color + ")";
|
||||
div = param[param.length - 1];
|
||||
params[i] = [
|
||||
{
|
||||
type: 'word',
|
||||
value: stop
|
||||
}
|
||||
];
|
||||
if (div.type === 'div' && div.value === ',') {
|
||||
results.push(params[i].push(div));
|
||||
} else {
|
||||
results.push(void 0);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
Gradient.prototype.old = function(prefix) {
|
||||
var regexp, string, type;
|
||||
if (prefix === '-webkit-') {
|
||||
type = this.name === 'linear-gradient' ? 'linear' : 'radial';
|
||||
string = '-gradient';
|
||||
regexp = utils.regexp("-webkit-(" + type + "-gradient|gradient\\(\\s*" + type + ")", false);
|
||||
return new OldValue(this.name, prefix + this.name, string, regexp);
|
||||
} else {
|
||||
return Gradient.__super__.old.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Gradient.prototype.add = function(decl, prefix) {
|
||||
var p;
|
||||
p = decl.prop;
|
||||
if (p.indexOf('mask') !== -1) {
|
||||
if (prefix === '-webkit-' || prefix === '-webkit- old') {
|
||||
return Gradient.__super__.add.apply(this, arguments);
|
||||
}
|
||||
} else if (p === 'list-style' || p === 'list-style-image' || p === 'content') {
|
||||
if (prefix === '-webkit-' || prefix === '-webkit- old') {
|
||||
return Gradient.__super__.add.apply(this, arguments);
|
||||
}
|
||||
} else {
|
||||
return Gradient.__super__.add.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Gradient;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = Gradient;
|
||||
|
||||
}).call(this);
|
||||
46
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/grid-end.js
generated
vendored
Normal file
46
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/grid-end.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
(function() {
|
||||
var Declaration, GridEnd,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
GridEnd = (function(superClass) {
|
||||
extend(GridEnd, superClass);
|
||||
|
||||
function GridEnd() {
|
||||
return GridEnd.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
GridEnd.names = ['grid-row-end', 'grid-column-end', 'grid-row-span', 'grid-column-span'];
|
||||
|
||||
GridEnd.prototype.check = function(decl) {
|
||||
return decl.value.indexOf('span') !== -1;
|
||||
};
|
||||
|
||||
GridEnd.prototype.normalize = function(prop) {
|
||||
return prop.replace(/(-span|-end)/, '');
|
||||
};
|
||||
|
||||
GridEnd.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return prefix + prop.replace('-end', '-span');
|
||||
} else {
|
||||
return GridEnd.__super__.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
GridEnd.prototype.set = function(decl, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
decl.value = decl.value.replace(/span\s/i, '');
|
||||
}
|
||||
return GridEnd.__super__.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return GridEnd;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = GridEnd;
|
||||
|
||||
}).call(this);
|
||||
35
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/grid-row-align.js
generated
vendored
Normal file
35
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/grid-row-align.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
(function() {
|
||||
var Declaration, GridRowAlign,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
GridRowAlign = (function(superClass) {
|
||||
extend(GridRowAlign, superClass);
|
||||
|
||||
function GridRowAlign() {
|
||||
return GridRowAlign.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
GridRowAlign.names = ['grid-row-align'];
|
||||
|
||||
GridRowAlign.prototype.check = function(decl) {
|
||||
return decl.value.indexOf('flex-') === -1 && decl.value !== 'baseline';
|
||||
};
|
||||
|
||||
GridRowAlign.prototype.prefixed = function(prop, prefix) {
|
||||
return prefix + 'grid-row-align';
|
||||
};
|
||||
|
||||
GridRowAlign.prototype.normalize = function(prop) {
|
||||
return 'align-self';
|
||||
};
|
||||
|
||||
return GridRowAlign;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = GridRowAlign;
|
||||
|
||||
}).call(this);
|
||||
71
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/grid-start.js
generated
vendored
Normal file
71
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/grid-start.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
(function() {
|
||||
var Declaration, GridStart,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
GridStart = (function(superClass) {
|
||||
extend(GridStart, superClass);
|
||||
|
||||
function GridStart() {
|
||||
return GridStart.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
GridStart.names = ['grid-row-start', 'grid-column-start', 'grid-row', 'grid-column'];
|
||||
|
||||
GridStart.prototype.check = function(decl) {
|
||||
return decl.value.indexOf('/') === -1 || decl.value.indexOf('span') !== -1;
|
||||
};
|
||||
|
||||
GridStart.prototype.normalize = function(prop) {
|
||||
return prop.replace('-start', '');
|
||||
};
|
||||
|
||||
GridStart.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return prefix + prop.replace('-start', '');
|
||||
} else {
|
||||
return GridStart.__super__.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
GridStart.prototype.insert = function(decl, prefix, prefixes) {
|
||||
var parts;
|
||||
parts = this.splitValue(decl, prefix);
|
||||
if (parts.length === 2) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-' + decl.prop + '-span',
|
||||
value: parts[1]
|
||||
});
|
||||
}
|
||||
return GridStart.__super__.insert.call(this, decl, prefix, prefixes);
|
||||
};
|
||||
|
||||
GridStart.prototype.set = function(decl, prefix) {
|
||||
var parts;
|
||||
parts = this.splitValue(decl, prefix);
|
||||
if (parts.length === 2) {
|
||||
decl.value = parts[0];
|
||||
}
|
||||
return GridStart.__super__.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
GridStart.prototype.splitValue = function(decl, prefix) {
|
||||
var parts;
|
||||
if (prefix === '-ms-' && decl.prop.indexOf('-start') === -1) {
|
||||
parts = decl.value.split(/\s*\/\s*span\s+/);
|
||||
if (parts.length === 2) {
|
||||
return parts;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
return GridStart;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = GridStart;
|
||||
|
||||
}).call(this);
|
||||
77
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/grid-template.js
generated
vendored
Normal file
77
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/grid-template.js
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
(function() {
|
||||
var Declaration, GridTemplate, parser,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
parser = require('postcss-value-parser');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
GridTemplate = (function(superClass) {
|
||||
extend(GridTemplate, superClass);
|
||||
|
||||
function GridTemplate() {
|
||||
return GridTemplate.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
GridTemplate.names = ['grid-template-rows', 'grid-template-columns', 'grid-rows', 'grid-columns'];
|
||||
|
||||
GridTemplate.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return prefix + prop.replace('template-', '');
|
||||
} else {
|
||||
return GridTemplate.__super__.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
GridTemplate.prototype.normalize = function(prop) {
|
||||
return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1');
|
||||
};
|
||||
|
||||
GridTemplate.prototype.walkRepeat = function(node) {
|
||||
var count, first, fixed, i, j, len, ref;
|
||||
fixed = [];
|
||||
ref = node.nodes;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
i = ref[j];
|
||||
if (i.nodes) {
|
||||
this.walkRepeat(i);
|
||||
}
|
||||
fixed.push(i);
|
||||
if (i.type === 'function' && i.value === 'repeat') {
|
||||
first = i.nodes.shift();
|
||||
if (first) {
|
||||
count = first.value;
|
||||
i.nodes.shift();
|
||||
i.value = '';
|
||||
fixed.push({
|
||||
type: 'word',
|
||||
value: "[" + count + "]"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return node.nodes = fixed;
|
||||
};
|
||||
|
||||
GridTemplate.prototype.changeRepeat = function(value) {
|
||||
var ast;
|
||||
ast = parser(value);
|
||||
this.walkRepeat(ast);
|
||||
return ast.toString();
|
||||
};
|
||||
|
||||
GridTemplate.prototype.set = function(decl, prefix) {
|
||||
if (prefix === '-ms-' && decl.value.indexOf('repeat(') !== -1) {
|
||||
decl.value = this.changeRepeat(decl.value);
|
||||
}
|
||||
return GridTemplate.__super__.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return GridTemplate;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = GridTemplate;
|
||||
|
||||
}).call(this);
|
||||
53
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/image-rendering.js
generated
vendored
Normal file
53
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/image-rendering.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
(function() {
|
||||
var Declaration, ImageRendering,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
ImageRendering = (function(superClass) {
|
||||
extend(ImageRendering, superClass);
|
||||
|
||||
function ImageRendering() {
|
||||
return ImageRendering.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
ImageRendering.names = ['image-rendering', 'interpolation-mode'];
|
||||
|
||||
ImageRendering.prototype.check = function(decl) {
|
||||
return decl.value === 'pixelated';
|
||||
};
|
||||
|
||||
ImageRendering.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return '-ms-interpolation-mode';
|
||||
} else {
|
||||
return ImageRendering.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
ImageRendering.prototype.set = function(decl, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
decl.prop = '-ms-interpolation-mode';
|
||||
decl.value = 'nearest-neighbor';
|
||||
return decl;
|
||||
} else {
|
||||
return ImageRendering.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
ImageRendering.prototype.normalize = function(prop) {
|
||||
return 'image-rendering';
|
||||
};
|
||||
|
||||
ImageRendering.prototype.process = function(node, result) {
|
||||
return ImageRendering.__super__.process.apply(this, arguments);
|
||||
};
|
||||
|
||||
return ImageRendering;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = ImageRendering;
|
||||
|
||||
}).call(this);
|
||||
33
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/image-set.js
generated
vendored
Normal file
33
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/image-set.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
(function() {
|
||||
var ImageSet, Value, list,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
ImageSet = (function(superClass) {
|
||||
extend(ImageSet, superClass);
|
||||
|
||||
function ImageSet() {
|
||||
return ImageSet.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
ImageSet.names = ['image-set'];
|
||||
|
||||
ImageSet.prototype.replace = function(string, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return ImageSet.__super__.replace.apply(this, arguments).replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi, 'url($1)$2');
|
||||
} else {
|
||||
return ImageSet.__super__.replace.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return ImageSet;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = ImageSet;
|
||||
|
||||
}).call(this);
|
||||
31
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/inline-logical.js
generated
vendored
Normal file
31
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/inline-logical.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
(function() {
|
||||
var Declaration, InlineLogical,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
InlineLogical = (function(superClass) {
|
||||
extend(InlineLogical, superClass);
|
||||
|
||||
function InlineLogical() {
|
||||
return InlineLogical.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
InlineLogical.names = ['border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', 'border-start', 'border-end', 'margin-start', 'margin-end', 'padding-start', 'padding-end'];
|
||||
|
||||
InlineLogical.prototype.prefixed = function(prop, prefix) {
|
||||
return prefix + prop.replace('-inline', '');
|
||||
};
|
||||
|
||||
InlineLogical.prototype.normalize = function(prop) {
|
||||
return prop.replace(/(margin|padding|border)-(start|end)/, '$1-inline-$2');
|
||||
};
|
||||
|
||||
return InlineLogical;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = InlineLogical;
|
||||
|
||||
}).call(this);
|
||||
62
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/justify-content.js
generated
vendored
Normal file
62
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/justify-content.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
(function() {
|
||||
var Declaration, JustifyContent, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
JustifyContent = (function(superClass) {
|
||||
extend(JustifyContent, superClass);
|
||||
|
||||
function JustifyContent() {
|
||||
return JustifyContent.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
JustifyContent.names = ['justify-content', 'flex-pack', 'box-pack'];
|
||||
|
||||
JustifyContent.oldValues = {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start',
|
||||
'space-between': 'justify',
|
||||
'space-around': 'distribute'
|
||||
};
|
||||
|
||||
JustifyContent.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-pack';
|
||||
} else if (spec === 2012) {
|
||||
return prefix + 'flex-pack';
|
||||
} else {
|
||||
return JustifyContent.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
JustifyContent.prototype.normalize = function(prop) {
|
||||
return 'justify-content';
|
||||
};
|
||||
|
||||
JustifyContent.prototype.set = function(decl, prefix) {
|
||||
var spec, value;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009 || spec === 2012) {
|
||||
value = JustifyContent.oldValues[decl.value] || decl.value;
|
||||
decl.value = value;
|
||||
if (spec !== 2009 || value !== 'distribute') {
|
||||
return JustifyContent.__super__.set.call(this, decl, prefix);
|
||||
}
|
||||
} else if (spec === 'final') {
|
||||
return JustifyContent.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return JustifyContent;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = JustifyContent;
|
||||
|
||||
}).call(this);
|
||||
31
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/justify-items.js
generated
vendored
Normal file
31
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/justify-items.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
(function() {
|
||||
var Declaration, JustifyItems,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
JustifyItems = (function(superClass) {
|
||||
extend(JustifyItems, superClass);
|
||||
|
||||
function JustifyItems() {
|
||||
return JustifyItems.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
JustifyItems.names = ['justify-items', 'grid-column-align'];
|
||||
|
||||
JustifyItems.prototype.prefixed = function(prop, prefix) {
|
||||
return prefix + (prefix === '-ms-' ? 'grid-column-align' : prop);
|
||||
};
|
||||
|
||||
JustifyItems.prototype.normalize = function(prop) {
|
||||
return 'justify-items';
|
||||
};
|
||||
|
||||
return JustifyItems;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = JustifyItems;
|
||||
|
||||
}).call(this);
|
||||
35
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/mask-border.js
generated
vendored
Normal file
35
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/mask-border.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
(function() {
|
||||
var Declaration, MaskBorder,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
MaskBorder = (function(superClass) {
|
||||
extend(MaskBorder, superClass);
|
||||
|
||||
function MaskBorder() {
|
||||
return MaskBorder.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
MaskBorder.names = ['mask-border', 'mask-border-source', 'mask-border-slice', 'mask-border-width', 'mask-border-outset', 'mask-border-repeat', 'mask-box-image', 'mask-box-image-source', 'mask-box-image-slice', 'mask-box-image-width', 'mask-box-image-outset', 'mask-box-image-repeat'];
|
||||
|
||||
MaskBorder.prototype.normalize = function() {
|
||||
return this.name.replace('box-image', 'border');
|
||||
};
|
||||
|
||||
MaskBorder.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return MaskBorder.__super__.prefixed.apply(this, arguments).replace('border', 'box-image');
|
||||
} else {
|
||||
return MaskBorder.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return MaskBorder;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = MaskBorder;
|
||||
|
||||
}).call(this);
|
||||
52
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/order.js
generated
vendored
Normal file
52
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/order.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
(function() {
|
||||
var Declaration, Order, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
Order = (function(superClass) {
|
||||
extend(Order, superClass);
|
||||
|
||||
function Order() {
|
||||
return Order.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Order.names = ['order', 'flex-order', 'box-ordinal-group'];
|
||||
|
||||
Order.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-ordinal-group';
|
||||
} else if (spec === 2012) {
|
||||
return prefix + 'flex-order';
|
||||
} else {
|
||||
return Order.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Order.prototype.normalize = function(prop) {
|
||||
return 'order';
|
||||
};
|
||||
|
||||
Order.prototype.set = function(decl, prefix) {
|
||||
var spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009 && /\d/.test(decl.value)) {
|
||||
decl.value = (parseInt(decl.value) + 1).toString();
|
||||
return Order.__super__.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return Order.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Order;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = Order;
|
||||
|
||||
}).call(this);
|
||||
45
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/pixelated.js
generated
vendored
Normal file
45
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/pixelated.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
(function() {
|
||||
var OldValue, Pixelated, Value,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
Pixelated = (function(superClass) {
|
||||
extend(Pixelated, superClass);
|
||||
|
||||
function Pixelated() {
|
||||
return Pixelated.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Pixelated.names = ['pixelated'];
|
||||
|
||||
Pixelated.prototype.replace = function(string, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return string.replace(this.regexp(), '$1-webkit-optimize-contrast');
|
||||
} else if (prefix === '-moz-') {
|
||||
return string.replace(this.regexp(), '$1-moz-crisp-edges');
|
||||
} else {
|
||||
return Pixelated.__super__.replace.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Pixelated.prototype.old = function(prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return new OldValue(this.name, '-webkit-optimize-contrast');
|
||||
} else if (prefix === '-moz-') {
|
||||
return new OldValue(this.name, '-moz-crisp-edges');
|
||||
} else {
|
||||
return Pixelated.__super__.old.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Pixelated;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = Pixelated;
|
||||
|
||||
}).call(this);
|
||||
39
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/placeholder.js
generated
vendored
Normal file
39
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/placeholder.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
(function() {
|
||||
var Placeholder, Selector,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Selector = require('../selector');
|
||||
|
||||
Placeholder = (function(superClass) {
|
||||
extend(Placeholder, superClass);
|
||||
|
||||
function Placeholder() {
|
||||
return Placeholder.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Placeholder.names = [':placeholder-shown', '::placeholder'];
|
||||
|
||||
Placeholder.prototype.possible = function() {
|
||||
return Placeholder.__super__.possible.apply(this, arguments).concat('-moz- old');
|
||||
};
|
||||
|
||||
Placeholder.prototype.prefixed = function(prefix) {
|
||||
if ('-webkit-' === prefix) {
|
||||
return '::-webkit-input-placeholder';
|
||||
} else if ('-ms-' === prefix) {
|
||||
return ':-ms-input-placeholder';
|
||||
} else if ('-moz- old' === prefix) {
|
||||
return ':-moz-placeholder';
|
||||
} else {
|
||||
return "::" + prefix + "placeholder";
|
||||
}
|
||||
};
|
||||
|
||||
return Placeholder;
|
||||
|
||||
})(Selector);
|
||||
|
||||
module.exports = Placeholder;
|
||||
|
||||
}).call(this);
|
||||
45
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/stretch.js
generated
vendored
Normal file
45
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/stretch.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
(function() {
|
||||
var OldValue, Stretch, Value,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
Stretch = (function(superClass) {
|
||||
extend(Stretch, superClass);
|
||||
|
||||
function Stretch() {
|
||||
return Stretch.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Stretch.names = ['stretch', 'fill', 'fill-available'];
|
||||
|
||||
Stretch.prototype.replace = function(string, prefix) {
|
||||
if (prefix === '-moz-') {
|
||||
return string.replace(this.regexp(), '$1-moz-available$3');
|
||||
} else if (prefix === '-webkit-') {
|
||||
return string.replace(this.regexp(), '$1-webkit-fill-available$3');
|
||||
} else {
|
||||
return Stretch.__super__.replace.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Stretch.prototype.old = function(prefix) {
|
||||
if (prefix === '-moz-') {
|
||||
return new OldValue(this.name, '-moz-available');
|
||||
} else if (prefix === '-webkit-') {
|
||||
return new OldValue(this.name, '-webkit-fill-available');
|
||||
} else {
|
||||
return Stretch.__super__.old.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Stretch;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = Stretch;
|
||||
|
||||
}).call(this);
|
||||
32
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/text-emphasis-position.js
generated
vendored
Normal file
32
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/text-emphasis-position.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
(function() {
|
||||
var Declaration, TextEmphasisPosition,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
TextEmphasisPosition = (function(superClass) {
|
||||
extend(TextEmphasisPosition, superClass);
|
||||
|
||||
function TextEmphasisPosition() {
|
||||
return TextEmphasisPosition.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
TextEmphasisPosition.names = ['text-emphasis-position'];
|
||||
|
||||
TextEmphasisPosition.prototype.set = function(decl, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
decl.value = decl.value.replace(/\s*(right|left)\s*/i, '');
|
||||
return TextEmphasisPosition.__super__.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return TextEmphasisPosition.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return TextEmphasisPosition;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = TextEmphasisPosition;
|
||||
|
||||
}).call(this);
|
||||
74
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/transform-decl.js
generated
vendored
Normal file
74
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/transform-decl.js
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
(function() {
|
||||
var Declaration, TransformDecl,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
TransformDecl = (function(superClass) {
|
||||
extend(TransformDecl, superClass);
|
||||
|
||||
function TransformDecl() {
|
||||
return TransformDecl.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
TransformDecl.names = ['transform', 'transform-origin'];
|
||||
|
||||
TransformDecl.functions3d = ['matrix3d', 'translate3d', 'translateZ', 'scale3d', 'scaleZ', 'rotate3d', 'rotateX', 'rotateY', 'perspective'];
|
||||
|
||||
TransformDecl.prototype.keyframeParents = function(decl) {
|
||||
var parent;
|
||||
parent = decl.parent;
|
||||
while (parent) {
|
||||
if (parent.type === 'atrule' && parent.name === 'keyframes') {
|
||||
return true;
|
||||
}
|
||||
parent = parent.parent;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
TransformDecl.prototype.contain3d = function(decl) {
|
||||
var func, i, len, ref;
|
||||
if (decl.prop === 'transform-origin') {
|
||||
return false;
|
||||
}
|
||||
ref = TransformDecl.functions3d;
|
||||
for (i = 0, len = ref.length; i < len; i++) {
|
||||
func = ref[i];
|
||||
if (decl.value.indexOf(func + "(") !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
TransformDecl.prototype.set = function(decl, prefix) {
|
||||
decl = TransformDecl.__super__.set.apply(this, arguments);
|
||||
if (prefix === '-ms-') {
|
||||
decl.value = decl.value.replace(/rotateZ/gi, 'rotate');
|
||||
}
|
||||
return decl;
|
||||
};
|
||||
|
||||
TransformDecl.prototype.insert = function(decl, prefix, prefixes) {
|
||||
if (prefix === '-ms-') {
|
||||
if (!this.contain3d(decl) && !this.keyframeParents(decl)) {
|
||||
return TransformDecl.__super__.insert.apply(this, arguments);
|
||||
}
|
||||
} else if (prefix === '-o-') {
|
||||
if (!this.contain3d(decl)) {
|
||||
return TransformDecl.__super__.insert.apply(this, arguments);
|
||||
}
|
||||
} else {
|
||||
return TransformDecl.__super__.insert.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return TransformDecl;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = TransformDecl;
|
||||
|
||||
}).call(this);
|
||||
38
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/writing-mode.js
generated
vendored
Normal file
38
build/node_modules/cssnano/node_modules/autoprefixer/lib/hacks/writing-mode.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
(function() {
|
||||
var Declaration, WritingMode,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
WritingMode = (function(superClass) {
|
||||
extend(WritingMode, superClass);
|
||||
|
||||
function WritingMode() {
|
||||
return WritingMode.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
WritingMode.names = ['writing-mode'];
|
||||
|
||||
WritingMode.msValues = {
|
||||
'horizontal-tb': 'lr-tb',
|
||||
'vertical-rl': 'tb-rl',
|
||||
'vertical-lr': 'tb-lr'
|
||||
};
|
||||
|
||||
WritingMode.prototype.set = function(decl, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
decl.value = WritingMode.msValues[decl.value] || decl.value;
|
||||
return WritingMode.__super__.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return WritingMode.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return WritingMode;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = WritingMode;
|
||||
|
||||
}).call(this);
|
||||
113
build/node_modules/cssnano/node_modules/autoprefixer/lib/info.js
generated
vendored
Normal file
113
build/node_modules/cssnano/node_modules/autoprefixer/lib/info.js
generated
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
(function() {
|
||||
var browserslist, capitalize, names, prefix;
|
||||
|
||||
browserslist = require('browserslist');
|
||||
|
||||
capitalize = function(str) {
|
||||
return str.slice(0, 1).toUpperCase() + str.slice(1);
|
||||
};
|
||||
|
||||
names = {
|
||||
ie: 'IE',
|
||||
ie_mob: 'IE Mobile',
|
||||
ios_saf: 'iOS',
|
||||
op_mini: 'Opera Mini',
|
||||
op_mob: 'Opera Mobile',
|
||||
and_chr: 'Chrome for Android',
|
||||
and_ff: 'Firefox for Android',
|
||||
and_uc: 'UC for Android'
|
||||
};
|
||||
|
||||
prefix = function(name, prefixes) {
|
||||
var out;
|
||||
out = ' ' + name + ': ';
|
||||
out += prefixes.map(function(i) {
|
||||
return i.replace(/^-(.*)-$/g, '$1');
|
||||
}).join(', ');
|
||||
out += "\n";
|
||||
return out;
|
||||
};
|
||||
|
||||
module.exports = function(prefixes) {
|
||||
var atrules, browser, coverage, data, j, k, l, len, len1, len2, list, name, out, props, ref, ref1, ref2, ref3, ref4, ref5, round, selector, selectors, string, value, values, version, versions;
|
||||
if (prefixes.browsers.selected.length === 0) {
|
||||
return "No browsers selected";
|
||||
}
|
||||
versions = [];
|
||||
ref = prefixes.browsers.selected;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
browser = ref[j];
|
||||
ref1 = browser.split(' '), name = ref1[0], version = ref1[1];
|
||||
name = names[name] || capitalize(name);
|
||||
if (versions[name]) {
|
||||
versions[name].push(version);
|
||||
} else {
|
||||
versions[name] = [version];
|
||||
}
|
||||
}
|
||||
out = "Browsers:\n";
|
||||
for (browser in versions) {
|
||||
list = versions[browser];
|
||||
list = list.sort(function(a, b) {
|
||||
return parseFloat(b) - parseFloat(a);
|
||||
});
|
||||
out += ' ' + browser + ': ' + list.join(', ') + "\n";
|
||||
}
|
||||
coverage = browserslist.coverage(prefixes.browsers.selected);
|
||||
round = Math.round(coverage * 100) / 100.0;
|
||||
out += "\nThese browsers account for " + round + "% of all users globally\n";
|
||||
atrules = '';
|
||||
ref2 = prefixes.add;
|
||||
for (name in ref2) {
|
||||
data = ref2[name];
|
||||
if (name[0] === '@' && data.prefixes) {
|
||||
atrules += prefix(name, data.prefixes);
|
||||
}
|
||||
}
|
||||
if (atrules !== '') {
|
||||
out += "\nAt-Rules:\n" + atrules;
|
||||
}
|
||||
selectors = '';
|
||||
ref3 = prefixes.add.selectors;
|
||||
for (k = 0, len1 = ref3.length; k < len1; k++) {
|
||||
selector = ref3[k];
|
||||
if (selector.prefixes) {
|
||||
selectors += prefix(selector.name, selector.prefixes);
|
||||
}
|
||||
}
|
||||
if (selectors !== '') {
|
||||
out += "\nSelectors:\n" + selectors;
|
||||
}
|
||||
values = '';
|
||||
props = '';
|
||||
ref4 = prefixes.add;
|
||||
for (name in ref4) {
|
||||
data = ref4[name];
|
||||
if (name[0] !== '@' && data.prefixes) {
|
||||
props += prefix(name, data.prefixes);
|
||||
}
|
||||
if (!data.values) {
|
||||
continue;
|
||||
}
|
||||
ref5 = data.values;
|
||||
for (l = 0, len2 = ref5.length; l < len2; l++) {
|
||||
value = ref5[l];
|
||||
string = prefix(value.name, value.prefixes);
|
||||
if (values.indexOf(string) === -1) {
|
||||
values += string;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (props !== '') {
|
||||
out += "\nProperties:\n" + props;
|
||||
}
|
||||
if (values !== '') {
|
||||
out += "\nValues:\n" + values;
|
||||
}
|
||||
if (atrules === '' && selectors === '' && props === '' && values === '') {
|
||||
out += '\nAwesome! Your browsers don\'t require any vendor prefixes.' + '\nNow you can remove Autoprefixer from build steps.';
|
||||
}
|
||||
return out;
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
68
build/node_modules/cssnano/node_modules/autoprefixer/lib/old-selector.js
generated
vendored
Normal file
68
build/node_modules/cssnano/node_modules/autoprefixer/lib/old-selector.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
(function() {
|
||||
var OldSelector;
|
||||
|
||||
OldSelector = (function() {
|
||||
function OldSelector(selector, prefix1) {
|
||||
var i, len, prefix, ref;
|
||||
this.prefix = prefix1;
|
||||
this.prefixed = selector.prefixed(this.prefix);
|
||||
this.regexp = selector.regexp(this.prefix);
|
||||
this.prefixeds = [];
|
||||
ref = selector.possible();
|
||||
for (i = 0, len = ref.length; i < len; i++) {
|
||||
prefix = ref[i];
|
||||
this.prefixeds.push([selector.prefixed(prefix), selector.regexp(prefix)]);
|
||||
}
|
||||
this.unprefixed = selector.name;
|
||||
this.nameRegexp = selector.regexp();
|
||||
}
|
||||
|
||||
OldSelector.prototype.isHack = function(rule) {
|
||||
var before, i, index, len, ref, ref1, regexp, rules, some, string;
|
||||
index = rule.parent.index(rule) + 1;
|
||||
rules = rule.parent.nodes;
|
||||
while (index < rules.length) {
|
||||
before = rules[index].selector;
|
||||
if (!before) {
|
||||
return true;
|
||||
}
|
||||
if (before.indexOf(this.unprefixed) !== -1 && before.match(this.nameRegexp)) {
|
||||
return false;
|
||||
}
|
||||
some = false;
|
||||
ref = this.prefixeds;
|
||||
for (i = 0, len = ref.length; i < len; i++) {
|
||||
ref1 = ref[i], string = ref1[0], regexp = ref1[1];
|
||||
if (before.indexOf(string) !== -1 && before.match(regexp)) {
|
||||
some = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!some) {
|
||||
return true;
|
||||
}
|
||||
index += 1;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
OldSelector.prototype.check = function(rule) {
|
||||
if (rule.selector.indexOf(this.prefixed) === -1) {
|
||||
return false;
|
||||
}
|
||||
if (!rule.selector.match(this.regexp)) {
|
||||
return false;
|
||||
}
|
||||
if (this.isHack(rule)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
return OldSelector;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = OldSelector;
|
||||
|
||||
}).call(this);
|
||||
30
build/node_modules/cssnano/node_modules/autoprefixer/lib/old-value.js
generated
vendored
Normal file
30
build/node_modules/cssnano/node_modules/autoprefixer/lib/old-value.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
(function() {
|
||||
var OldValue, utils;
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
OldValue = (function() {
|
||||
function OldValue(unprefixed, prefixed, string, regexp) {
|
||||
this.unprefixed = unprefixed;
|
||||
this.prefixed = prefixed;
|
||||
this.string = string;
|
||||
this.regexp = regexp;
|
||||
this.regexp || (this.regexp = utils.regexp(this.prefixed));
|
||||
this.string || (this.string = this.prefixed);
|
||||
}
|
||||
|
||||
OldValue.prototype.check = function(value) {
|
||||
if (value.indexOf(this.string) !== -1) {
|
||||
return !!value.match(this.regexp);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
return OldValue;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = OldValue;
|
||||
|
||||
}).call(this);
|
||||
121
build/node_modules/cssnano/node_modules/autoprefixer/lib/prefixer.js
generated
vendored
Normal file
121
build/node_modules/cssnano/node_modules/autoprefixer/lib/prefixer.js
generated
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
(function() {
|
||||
var Browsers, Prefixer, clone, utils, vendor,
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Browsers = require('./browsers');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
vendor = require('postcss/lib/vendor');
|
||||
|
||||
clone = function(obj, parent) {
|
||||
var cloned, i, value;
|
||||
cloned = new obj.constructor();
|
||||
for (i in obj) {
|
||||
if (!hasProp.call(obj, i)) continue;
|
||||
value = obj[i];
|
||||
if (i === 'parent' && typeof value === 'object') {
|
||||
if (parent) {
|
||||
cloned[i] = parent;
|
||||
}
|
||||
} else if (i === 'source') {
|
||||
cloned[i] = value;
|
||||
} else if (i === null) {
|
||||
cloned[i] = value;
|
||||
} else if (value instanceof Array) {
|
||||
cloned[i] = value.map(function(i) {
|
||||
return clone(i, cloned);
|
||||
});
|
||||
} else if (i !== '_autoprefixerPrefix' && i !== '_autoprefixerValues') {
|
||||
if (typeof value === 'object' && value !== null) {
|
||||
value = clone(value, cloned);
|
||||
}
|
||||
cloned[i] = value;
|
||||
}
|
||||
}
|
||||
return cloned;
|
||||
};
|
||||
|
||||
Prefixer = (function() {
|
||||
Prefixer.hack = function(klass) {
|
||||
var j, len, name, ref, results;
|
||||
this.hacks || (this.hacks = {});
|
||||
ref = klass.names;
|
||||
results = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
name = ref[j];
|
||||
results.push(this.hacks[name] = klass);
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
Prefixer.load = function(name, prefixes, all) {
|
||||
var klass, ref;
|
||||
klass = (ref = this.hacks) != null ? ref[name] : void 0;
|
||||
if (klass) {
|
||||
return new klass(name, prefixes, all);
|
||||
} else {
|
||||
return new this(name, prefixes, all);
|
||||
}
|
||||
};
|
||||
|
||||
Prefixer.clone = function(node, overrides) {
|
||||
var cloned, name;
|
||||
cloned = clone(node);
|
||||
for (name in overrides) {
|
||||
cloned[name] = overrides[name];
|
||||
}
|
||||
return cloned;
|
||||
};
|
||||
|
||||
function Prefixer(name1, prefixes1, all1) {
|
||||
this.name = name1;
|
||||
this.prefixes = prefixes1;
|
||||
this.all = all1;
|
||||
}
|
||||
|
||||
Prefixer.prototype.parentPrefix = function(node) {
|
||||
var prefix;
|
||||
prefix = node._autoprefixerPrefix != null ? node._autoprefixerPrefix : node.type === 'decl' && node.prop[0] === '-' ? vendor.prefix(node.prop) : node.type === 'root' ? false : node.type === 'rule' && node.selector.indexOf(':-') !== -1 && /:(-\w+-)/.test(node.selector) ? node.selector.match(/:(-\w+-)/)[1] : node.type === 'atrule' && node.name[0] === '-' ? vendor.prefix(node.name) : this.parentPrefix(node.parent);
|
||||
if (Browsers.prefixes().indexOf(prefix) === -1) {
|
||||
prefix = false;
|
||||
}
|
||||
return node._autoprefixerPrefix = prefix;
|
||||
};
|
||||
|
||||
Prefixer.prototype.process = function(node) {
|
||||
var added, j, k, len, len1, parent, prefix, prefixes, ref;
|
||||
if (!this.check(node)) {
|
||||
return;
|
||||
}
|
||||
parent = this.parentPrefix(node);
|
||||
prefixes = [];
|
||||
ref = this.prefixes;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
prefix = ref[j];
|
||||
if (parent && parent !== utils.removeNote(prefix)) {
|
||||
continue;
|
||||
}
|
||||
prefixes.push(prefix);
|
||||
}
|
||||
added = [];
|
||||
for (k = 0, len1 = prefixes.length; k < len1; k++) {
|
||||
prefix = prefixes[k];
|
||||
if (this.add(node, prefix, added.concat([prefix]))) {
|
||||
added.push(prefix);
|
||||
}
|
||||
}
|
||||
return added;
|
||||
};
|
||||
|
||||
Prefixer.prototype.clone = function(node, overrides) {
|
||||
return Prefixer.clone(node, overrides);
|
||||
};
|
||||
|
||||
return Prefixer;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Prefixer;
|
||||
|
||||
}).call(this);
|
||||
410
build/node_modules/cssnano/node_modules/autoprefixer/lib/prefixes.js
generated
vendored
Normal file
410
build/node_modules/cssnano/node_modules/autoprefixer/lib/prefixes.js
generated
vendored
Normal file
@@ -0,0 +1,410 @@
|
||||
(function() {
|
||||
var AtRule, Browsers, Declaration, Prefixes, Processor, Resolution, Selector, Supports, Transition, Value, declsCache, utils, vendor;
|
||||
|
||||
Declaration = require('./declaration');
|
||||
|
||||
Resolution = require('./resolution');
|
||||
|
||||
Transition = require('./transition');
|
||||
|
||||
Processor = require('./processor');
|
||||
|
||||
Supports = require('./supports');
|
||||
|
||||
Browsers = require('./browsers');
|
||||
|
||||
Selector = require('./selector');
|
||||
|
||||
AtRule = require('./at-rule');
|
||||
|
||||
Value = require('./value');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
vendor = require('postcss/lib/vendor');
|
||||
|
||||
Selector.hack(require('./hacks/fullscreen'));
|
||||
|
||||
Selector.hack(require('./hacks/placeholder'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex'));
|
||||
|
||||
Declaration.hack(require('./hacks/order'));
|
||||
|
||||
Declaration.hack(require('./hacks/filter'));
|
||||
|
||||
Declaration.hack(require('./hacks/grid-end'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex-flow'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex-grow'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex-wrap'));
|
||||
|
||||
Declaration.hack(require('./hacks/grid-start'));
|
||||
|
||||
Declaration.hack(require('./hacks/align-self'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex-basis'));
|
||||
|
||||
Declaration.hack(require('./hacks/mask-border'));
|
||||
|
||||
Declaration.hack(require('./hacks/align-items'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex-shrink'));
|
||||
|
||||
Declaration.hack(require('./hacks/break-props'));
|
||||
|
||||
Declaration.hack(require('./hacks/writing-mode'));
|
||||
|
||||
Declaration.hack(require('./hacks/border-image'));
|
||||
|
||||
Declaration.hack(require('./hacks/justify-items'));
|
||||
|
||||
Declaration.hack(require('./hacks/align-content'));
|
||||
|
||||
Declaration.hack(require('./hacks/border-radius'));
|
||||
|
||||
Declaration.hack(require('./hacks/block-logical'));
|
||||
|
||||
Declaration.hack(require('./hacks/grid-template'));
|
||||
|
||||
Declaration.hack(require('./hacks/inline-logical'));
|
||||
|
||||
Declaration.hack(require('./hacks/grid-row-align'));
|
||||
|
||||
Declaration.hack(require('./hacks/transform-decl'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex-direction'));
|
||||
|
||||
Declaration.hack(require('./hacks/image-rendering'));
|
||||
|
||||
Declaration.hack(require('./hacks/justify-content'));
|
||||
|
||||
Declaration.hack(require('./hacks/background-size'));
|
||||
|
||||
Declaration.hack(require('./hacks/text-emphasis-position'));
|
||||
|
||||
Value.hack(require('./hacks/stretch'));
|
||||
|
||||
Value.hack(require('./hacks/gradient'));
|
||||
|
||||
Value.hack(require('./hacks/pixelated'));
|
||||
|
||||
Value.hack(require('./hacks/image-set'));
|
||||
|
||||
Value.hack(require('./hacks/cross-fade'));
|
||||
|
||||
Value.hack(require('./hacks/flex-values'));
|
||||
|
||||
Value.hack(require('./hacks/display-flex'));
|
||||
|
||||
Value.hack(require('./hacks/display-grid'));
|
||||
|
||||
Value.hack(require('./hacks/filter-value'));
|
||||
|
||||
declsCache = {};
|
||||
|
||||
Prefixes = (function() {
|
||||
function Prefixes(data1, browsers, options) {
|
||||
var ref;
|
||||
this.data = data1;
|
||||
this.browsers = browsers;
|
||||
this.options = options != null ? options : {};
|
||||
ref = this.preprocess(this.select(this.data)), this.add = ref[0], this.remove = ref[1];
|
||||
this.transition = new Transition(this);
|
||||
this.processor = new Processor(this);
|
||||
}
|
||||
|
||||
Prefixes.prototype.cleaner = function() {
|
||||
var empty;
|
||||
if (!this.cleanerCache) {
|
||||
if (this.browsers.selected.length) {
|
||||
empty = new Browsers(this.browsers.data, []);
|
||||
this.cleanerCache = new Prefixes(this.data, empty, this.options);
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
return this.cleanerCache;
|
||||
};
|
||||
|
||||
Prefixes.prototype.select = function(list) {
|
||||
var add, all, data, name, notes, selected;
|
||||
selected = {
|
||||
add: {},
|
||||
remove: {}
|
||||
};
|
||||
for (name in list) {
|
||||
data = list[name];
|
||||
add = data.browsers.map(function(i) {
|
||||
var params;
|
||||
params = i.split(' ');
|
||||
return {
|
||||
browser: params[0] + ' ' + params[1],
|
||||
note: params[2]
|
||||
};
|
||||
});
|
||||
notes = add.filter(function(i) {
|
||||
return i.note;
|
||||
}).map((function(_this) {
|
||||
return function(i) {
|
||||
return _this.browsers.prefix(i.browser) + ' ' + i.note;
|
||||
};
|
||||
})(this));
|
||||
notes = utils.uniq(notes);
|
||||
add = add.filter((function(_this) {
|
||||
return function(i) {
|
||||
return _this.browsers.isSelected(i.browser);
|
||||
};
|
||||
})(this)).map((function(_this) {
|
||||
return function(i) {
|
||||
var prefix;
|
||||
prefix = _this.browsers.prefix(i.browser);
|
||||
if (i.note) {
|
||||
return prefix + ' ' + i.note;
|
||||
} else {
|
||||
return prefix;
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
add = this.sort(utils.uniq(add));
|
||||
if (this.options.flexbox === 'no-2009') {
|
||||
add = add.filter(function(i) {
|
||||
return i.indexOf('2009') === -1;
|
||||
});
|
||||
}
|
||||
all = data.browsers.map((function(_this) {
|
||||
return function(i) {
|
||||
return _this.browsers.prefix(i);
|
||||
};
|
||||
})(this));
|
||||
if (data.mistakes) {
|
||||
all = all.concat(data.mistakes);
|
||||
}
|
||||
all = all.concat(notes);
|
||||
all = utils.uniq(all);
|
||||
if (add.length) {
|
||||
selected.add[name] = add;
|
||||
if (add.length < all.length) {
|
||||
selected.remove[name] = all.filter(function(i) {
|
||||
return add.indexOf(i) === -1;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
selected.remove[name] = all;
|
||||
}
|
||||
}
|
||||
return selected;
|
||||
};
|
||||
|
||||
Prefixes.prototype.sort = function(prefixes) {
|
||||
return prefixes.sort(function(a, b) {
|
||||
var aLength, bLength;
|
||||
aLength = utils.removeNote(a).length;
|
||||
bLength = utils.removeNote(b).length;
|
||||
if (aLength === bLength) {
|
||||
return b.length - a.length;
|
||||
} else {
|
||||
return bLength - aLength;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Prefixes.prototype.preprocess = function(selected) {
|
||||
var a, add, j, k, l, len, len1, len2, len3, len4, len5, len6, m, n, name, o, old, olds, p, prefix, prefixed, prefixes, prop, props, ref, ref1, ref2, ref3, remove, selector, value, values;
|
||||
add = {
|
||||
selectors: [],
|
||||
'@supports': new Supports(Prefixes, this)
|
||||
};
|
||||
ref = selected.add;
|
||||
for (name in ref) {
|
||||
prefixes = ref[name];
|
||||
if (name === '@keyframes' || name === '@viewport') {
|
||||
add[name] = new AtRule(name, prefixes, this);
|
||||
} else if (name === '@resolution') {
|
||||
add[name] = new Resolution(name, prefixes, this);
|
||||
} else if (this.data[name].selector) {
|
||||
add.selectors.push(Selector.load(name, prefixes, this));
|
||||
} else {
|
||||
props = this.data[name].props;
|
||||
if (props) {
|
||||
value = Value.load(name, prefixes, this);
|
||||
for (j = 0, len = props.length; j < len; j++) {
|
||||
prop = props[j];
|
||||
if (!add[prop]) {
|
||||
add[prop] = {
|
||||
values: []
|
||||
};
|
||||
}
|
||||
add[prop].values.push(value);
|
||||
}
|
||||
} else {
|
||||
values = ((ref1 = add[name]) != null ? ref1.values : void 0) || [];
|
||||
add[name] = Declaration.load(name, prefixes, this);
|
||||
add[name].values = values;
|
||||
}
|
||||
}
|
||||
}
|
||||
remove = {
|
||||
selectors: []
|
||||
};
|
||||
ref2 = selected.remove;
|
||||
for (name in ref2) {
|
||||
prefixes = ref2[name];
|
||||
if (this.data[name].selector) {
|
||||
selector = Selector.load(name, prefixes);
|
||||
for (k = 0, len1 = prefixes.length; k < len1; k++) {
|
||||
prefix = prefixes[k];
|
||||
remove.selectors.push(selector.old(prefix));
|
||||
}
|
||||
} else if (name === '@keyframes' || name === '@viewport') {
|
||||
for (l = 0, len2 = prefixes.length; l < len2; l++) {
|
||||
prefix = prefixes[l];
|
||||
prefixed = '@' + prefix + name.slice(1);
|
||||
remove[prefixed] = {
|
||||
remove: true
|
||||
};
|
||||
}
|
||||
} else if (name === '@resolution') {
|
||||
remove[name] = new Resolution(name, prefixes, this);
|
||||
} else {
|
||||
props = this.data[name].props;
|
||||
if (props) {
|
||||
value = Value.load(name, [], this);
|
||||
for (m = 0, len3 = prefixes.length; m < len3; m++) {
|
||||
prefix = prefixes[m];
|
||||
old = value.old(prefix);
|
||||
if (old) {
|
||||
for (n = 0, len4 = props.length; n < len4; n++) {
|
||||
prop = props[n];
|
||||
if (!remove[prop]) {
|
||||
remove[prop] = {};
|
||||
}
|
||||
if (!remove[prop].values) {
|
||||
remove[prop].values = [];
|
||||
}
|
||||
remove[prop].values.push(old);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (o = 0, len5 = prefixes.length; o < len5; o++) {
|
||||
prefix = prefixes[o];
|
||||
prop = vendor.unprefixed(name);
|
||||
olds = this.decl(name).old(name, prefix);
|
||||
if (name === 'align-self') {
|
||||
a = (ref3 = add[name]) != null ? ref3.prefixes : void 0;
|
||||
if (a) {
|
||||
if (prefix === '-webkit- 2009' && a.indexOf('-webkit-') !== -1) {
|
||||
continue;
|
||||
} else if (prefix === '-webkit-' && a.indexOf('-webkit- 2009') !== -1) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (p = 0, len6 = olds.length; p < len6; p++) {
|
||||
prefixed = olds[p];
|
||||
if (!remove[prefixed]) {
|
||||
remove[prefixed] = {};
|
||||
}
|
||||
remove[prefixed].remove = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return [add, remove];
|
||||
};
|
||||
|
||||
Prefixes.prototype.decl = function(prop) {
|
||||
var decl;
|
||||
decl = declsCache[prop];
|
||||
if (decl) {
|
||||
return decl;
|
||||
} else {
|
||||
return declsCache[prop] = Declaration.load(prop);
|
||||
}
|
||||
};
|
||||
|
||||
Prefixes.prototype.unprefixed = function(prop) {
|
||||
var value;
|
||||
value = this.normalize(vendor.unprefixed(prop));
|
||||
if (value === 'flex-direction') {
|
||||
value = 'flex-flow';
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
Prefixes.prototype.normalize = function(prop) {
|
||||
return this.decl(prop).normalize(prop);
|
||||
};
|
||||
|
||||
Prefixes.prototype.prefixed = function(prop, prefix) {
|
||||
prop = vendor.unprefixed(prop);
|
||||
return this.decl(prop).prefixed(prop, prefix);
|
||||
};
|
||||
|
||||
Prefixes.prototype.values = function(type, prop) {
|
||||
var data, global, ref, ref1, values;
|
||||
data = this[type];
|
||||
global = (ref = data['*']) != null ? ref.values : void 0;
|
||||
values = (ref1 = data[prop]) != null ? ref1.values : void 0;
|
||||
if (global && values) {
|
||||
return utils.uniq(global.concat(values));
|
||||
} else {
|
||||
return global || values || [];
|
||||
}
|
||||
};
|
||||
|
||||
Prefixes.prototype.group = function(decl) {
|
||||
var checker, index, length, rule, unprefixed;
|
||||
rule = decl.parent;
|
||||
index = rule.index(decl);
|
||||
length = rule.nodes.length;
|
||||
unprefixed = this.unprefixed(decl.prop);
|
||||
checker = (function(_this) {
|
||||
return function(step, callback) {
|
||||
var other;
|
||||
index += step;
|
||||
while (index >= 0 && index < length) {
|
||||
other = rule.nodes[index];
|
||||
if (other.type === 'decl') {
|
||||
if (step === -1 && other.prop === unprefixed) {
|
||||
if (!Browsers.withPrefix(other.value)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (_this.unprefixed(other.prop) !== unprefixed) {
|
||||
break;
|
||||
} else if (callback(other) === true) {
|
||||
return true;
|
||||
}
|
||||
if (step === +1 && other.prop === unprefixed) {
|
||||
if (!Browsers.withPrefix(other.value)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
index += step;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
})(this);
|
||||
return {
|
||||
up: function(callback) {
|
||||
return checker(-1, callback);
|
||||
},
|
||||
down: function(callback) {
|
||||
return checker(+1, callback);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
return Prefixes;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Prefixes;
|
||||
|
||||
}).call(this);
|
||||
322
build/node_modules/cssnano/node_modules/autoprefixer/lib/processor.js
generated
vendored
Normal file
322
build/node_modules/cssnano/node_modules/autoprefixer/lib/processor.js
generated
vendored
Normal file
@@ -0,0 +1,322 @@
|
||||
(function() {
|
||||
var OLD_DIRECTION, Processor, SIZES, Value, utils, vendor;
|
||||
|
||||
vendor = require('postcss/lib/vendor');
|
||||
|
||||
Value = require('./value');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
OLD_DIRECTION = /(^|[^-])(linear|radial)-gradient\(\s*(top|left|right|bottom)/i;
|
||||
|
||||
SIZES = ['width', 'height', 'min-width', 'max-width', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size'];
|
||||
|
||||
Processor = (function() {
|
||||
function Processor(prefixes) {
|
||||
this.prefixes = prefixes;
|
||||
}
|
||||
|
||||
Processor.prototype.add = function(css, result) {
|
||||
var keyframes, resolution, supports, viewport;
|
||||
resolution = this.prefixes.add['@resolution'];
|
||||
keyframes = this.prefixes.add['@keyframes'];
|
||||
viewport = this.prefixes.add['@viewport'];
|
||||
supports = this.prefixes.add['@supports'];
|
||||
css.walkAtRules((function(_this) {
|
||||
return function(rule) {
|
||||
if (rule.name === 'keyframes') {
|
||||
if (!_this.disabled(rule)) {
|
||||
return keyframes != null ? keyframes.process(rule) : void 0;
|
||||
}
|
||||
} else if (rule.name === 'viewport') {
|
||||
if (!_this.disabled(rule)) {
|
||||
return viewport != null ? viewport.process(rule) : void 0;
|
||||
}
|
||||
} else if (rule.name === 'supports') {
|
||||
if (_this.prefixes.options.supports !== false && !_this.disabled(rule)) {
|
||||
return supports.process(rule);
|
||||
}
|
||||
} else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) {
|
||||
if (!_this.disabled(rule)) {
|
||||
return resolution != null ? resolution.process(rule) : void 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
css.walkRules((function(_this) {
|
||||
return function(rule) {
|
||||
var j, len, ref, results, selector;
|
||||
if (_this.disabled(rule)) {
|
||||
return;
|
||||
}
|
||||
ref = _this.prefixes.add.selectors;
|
||||
results = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
selector = ref[j];
|
||||
results.push(selector.process(rule, result));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
})(this));
|
||||
css.walkDecls((function(_this) {
|
||||
return function(decl) {
|
||||
var display, prefixer;
|
||||
if (_this.disabled(decl)) {
|
||||
return;
|
||||
}
|
||||
if (decl.prop === 'display' && decl.value === 'box') {
|
||||
result.warn('You should write display: flex by final spec ' + 'instead of display: box', {
|
||||
node: decl
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (decl.value.indexOf('linear-gradient') !== -1) {
|
||||
if (OLD_DIRECTION.test(decl.value)) {
|
||||
result.warn('Gradient has outdated direction syntax. ' + 'New syntax is like `to left` instead of `right`.', {
|
||||
node: decl
|
||||
});
|
||||
}
|
||||
}
|
||||
if (decl.prop === 'text-emphasis-position') {
|
||||
if (decl.value === 'under' || decl.value === 'over') {
|
||||
result.warn('You should use 2 values for text-emphasis-position ' + 'For example, `under left` instead of just `under`.', {
|
||||
node: decl
|
||||
});
|
||||
}
|
||||
}
|
||||
if (SIZES.indexOf(decl.prop) !== -1) {
|
||||
if (decl.value.indexOf('fill-available') !== -1) {
|
||||
result.warn('Replace fill-available to stretch, ' + 'because spec had been changed', {
|
||||
node: decl
|
||||
});
|
||||
} else if (decl.value.indexOf('fill') !== -1) {
|
||||
result.warn('Replace fill to stretch, because spec had been changed', {
|
||||
node: decl
|
||||
});
|
||||
}
|
||||
}
|
||||
if (_this.prefixes.options.flexbox !== false) {
|
||||
if (decl.prop === 'grid-row-end' && decl.value.indexOf('span') === -1) {
|
||||
result.warn('IE supports only grid-row-end with span. ' + 'You should add grid: false option to Autoprefixer ' + 'and use some JS grid polyfill for full spec support', {
|
||||
node: decl
|
||||
});
|
||||
}
|
||||
if (decl.prop === 'grid-row') {
|
||||
if (decl.value.indexOf('/') !== -1 && decl.value.indexOf('span') === -1) {
|
||||
result.warn('IE supports only grid-row with / and span. ' + 'You should add grid: false option to Autoprefixer ' + 'and use some JS grid polyfill for full spec support', {
|
||||
node: decl
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (decl.prop === 'transition' || decl.prop === 'transition-property') {
|
||||
return _this.prefixes.transition.add(decl, result);
|
||||
} else if (decl.prop === 'align-self') {
|
||||
display = _this.displayType(decl);
|
||||
if (display !== 'grid' && _this.prefixes.options.flexbox !== false) {
|
||||
prefixer = _this.prefixes.add['align-self'];
|
||||
if (prefixer && prefixer.prefixes) {
|
||||
prefixer.process(decl);
|
||||
}
|
||||
}
|
||||
if (display !== 'flex' && _this.prefixes.options.grid !== false) {
|
||||
prefixer = _this.prefixes.add['grid-row-align'];
|
||||
if (prefixer && prefixer.prefixes) {
|
||||
return prefixer.process(decl);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
prefixer = _this.prefixes.add[decl.prop];
|
||||
if (prefixer && prefixer.prefixes) {
|
||||
return prefixer.process(decl);
|
||||
}
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
return css.walkDecls((function(_this) {
|
||||
return function(decl) {
|
||||
var j, len, ref, unprefixed, value;
|
||||
if (_this.disabled(decl)) {
|
||||
return;
|
||||
}
|
||||
unprefixed = _this.prefixes.unprefixed(decl.prop);
|
||||
ref = _this.prefixes.values('add', unprefixed);
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
value = ref[j];
|
||||
value.process(decl, result);
|
||||
}
|
||||
return Value.save(_this.prefixes, decl);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Processor.prototype.remove = function(css) {
|
||||
var checker, j, len, ref, resolution;
|
||||
resolution = this.prefixes.remove['@resolution'];
|
||||
css.walkAtRules((function(_this) {
|
||||
return function(rule, i) {
|
||||
if (_this.prefixes.remove['@' + rule.name]) {
|
||||
if (!_this.disabled(rule)) {
|
||||
return rule.parent.removeChild(i);
|
||||
}
|
||||
} else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) {
|
||||
return resolution != null ? resolution.clean(rule) : void 0;
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
ref = this.prefixes.remove.selectors;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
checker = ref[j];
|
||||
css.walkRules((function(_this) {
|
||||
return function(rule, i) {
|
||||
if (checker.check(rule)) {
|
||||
if (!_this.disabled(rule)) {
|
||||
return rule.parent.removeChild(i);
|
||||
}
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
}
|
||||
return css.walkDecls((function(_this) {
|
||||
return function(decl, i) {
|
||||
var k, len1, notHack, ref1, ref2, rule, unprefixed;
|
||||
if (_this.disabled(decl)) {
|
||||
return;
|
||||
}
|
||||
rule = decl.parent;
|
||||
unprefixed = _this.prefixes.unprefixed(decl.prop);
|
||||
if (decl.prop === 'transition' || decl.prop === 'transition-property') {
|
||||
_this.prefixes.transition.remove(decl);
|
||||
}
|
||||
if ((ref1 = _this.prefixes.remove[decl.prop]) != null ? ref1.remove : void 0) {
|
||||
notHack = _this.prefixes.group(decl).down(function(other) {
|
||||
return _this.prefixes.normalize(other.prop) === unprefixed;
|
||||
});
|
||||
if (unprefixed === 'flex-flow') {
|
||||
notHack = true;
|
||||
}
|
||||
if (notHack && !_this.withHackValue(decl)) {
|
||||
if (decl.raw('before').indexOf("\n") > -1) {
|
||||
_this.reduceSpaces(decl);
|
||||
}
|
||||
rule.removeChild(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
ref2 = _this.prefixes.values('remove', unprefixed);
|
||||
for (k = 0, len1 = ref2.length; k < len1; k++) {
|
||||
checker = ref2[k];
|
||||
if (checker.check(decl.value)) {
|
||||
unprefixed = checker.unprefixed;
|
||||
notHack = _this.prefixes.group(decl).down(function(other) {
|
||||
return other.value.indexOf(unprefixed) !== -1;
|
||||
});
|
||||
if (notHack) {
|
||||
rule.removeChild(i);
|
||||
return;
|
||||
} else if (checker.clean) {
|
||||
checker.clean(decl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Processor.prototype.withHackValue = function(decl) {
|
||||
return decl.prop === '-webkit-background-clip' && decl.value === 'text';
|
||||
};
|
||||
|
||||
Processor.prototype.disabled = function(node) {
|
||||
var other, status;
|
||||
if (this.prefixes.options.grid === false && node.type === 'decl') {
|
||||
if (node.prop === 'display' && node.value.indexOf('grid') !== -1) {
|
||||
return true;
|
||||
}
|
||||
if (node.prop.indexOf('grid') !== -1 || node.prop === 'justify-items') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (this.prefixes.options.flexbox === false && node.type === 'decl') {
|
||||
if (node.prop === 'display' && node.value.indexOf('flex') !== -1) {
|
||||
return true;
|
||||
}
|
||||
other = ['order', 'justify-content', 'align-items', 'align-content'];
|
||||
if (node.prop.indexOf('flex') !== -1 || other.indexOf(node.prop) !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (node._autoprefixerDisabled != null) {
|
||||
return node._autoprefixerDisabled;
|
||||
} else if (node.nodes) {
|
||||
status = void 0;
|
||||
node.each(function(i) {
|
||||
if (i.type !== 'comment') {
|
||||
return;
|
||||
}
|
||||
if (/(!\s*)?autoprefixer:\s*off/i.test(i.text)) {
|
||||
status = false;
|
||||
return false;
|
||||
} else if (/(!\s*)?autoprefixer:\s*on/i.test(i.text)) {
|
||||
status = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return node._autoprefixerDisabled = status != null ? !status : node.parent ? this.disabled(node.parent) : false;
|
||||
} else if (node.parent) {
|
||||
return node._autoprefixerDisabled = this.disabled(node.parent);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Processor.prototype.reduceSpaces = function(decl) {
|
||||
var diff, parts, prevMin, stop;
|
||||
stop = false;
|
||||
this.prefixes.group(decl).up(function(other) {
|
||||
return stop = true;
|
||||
});
|
||||
if (stop) {
|
||||
return;
|
||||
}
|
||||
parts = decl.raw('before').split("\n");
|
||||
prevMin = parts[parts.length - 1].length;
|
||||
diff = false;
|
||||
return this.prefixes.group(decl).down(function(other) {
|
||||
var last;
|
||||
parts = other.raw('before').split("\n");
|
||||
last = parts.length - 1;
|
||||
if (parts[last].length > prevMin) {
|
||||
if (diff === false) {
|
||||
diff = parts[last].length - prevMin;
|
||||
}
|
||||
parts[last] = parts[last].slice(0, -diff);
|
||||
return other.raws.before = parts.join("\n");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Processor.prototype.displayType = function(decl) {
|
||||
var i, j, len, ref;
|
||||
ref = decl.parent.nodes;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
i = ref[j];
|
||||
if (i.prop === 'display') {
|
||||
if (i.value.indexOf('flex') !== -1) {
|
||||
return 'flex';
|
||||
} else if (i.value.indexOf('grid') !== -1) {
|
||||
return 'grid';
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
return Processor;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Processor;
|
||||
|
||||
}).call(this);
|
||||
98
build/node_modules/cssnano/node_modules/autoprefixer/lib/resolution.js
generated
vendored
Normal file
98
build/node_modules/cssnano/node_modules/autoprefixer/lib/resolution.js
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
(function() {
|
||||
var Prefixer, Resolution, n2f, regexp, split, utils,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Prefixer = require('./prefixer');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
n2f = require('num2fraction');
|
||||
|
||||
regexp = /(min|max)-resolution\s*:\s*\d*\.?\d+(dppx|dpi)/gi;
|
||||
|
||||
split = /(min|max)-resolution(\s*:\s*)(\d*\.?\d+)(dppx|dpi)/i;
|
||||
|
||||
Resolution = (function(superClass) {
|
||||
extend(Resolution, superClass);
|
||||
|
||||
function Resolution() {
|
||||
return Resolution.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Resolution.prototype.prefixName = function(prefix, name) {
|
||||
return name = prefix === '-moz-' ? name + '--moz-device-pixel-ratio' : prefix + name + '-device-pixel-ratio';
|
||||
};
|
||||
|
||||
Resolution.prototype.prefixQuery = function(prefix, name, colon, value, units) {
|
||||
if (units === 'dpi') {
|
||||
value = Number(value / 96);
|
||||
}
|
||||
if (prefix === '-o-') {
|
||||
value = n2f(value);
|
||||
}
|
||||
return this.prefixName(prefix, name) + colon + value;
|
||||
};
|
||||
|
||||
Resolution.prototype.clean = function(rule) {
|
||||
var j, len, prefix, ref;
|
||||
if (!this.bad) {
|
||||
this.bad = [];
|
||||
ref = this.prefixes;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
prefix = ref[j];
|
||||
this.bad.push(this.prefixName(prefix, 'min'));
|
||||
this.bad.push(this.prefixName(prefix, 'max'));
|
||||
}
|
||||
}
|
||||
return rule.params = utils.editList(rule.params, (function(_this) {
|
||||
return function(queries) {
|
||||
return queries.filter(function(query) {
|
||||
return _this.bad.every(function(i) {
|
||||
return query.indexOf(i) === -1;
|
||||
});
|
||||
});
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Resolution.prototype.process = function(rule) {
|
||||
var parent, prefixes;
|
||||
parent = this.parentPrefix(rule);
|
||||
prefixes = parent ? [parent] : this.prefixes;
|
||||
return rule.params = utils.editList(rule.params, (function(_this) {
|
||||
return function(origin, prefixed) {
|
||||
var j, k, len, len1, prefix, processed, query;
|
||||
for (j = 0, len = origin.length; j < len; j++) {
|
||||
query = origin[j];
|
||||
if (query.indexOf('min-resolution') === -1 && query.indexOf('max-resolution') === -1) {
|
||||
prefixed.push(query);
|
||||
continue;
|
||||
}
|
||||
for (k = 0, len1 = prefixes.length; k < len1; k++) {
|
||||
prefix = prefixes[k];
|
||||
if (prefix === '-moz-' && rule.params.indexOf('dpi') !== -1) {
|
||||
continue;
|
||||
} else {
|
||||
processed = query.replace(regexp, function(str) {
|
||||
var parts;
|
||||
parts = str.match(split);
|
||||
return _this.prefixQuery(prefix, parts[1], parts[2], parts[3], parts[4]);
|
||||
});
|
||||
prefixed.push(processed);
|
||||
}
|
||||
}
|
||||
prefixed.push(query);
|
||||
}
|
||||
return utils.uniq(prefixed);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
return Resolution;
|
||||
|
||||
})(Prefixer);
|
||||
|
||||
module.exports = Resolution;
|
||||
|
||||
}).call(this);
|
||||
117
build/node_modules/cssnano/node_modules/autoprefixer/lib/selector.js
generated
vendored
Normal file
117
build/node_modules/cssnano/node_modules/autoprefixer/lib/selector.js
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
(function() {
|
||||
var Browsers, OldSelector, Prefixer, Selector, utils,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldSelector = require('./old-selector');
|
||||
|
||||
Prefixer = require('./prefixer');
|
||||
|
||||
Browsers = require('./browsers');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
Selector = (function(superClass) {
|
||||
extend(Selector, superClass);
|
||||
|
||||
function Selector(name1, prefixes, all) {
|
||||
this.name = name1;
|
||||
this.prefixes = prefixes;
|
||||
this.all = all;
|
||||
this.regexpCache = {};
|
||||
}
|
||||
|
||||
Selector.prototype.check = function(rule) {
|
||||
if (rule.selector.indexOf(this.name) !== -1) {
|
||||
return !!rule.selector.match(this.regexp());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Selector.prototype.prefixed = function(prefix) {
|
||||
return this.name.replace(/^([^\w]*)/, '$1' + prefix);
|
||||
};
|
||||
|
||||
Selector.prototype.regexp = function(prefix) {
|
||||
var name;
|
||||
if (this.regexpCache[prefix]) {
|
||||
return this.regexpCache[prefix];
|
||||
}
|
||||
name = prefix ? this.prefixed(prefix) : this.name;
|
||||
return this.regexpCache[prefix] = RegExp("(^|[^:\"'=])" + (utils.escapeRegexp(name)), "gi");
|
||||
};
|
||||
|
||||
Selector.prototype.possible = function() {
|
||||
return Browsers.prefixes();
|
||||
};
|
||||
|
||||
Selector.prototype.prefixeds = function(rule) {
|
||||
var i, len, prefix, prefixeds, ref;
|
||||
if (rule._autoprefixerPrefixeds) {
|
||||
return rule._autoprefixerPrefixeds;
|
||||
}
|
||||
prefixeds = {};
|
||||
ref = this.possible();
|
||||
for (i = 0, len = ref.length; i < len; i++) {
|
||||
prefix = ref[i];
|
||||
prefixeds[prefix] = this.replace(rule.selector, prefix);
|
||||
}
|
||||
return rule._autoprefixerPrefixeds = prefixeds;
|
||||
};
|
||||
|
||||
Selector.prototype.already = function(rule, prefixeds, prefix) {
|
||||
var before, index, key, prefixed, some;
|
||||
index = rule.parent.index(rule) - 1;
|
||||
while (index >= 0) {
|
||||
before = rule.parent.nodes[index];
|
||||
if (before.type !== 'rule') {
|
||||
return false;
|
||||
}
|
||||
some = false;
|
||||
for (key in prefixeds) {
|
||||
prefixed = prefixeds[key];
|
||||
if (before.selector === prefixed) {
|
||||
if (prefix === key) {
|
||||
return true;
|
||||
} else {
|
||||
some = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!some) {
|
||||
return false;
|
||||
}
|
||||
index -= 1;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
Selector.prototype.replace = function(selector, prefix) {
|
||||
return selector.replace(this.regexp(), '$1' + this.prefixed(prefix));
|
||||
};
|
||||
|
||||
Selector.prototype.add = function(rule, prefix) {
|
||||
var cloned, prefixeds;
|
||||
prefixeds = this.prefixeds(rule);
|
||||
if (this.already(rule, prefixeds, prefix)) {
|
||||
return;
|
||||
}
|
||||
cloned = this.clone(rule, {
|
||||
selector: prefixeds[prefix]
|
||||
});
|
||||
return rule.parent.insertBefore(rule, cloned);
|
||||
};
|
||||
|
||||
Selector.prototype.old = function(prefix) {
|
||||
return new OldSelector(this, prefix);
|
||||
};
|
||||
|
||||
return Selector;
|
||||
|
||||
})(Prefixer);
|
||||
|
||||
module.exports = Selector;
|
||||
|
||||
}).call(this);
|
||||
255
build/node_modules/cssnano/node_modules/autoprefixer/lib/supports.js
generated
vendored
Normal file
255
build/node_modules/cssnano/node_modules/autoprefixer/lib/supports.js
generated
vendored
Normal file
@@ -0,0 +1,255 @@
|
||||
(function() {
|
||||
var Browsers, Supports, Value, brackets, browser, data, postcss, ref, support, supported, utils, version, versions;
|
||||
|
||||
Browsers = require('./browsers');
|
||||
|
||||
brackets = require('./brackets');
|
||||
|
||||
Value = require('./value');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
postcss = require('postcss');
|
||||
|
||||
supported = [];
|
||||
|
||||
data = require('caniuse-db/features-json/css-featurequeries.json');
|
||||
|
||||
ref = data.stats;
|
||||
for (browser in ref) {
|
||||
versions = ref[browser];
|
||||
for (version in versions) {
|
||||
support = versions[version];
|
||||
if (/y/.test(support)) {
|
||||
supported.push(browser + ' ' + version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Supports = (function() {
|
||||
function Supports(Prefixes, all1) {
|
||||
this.Prefixes = Prefixes;
|
||||
this.all = all1;
|
||||
}
|
||||
|
||||
Supports.prototype.prefixer = function() {
|
||||
var browsers, filtered;
|
||||
if (this.prefixerCache) {
|
||||
return this.prefixerCache;
|
||||
}
|
||||
filtered = this.all.browsers.selected.filter((function(_this) {
|
||||
return function(i) {
|
||||
return supported.indexOf(i) !== -1;
|
||||
};
|
||||
})(this));
|
||||
browsers = new Browsers(this.all.browsers.data, filtered, this.all.options);
|
||||
return this.prefixerCache = new this.Prefixes(this.all.data, browsers, this.all.options);
|
||||
};
|
||||
|
||||
Supports.prototype.parse = function(str) {
|
||||
var prop, ref1, value;
|
||||
ref1 = str.split(':'), prop = ref1[0], value = ref1[1];
|
||||
value || (value = '');
|
||||
return [prop.trim(), value.trim()];
|
||||
};
|
||||
|
||||
Supports.prototype.virtual = function(str) {
|
||||
var prop, ref1, rule, value;
|
||||
ref1 = this.parse(str), prop = ref1[0], value = ref1[1];
|
||||
rule = postcss.parse('a{}').first;
|
||||
rule.append({
|
||||
prop: prop,
|
||||
value: value,
|
||||
raws: {
|
||||
before: ''
|
||||
}
|
||||
});
|
||||
return rule;
|
||||
};
|
||||
|
||||
Supports.prototype.prefixed = function(str) {
|
||||
var decl, j, k, len, len1, prefixer, ref1, ref2, rule, value;
|
||||
rule = this.virtual(str);
|
||||
if (this.disabled(rule.first)) {
|
||||
return rule.nodes;
|
||||
}
|
||||
prefixer = this.prefixer().add[rule.first.prop];
|
||||
if (prefixer != null) {
|
||||
if (typeof prefixer.process === "function") {
|
||||
prefixer.process(rule.first);
|
||||
}
|
||||
}
|
||||
ref1 = rule.nodes;
|
||||
for (j = 0, len = ref1.length; j < len; j++) {
|
||||
decl = ref1[j];
|
||||
ref2 = this.prefixer().values('add', rule.first.prop);
|
||||
for (k = 0, len1 = ref2.length; k < len1; k++) {
|
||||
value = ref2[k];
|
||||
value.process(decl);
|
||||
}
|
||||
Value.save(this.all, decl);
|
||||
}
|
||||
return rule.nodes;
|
||||
};
|
||||
|
||||
Supports.prototype.isNot = function(node) {
|
||||
return typeof node === 'string' && /not\s*/i.test(node);
|
||||
};
|
||||
|
||||
Supports.prototype.isOr = function(node) {
|
||||
return typeof node === 'string' && /\s*or\s*/i.test(node);
|
||||
};
|
||||
|
||||
Supports.prototype.isProp = function(node) {
|
||||
return typeof node === 'object' && node.length === 1 && typeof node[0] === 'string';
|
||||
};
|
||||
|
||||
Supports.prototype.isHack = function(all, unprefixed) {
|
||||
var check;
|
||||
check = new RegExp('(\\(|\\s)' + utils.escapeRegexp(unprefixed) + ':');
|
||||
return !check.test(all);
|
||||
};
|
||||
|
||||
Supports.prototype.toRemove = function(str, all) {
|
||||
var checker, j, len, prop, ref1, ref2, ref3, unprefixed, value;
|
||||
ref1 = this.parse(str), prop = ref1[0], value = ref1[1];
|
||||
unprefixed = this.all.unprefixed(prop);
|
||||
if (((ref2 = this.all.cleaner().remove[prop]) != null ? ref2.remove : void 0) && !this.isHack(all, unprefixed)) {
|
||||
return true;
|
||||
}
|
||||
ref3 = this.all.cleaner().values('remove', unprefixed);
|
||||
for (j = 0, len = ref3.length; j < len; j++) {
|
||||
checker = ref3[j];
|
||||
if (checker.check(value)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
Supports.prototype.remove = function(nodes, all) {
|
||||
var i;
|
||||
i = 0;
|
||||
while (i < nodes.length) {
|
||||
if (!this.isNot(nodes[i - 1]) && this.isProp(nodes[i]) && this.isOr(nodes[i + 1])) {
|
||||
if (this.toRemove(nodes[i][0], all)) {
|
||||
nodes.splice(i, 2);
|
||||
} else {
|
||||
i += 2;
|
||||
}
|
||||
} else {
|
||||
if (typeof nodes[i] === 'object') {
|
||||
nodes[i] = this.remove(nodes[i], all);
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
return nodes;
|
||||
};
|
||||
|
||||
Supports.prototype.cleanBrackets = function(nodes) {
|
||||
return nodes.map((function(_this) {
|
||||
return function(i) {
|
||||
if (typeof i === 'object') {
|
||||
if (i.length === 1 && typeof i[0] === 'object') {
|
||||
return _this.cleanBrackets(i[0]);
|
||||
} else {
|
||||
return _this.cleanBrackets(i);
|
||||
}
|
||||
} else {
|
||||
return i;
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Supports.prototype.convert = function(progress) {
|
||||
var i, j, len, result;
|
||||
result = [''];
|
||||
for (j = 0, len = progress.length; j < len; j++) {
|
||||
i = progress[j];
|
||||
result.push([i.prop + ": " + i.value]);
|
||||
result.push(' or ');
|
||||
}
|
||||
result[result.length - 1] = '';
|
||||
return result;
|
||||
};
|
||||
|
||||
Supports.prototype.normalize = function(nodes) {
|
||||
if (typeof nodes === 'object') {
|
||||
nodes = nodes.filter(function(i) {
|
||||
return i !== '';
|
||||
});
|
||||
if (typeof nodes[0] === 'string' && nodes[0].indexOf(':') !== -1) {
|
||||
return [brackets.stringify(nodes)];
|
||||
} else {
|
||||
return nodes.map((function(_this) {
|
||||
return function(i) {
|
||||
return _this.normalize(i);
|
||||
};
|
||||
})(this));
|
||||
}
|
||||
} else {
|
||||
return nodes;
|
||||
}
|
||||
};
|
||||
|
||||
Supports.prototype.add = function(nodes, all) {
|
||||
return nodes.map((function(_this) {
|
||||
return function(i) {
|
||||
var prefixed;
|
||||
if (_this.isProp(i)) {
|
||||
prefixed = _this.prefixed(i[0]);
|
||||
if (prefixed.length > 1) {
|
||||
return _this.convert(prefixed);
|
||||
} else {
|
||||
return i;
|
||||
}
|
||||
} else if (typeof i === 'object') {
|
||||
return _this.add(i, all);
|
||||
} else {
|
||||
return i;
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Supports.prototype.process = function(rule) {
|
||||
var ast;
|
||||
ast = brackets.parse(rule.params);
|
||||
ast = this.normalize(ast);
|
||||
ast = this.remove(ast, rule.params);
|
||||
ast = this.add(ast, rule.params);
|
||||
ast = this.cleanBrackets(ast);
|
||||
return rule.params = brackets.stringify(ast);
|
||||
};
|
||||
|
||||
Supports.prototype.disabled = function(node) {
|
||||
var other;
|
||||
if (this.all.options.grid === false) {
|
||||
if (node.prop === 'display' && node.value.indexOf('grid') !== -1) {
|
||||
return true;
|
||||
}
|
||||
if (node.prop.indexOf('grid') !== -1 || node.prop === 'justify-items') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (this.all.options.flexbox === false) {
|
||||
if (node.prop === 'display' && node.value.indexOf('flex') !== -1) {
|
||||
return true;
|
||||
}
|
||||
other = ['order', 'justify-content', 'align-items', 'align-content'];
|
||||
if (node.prop.indexOf('flex') !== -1 || other.indexOf(node.prop) !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
return Supports;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Supports;
|
||||
|
||||
}).call(this);
|
||||
291
build/node_modules/cssnano/node_modules/autoprefixer/lib/transition.js
generated
vendored
Normal file
291
build/node_modules/cssnano/node_modules/autoprefixer/lib/transition.js
generated
vendored
Normal file
@@ -0,0 +1,291 @@
|
||||
(function() {
|
||||
var Transition, list, parser, vendor;
|
||||
|
||||
parser = require('postcss-value-parser');
|
||||
|
||||
vendor = require('postcss/lib/vendor');
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
Transition = (function() {
|
||||
function Transition(prefixes) {
|
||||
this.prefixes = prefixes;
|
||||
}
|
||||
|
||||
Transition.prototype.props = ['transition', 'transition-property'];
|
||||
|
||||
Transition.prototype.add = function(decl, result) {
|
||||
var added, declPrefixes, j, k, l, len, len1, len2, names, operaClean, param, params, prefix, prefixValue, prefixed, prefixer, prop, ref, ref1, value, webkitClean;
|
||||
declPrefixes = ((ref = this.prefixes.add[decl.prop]) != null ? ref.prefixes : void 0) || [];
|
||||
params = this.parse(decl.value);
|
||||
names = params.map((function(_this) {
|
||||
return function(i) {
|
||||
return _this.findProp(i);
|
||||
};
|
||||
})(this));
|
||||
added = [];
|
||||
if (names.some(function(i) {
|
||||
return i[0] === '-';
|
||||
})) {
|
||||
return;
|
||||
}
|
||||
for (j = 0, len = params.length; j < len; j++) {
|
||||
param = params[j];
|
||||
prop = this.findProp(param);
|
||||
if (prop[0] === '-') {
|
||||
continue;
|
||||
}
|
||||
prefixer = this.prefixes.add[prop];
|
||||
if (!(prefixer != null ? prefixer.prefixes : void 0)) {
|
||||
continue;
|
||||
}
|
||||
ref1 = prefixer.prefixes;
|
||||
for (k = 0, len1 = ref1.length; k < len1; k++) {
|
||||
prefix = ref1[k];
|
||||
prefixed = this.prefixes.prefixed(prop, prefix);
|
||||
if (prefixed !== '-ms-transform' && names.indexOf(prefixed) === -1) {
|
||||
if (!this.disabled(prop, prefix)) {
|
||||
added.push(this.clone(prop, prefixed, param));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
params = params.concat(added);
|
||||
value = this.stringify(params);
|
||||
webkitClean = this.stringify(this.cleanFromUnprefixed(params, '-webkit-'));
|
||||
if (declPrefixes.indexOf('-webkit-') !== -1) {
|
||||
this.cloneBefore(decl, '-webkit-' + decl.prop, webkitClean);
|
||||
}
|
||||
this.cloneBefore(decl, decl.prop, webkitClean);
|
||||
if (declPrefixes.indexOf('-o-') !== -1) {
|
||||
operaClean = this.stringify(this.cleanFromUnprefixed(params, '-o-'));
|
||||
this.cloneBefore(decl, '-o-' + decl.prop, operaClean);
|
||||
}
|
||||
for (l = 0, len2 = declPrefixes.length; l < len2; l++) {
|
||||
prefix = declPrefixes[l];
|
||||
if (prefix !== '-webkit-' && prefix !== '-o-') {
|
||||
prefixValue = this.stringify(this.cleanOtherPrefixes(params, prefix));
|
||||
this.cloneBefore(decl, prefix + decl.prop, prefixValue);
|
||||
}
|
||||
}
|
||||
if (value !== decl.value && !this.already(decl, decl.prop, value)) {
|
||||
this.checkForWarning(result, decl);
|
||||
decl.cloneBefore();
|
||||
return decl.value = value;
|
||||
}
|
||||
};
|
||||
|
||||
Transition.prototype.findProp = function(param) {
|
||||
var i, j, len, prop, token;
|
||||
prop = param[0].value;
|
||||
if (/^\d/.test(prop)) {
|
||||
for (i = j = 0, len = param.length; j < len; i = ++j) {
|
||||
token = param[i];
|
||||
if (i !== 0 && token.type === 'word') {
|
||||
return token.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return prop;
|
||||
};
|
||||
|
||||
Transition.prototype.already = function(decl, prop, value) {
|
||||
return decl.parent.some(function(i) {
|
||||
return i.prop === prop && i.value === value;
|
||||
});
|
||||
};
|
||||
|
||||
Transition.prototype.cloneBefore = function(decl, prop, value) {
|
||||
if (!this.already(decl, prop, value)) {
|
||||
return decl.cloneBefore({
|
||||
prop: prop,
|
||||
value: value
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Transition.prototype.checkForWarning = function(result, decl) {
|
||||
if (decl.prop === 'transition-property') {
|
||||
return decl.parent.each(function(i) {
|
||||
if (i.type !== 'decl') {
|
||||
return;
|
||||
}
|
||||
if (i.prop.indexOf('transition-') !== 0) {
|
||||
return;
|
||||
}
|
||||
if (i.prop === 'transition-property') {
|
||||
return;
|
||||
}
|
||||
if (list.comma(i.value).length > 1) {
|
||||
decl.warn(result, 'Replace transition-property to transition, ' + 'because Autoprefixer could not support ' + 'any cases of transition-property ' + 'and other transition-*');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Transition.prototype.remove = function(decl) {
|
||||
var double, params, smaller, value;
|
||||
params = this.parse(decl.value);
|
||||
params = params.filter((function(_this) {
|
||||
return function(i) {
|
||||
var ref;
|
||||
return !((ref = _this.prefixes.remove[_this.findProp(i)]) != null ? ref.remove : void 0);
|
||||
};
|
||||
})(this));
|
||||
value = this.stringify(params);
|
||||
if (decl.value === value) {
|
||||
return;
|
||||
}
|
||||
if (params.length === 0) {
|
||||
decl.remove();
|
||||
return;
|
||||
}
|
||||
double = decl.parent.some(function(i) {
|
||||
return i.prop === decl.prop && i.value === value;
|
||||
});
|
||||
smaller = decl.parent.some(function(i) {
|
||||
return i !== decl && i.prop === decl.prop && i.value.length > value.length;
|
||||
});
|
||||
if (double || smaller) {
|
||||
return decl.remove();
|
||||
} else {
|
||||
return decl.value = value;
|
||||
}
|
||||
};
|
||||
|
||||
Transition.prototype.parse = function(value) {
|
||||
var ast, j, len, node, param, ref, result;
|
||||
ast = parser(value);
|
||||
result = [];
|
||||
param = [];
|
||||
ref = ast.nodes;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
node = ref[j];
|
||||
param.push(node);
|
||||
if (node.type === 'div' && node.value === ',') {
|
||||
result.push(param);
|
||||
param = [];
|
||||
}
|
||||
}
|
||||
result.push(param);
|
||||
return result.filter(function(i) {
|
||||
return i.length > 0;
|
||||
});
|
||||
};
|
||||
|
||||
Transition.prototype.stringify = function(params) {
|
||||
var j, len, nodes, param;
|
||||
if (params.length === 0) {
|
||||
return '';
|
||||
}
|
||||
nodes = [];
|
||||
for (j = 0, len = params.length; j < len; j++) {
|
||||
param = params[j];
|
||||
if (param[param.length - 1].type !== 'div') {
|
||||
param.push(this.div(params));
|
||||
}
|
||||
nodes = nodes.concat(param);
|
||||
}
|
||||
if (nodes[0].type === 'div') {
|
||||
nodes = nodes.slice(1);
|
||||
}
|
||||
if (nodes[nodes.length - 1].type === 'div') {
|
||||
nodes = nodes.slice(0, -1);
|
||||
}
|
||||
return parser.stringify({
|
||||
nodes: nodes
|
||||
});
|
||||
};
|
||||
|
||||
Transition.prototype.clone = function(origin, name, param) {
|
||||
var changed, i, j, len, result;
|
||||
result = [];
|
||||
changed = false;
|
||||
for (j = 0, len = param.length; j < len; j++) {
|
||||
i = param[j];
|
||||
if (!changed && i.type === 'word' && i.value === origin) {
|
||||
result.push({
|
||||
type: 'word',
|
||||
value: name
|
||||
});
|
||||
changed = true;
|
||||
} else {
|
||||
result.push(i);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
Transition.prototype.div = function(params) {
|
||||
var j, k, len, len1, node, param;
|
||||
for (j = 0, len = params.length; j < len; j++) {
|
||||
param = params[j];
|
||||
for (k = 0, len1 = param.length; k < len1; k++) {
|
||||
node = param[k];
|
||||
if (node.type === 'div' && node.value === ',') {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
type: 'div',
|
||||
value: ',',
|
||||
after: ' '
|
||||
};
|
||||
};
|
||||
|
||||
Transition.prototype.cleanOtherPrefixes = function(params, prefix) {
|
||||
return params.filter((function(_this) {
|
||||
return function(param) {
|
||||
var current;
|
||||
current = vendor.prefix(_this.findProp(param));
|
||||
return current === '' || current === prefix;
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Transition.prototype.cleanFromUnprefixed = function(params, prefix) {
|
||||
var j, len, p, param, prop, remove, result;
|
||||
result = [];
|
||||
remove = params.map((function(_this) {
|
||||
return function(i) {
|
||||
return _this.findProp(i);
|
||||
};
|
||||
})(this)).filter(function(i) {
|
||||
return i.slice(0, prefix.length) === prefix;
|
||||
}).map((function(_this) {
|
||||
return function(i) {
|
||||
return _this.prefixes.unprefixed(i);
|
||||
};
|
||||
})(this));
|
||||
for (j = 0, len = params.length; j < len; j++) {
|
||||
param = params[j];
|
||||
prop = this.findProp(param);
|
||||
p = vendor.prefix(prop);
|
||||
if (remove.indexOf(prop) === -1 && (p === prefix || p === '')) {
|
||||
result.push(param);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
Transition.prototype.disabled = function(prop, prefix) {
|
||||
var other;
|
||||
other = ['order', 'justify-content', 'align-self', 'align-content'];
|
||||
if (prop.indexOf('flex') !== -1 || other.indexOf(prop) !== -1) {
|
||||
if (this.prefixes.options.flexbox === false) {
|
||||
return true;
|
||||
} else if (this.prefixes.options.flexbox === 'no-2009') {
|
||||
return prefix.indexOf('2009') !== -1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return Transition;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Transition;
|
||||
|
||||
}).call(this);
|
||||
57
build/node_modules/cssnano/node_modules/autoprefixer/lib/utils.js
generated
vendored
Normal file
57
build/node_modules/cssnano/node_modules/autoprefixer/lib/utils.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
(function() {
|
||||
var list;
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
module.exports = {
|
||||
error: function(text) {
|
||||
var err;
|
||||
err = new Error(text);
|
||||
err.autoprefixer = true;
|
||||
throw err;
|
||||
},
|
||||
uniq: function(array) {
|
||||
var filtered, i, j, len;
|
||||
filtered = [];
|
||||
for (j = 0, len = array.length; j < len; j++) {
|
||||
i = array[j];
|
||||
if (filtered.indexOf(i) === -1) {
|
||||
filtered.push(i);
|
||||
}
|
||||
}
|
||||
return filtered;
|
||||
},
|
||||
removeNote: function(string) {
|
||||
if (string.indexOf(' ') === -1) {
|
||||
return string;
|
||||
} else {
|
||||
return string.split(' ')[0];
|
||||
}
|
||||
},
|
||||
escapeRegexp: function(string) {
|
||||
return string.replace(/[.?*+\^\$\[\]\\(){}|\-]/g, '\\$&');
|
||||
},
|
||||
regexp: function(word, escape) {
|
||||
if (escape == null) {
|
||||
escape = true;
|
||||
}
|
||||
if (escape) {
|
||||
word = this.escapeRegexp(word);
|
||||
}
|
||||
return RegExp("(^|[\\s,(])(" + word + "($|[\\s(,]))", "gi");
|
||||
},
|
||||
editList: function(value, callback) {
|
||||
var changed, join, origin;
|
||||
origin = list.comma(value);
|
||||
changed = callback(origin, []);
|
||||
if (origin === changed) {
|
||||
return value;
|
||||
} else {
|
||||
join = value.match(/,\s*/);
|
||||
join = join ? join[0] : ', ';
|
||||
return changed.join(join);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
108
build/node_modules/cssnano/node_modules/autoprefixer/lib/value.js
generated
vendored
Normal file
108
build/node_modules/cssnano/node_modules/autoprefixer/lib/value.js
generated
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
(function() {
|
||||
var OldValue, Prefixer, Value, utils, vendor,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Prefixer = require('./prefixer');
|
||||
|
||||
OldValue = require('./old-value');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
vendor = require('postcss/lib/vendor');
|
||||
|
||||
Value = (function(superClass) {
|
||||
extend(Value, superClass);
|
||||
|
||||
function Value() {
|
||||
return Value.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Value.save = function(prefixes, decl) {
|
||||
var already, cloned, prefix, prefixed, prop, propPrefix, ref, results, rule, trimmed, value;
|
||||
prop = decl.prop;
|
||||
ref = decl._autoprefixerValues;
|
||||
results = [];
|
||||
for (prefix in ref) {
|
||||
value = ref[prefix];
|
||||
if (value === decl.value) {
|
||||
continue;
|
||||
}
|
||||
propPrefix = vendor.prefix(prop);
|
||||
if (propPrefix === prefix) {
|
||||
results.push(decl.value = value);
|
||||
} else if (propPrefix === '-pie-') {
|
||||
continue;
|
||||
} else {
|
||||
prefixed = prefixes.prefixed(prop, prefix);
|
||||
rule = decl.parent;
|
||||
if (rule.every(function(i) {
|
||||
return i.prop !== prefixed;
|
||||
})) {
|
||||
trimmed = value.replace(/\s+/, ' ');
|
||||
already = rule.some(function(i) {
|
||||
return i.prop === decl.prop && i.value.replace(/\s+/, ' ') === trimmed;
|
||||
});
|
||||
if (!already) {
|
||||
cloned = this.clone(decl, {
|
||||
value: value
|
||||
});
|
||||
results.push(decl.parent.insertBefore(decl, cloned));
|
||||
} else {
|
||||
results.push(void 0);
|
||||
}
|
||||
} else {
|
||||
results.push(void 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
Value.prototype.check = function(decl) {
|
||||
var value;
|
||||
value = decl.value;
|
||||
if (value.indexOf(this.name) !== -1) {
|
||||
return !!value.match(this.regexp());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Value.prototype.regexp = function() {
|
||||
return this.regexpCache || (this.regexpCache = utils.regexp(this.name));
|
||||
};
|
||||
|
||||
Value.prototype.replace = function(string, prefix) {
|
||||
return string.replace(this.regexp(), '$1' + prefix + '$2');
|
||||
};
|
||||
|
||||
Value.prototype.value = function(decl) {
|
||||
if (decl.raws.value && decl.raws.value.value === decl.value) {
|
||||
return decl.raws.value.raw;
|
||||
} else {
|
||||
return decl.value;
|
||||
}
|
||||
};
|
||||
|
||||
Value.prototype.add = function(decl, prefix) {
|
||||
var value;
|
||||
decl._autoprefixerValues || (decl._autoprefixerValues = {});
|
||||
value = decl._autoprefixerValues[prefix] || this.value(decl);
|
||||
value = this.replace(value, prefix);
|
||||
if (value) {
|
||||
return decl._autoprefixerValues[prefix] = value;
|
||||
}
|
||||
};
|
||||
|
||||
Value.prototype.old = function(prefix) {
|
||||
return new OldValue(this.name, prefix + this.name);
|
||||
};
|
||||
|
||||
return Value;
|
||||
|
||||
})(Prefixer);
|
||||
|
||||
module.exports = Value;
|
||||
|
||||
}).call(this);
|
||||
535
build/node_modules/cssnano/node_modules/autoprefixer/package.json
generated
vendored
Normal file
535
build/node_modules/cssnano/node_modules/autoprefixer/package.json
generated
vendored
Normal file
@@ -0,0 +1,535 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"autoprefixer@6.7.7",
|
||||
"/Users/asciidisco/Desktop/asciidisco.com/build"
|
||||
]
|
||||
],
|
||||
"_from": "autoprefixer@6.7.7",
|
||||
"_id": "autoprefixer@6.7.7",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=",
|
||||
"_location": "/cssnano/autoprefixer",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "autoprefixer@6.7.7",
|
||||
"name": "autoprefixer",
|
||||
"escapedName": "autoprefixer",
|
||||
"rawSpec": "6.7.7",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "6.7.7"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cssnano"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz",
|
||||
"_spec": "6.7.7",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
|
||||
"author": {
|
||||
"name": "Andrey Sitnik",
|
||||
"email": "andrey@sitnik.ru"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/postcss/autoprefixer/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Aaron",
|
||||
"email": "me@aaron.md"
|
||||
},
|
||||
{
|
||||
"name": "Adam Lynch",
|
||||
"email": "contact@adamlynch.ie"
|
||||
},
|
||||
{
|
||||
"name": "Adonis K",
|
||||
"email": "aklp08@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Adriaan",
|
||||
"email": "https://github.com/harianus"
|
||||
},
|
||||
{
|
||||
"name": "Aleksei Androsov",
|
||||
"email": "aandrosov@yandex-team.ru"
|
||||
},
|
||||
{
|
||||
"name": "Aleksey Shvayka",
|
||||
"email": "shvaikalesh@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Aleks Hudochenkov",
|
||||
"email": "aleks@hudochenkov.com"
|
||||
},
|
||||
{
|
||||
"name": "Alexey Plutalov",
|
||||
"email": "demiazz.py@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Anders Olsen Sandvik",
|
||||
"email": "https://github.com/Andersos"
|
||||
},
|
||||
{
|
||||
"name": "Andreas Lind",
|
||||
"email": "andreas@one.com"
|
||||
},
|
||||
{
|
||||
"name": "Andrew Rhoads"
|
||||
},
|
||||
{
|
||||
"name": "Andrey Deryabin",
|
||||
"email": "deriabin@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Andrey Sitnik",
|
||||
"email": "andrey@sitnik.ru"
|
||||
},
|
||||
{
|
||||
"name": "Andrey Taritsyn",
|
||||
"email": "taritsyn@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Andy Trevorah",
|
||||
"email": "a.trevorah@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Anton Khlynovskiy",
|
||||
"email": "subzey@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "aruseni",
|
||||
"email": "aruseni.magiku@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Ben Briggs",
|
||||
"email": "beneb.info@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "bernig",
|
||||
"email": "https://github.com/bernig"
|
||||
},
|
||||
{
|
||||
"name": "Bogdan Chadkin",
|
||||
"email": "trysound@yandex.ru"
|
||||
},
|
||||
{
|
||||
"name": "brainopia",
|
||||
"email": "brainopia@evilmartians.com"
|
||||
},
|
||||
{
|
||||
"name": "Brandon Mathis",
|
||||
"email": "brandon@imathis.com"
|
||||
},
|
||||
{
|
||||
"name": "Chad von Nau",
|
||||
"email": "chad@vonnau.com"
|
||||
},
|
||||
{
|
||||
"name": "Chi Vinh Le",
|
||||
"email": "vinh@wikiwi.io"
|
||||
},
|
||||
{
|
||||
"name": "Cory House",
|
||||
"email": "housecor@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Cory Simmons",
|
||||
"email": "cory@mojotech.com"
|
||||
},
|
||||
{
|
||||
"name": "Craig Martin",
|
||||
"email": "https://github.com/craigmichaelmartin"
|
||||
},
|
||||
{
|
||||
"name": "Damon",
|
||||
"email": "motoxer4533@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Daniel Garcia-Carrillo",
|
||||
"email": "garciacarrillo.daniel@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Daniel Tschinder",
|
||||
"email": "daniel@tschinder.de"
|
||||
},
|
||||
{
|
||||
"name": "David Pike",
|
||||
"email": "david@evolution7.com.au"
|
||||
},
|
||||
{
|
||||
"name": "Denis Sokolov",
|
||||
"email": "denis@sokolov.cc"
|
||||
},
|
||||
{
|
||||
"name": "Dominik Porada",
|
||||
"email": "dominik@porada.co"
|
||||
},
|
||||
{
|
||||
"name": "Dominik Schilling",
|
||||
"email": "dominikschilling+git@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "dotch",
|
||||
"email": "ch.weiss@hotmail.de"
|
||||
},
|
||||
{
|
||||
"name": "Efremov Alexey",
|
||||
"email": "lexich121@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "eitanr",
|
||||
"email": "eitanr@wix.com"
|
||||
},
|
||||
{
|
||||
"name": "Erik Sundahl",
|
||||
"email": "esundahl@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Eugene Datsky",
|
||||
"email": "eugene@datsky.ru"
|
||||
},
|
||||
{
|
||||
"name": "Evilebot Tnawi",
|
||||
"email": "sheo13666q@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Forrest York",
|
||||
"email": "https://github.com/badisa"
|
||||
},
|
||||
{
|
||||
"name": "Google Inc."
|
||||
},
|
||||
{
|
||||
"name": "Gregory Eremin",
|
||||
"email": "magnolia_fan@me.com"
|
||||
},
|
||||
{
|
||||
"name": "GU Yiling",
|
||||
"email": "justice360@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Hallvord R. M. Steen",
|
||||
"email": "hallvord@hallvord.com"
|
||||
},
|
||||
{
|
||||
"name": "heady",
|
||||
"email": "https://github.com/heady"
|
||||
},
|
||||
{
|
||||
"name": "Iain Beeston",
|
||||
"email": "iain.beeston@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Igor Adamenko",
|
||||
"email": "https://github.com/igoradamenko"
|
||||
},
|
||||
{
|
||||
"name": "Jack Moore",
|
||||
"email": "hello@jacklmoore.com"
|
||||
},
|
||||
{
|
||||
"name": "Jason Kuhrt",
|
||||
"email": "jasonkuhrt@me.com"
|
||||
},
|
||||
{
|
||||
"name": "Jeff Escalante",
|
||||
"email": "hello@jenius.me"
|
||||
},
|
||||
{
|
||||
"name": "Johannes J. Schmidt",
|
||||
"email": "schmidt@netzmerk.com"
|
||||
},
|
||||
{
|
||||
"name": "John Kreitlow",
|
||||
"email": "jkreitlow@deepfocus.net"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Ong",
|
||||
"email": "jonathanrichardong@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Josh Gillies",
|
||||
"email": "github@joshgilli.es"
|
||||
},
|
||||
{
|
||||
"name": "jvdanilo",
|
||||
"email": "jvdanilo@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Kieran",
|
||||
"email": "Kieranju@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Kir Shatrov",
|
||||
"email": "shatrov@me.com"
|
||||
},
|
||||
{
|
||||
"name": "kizu",
|
||||
"email": "kizmarh@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Leonya Khachaturov",
|
||||
"email": "leonidkhachaturov@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Lovchikov Anton",
|
||||
"email": "besyanya@yandex.ru"
|
||||
},
|
||||
{
|
||||
"name": "L.T",
|
||||
"email": "ec.huyinghuan@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Luciano Battagliero",
|
||||
"email": "lucianobattagliero+git@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Luke Page",
|
||||
"email": "luke.a.page@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "martco",
|
||||
"email": "martco@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Matt Smith",
|
||||
"email": "runner_28@hotmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Maxime Thirouin",
|
||||
"email": "m@moox.io"
|
||||
},
|
||||
{
|
||||
"name": "Max Mechanic",
|
||||
"email": "max@philo.com"
|
||||
},
|
||||
{
|
||||
"name": "Michael Beil",
|
||||
"email": "michaelbeil@me.com"
|
||||
},
|
||||
{
|
||||
"name": "Michael Scott Hertzberg",
|
||||
"email": "mshertzberg@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Michał Gołębiowski",
|
||||
"email": "m.goleb@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Mikael Jorhult",
|
||||
"email": "mikael@jorhult.se"
|
||||
},
|
||||
{
|
||||
"name": "Morton Fox",
|
||||
"email": "github@qslw.com"
|
||||
},
|
||||
{
|
||||
"name": "mvasilkov",
|
||||
"email": "mvasilkov@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Nick Howes",
|
||||
"email": "nick@nickhowes.co.uk"
|
||||
},
|
||||
{
|
||||
"name": "Nick Schonning",
|
||||
"email": "nschonni@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "nickspielgist",
|
||||
"email": "dev@nickspiel.me"
|
||||
},
|
||||
{
|
||||
"name": "Niels Dequeker",
|
||||
"email": "niels.dequeker@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Nikolay Burlov",
|
||||
"email": "kohgpat@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Paul Statezny",
|
||||
"email": "Paulstatezny@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Peter Zotov",
|
||||
"email": "whitequark@whitequark.org"
|
||||
},
|
||||
{
|
||||
"name": "Rafael Silva",
|
||||
"email": "rafael@rafaelsilva.net"
|
||||
},
|
||||
{
|
||||
"name": "Ray Lehnhoff",
|
||||
"email": "raymond.lehnhoff@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "ReadmeCritic",
|
||||
"email": "frankensteinbot@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Reinaldo Schiehll",
|
||||
"email": "rn.schiehll@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "René Stalder",
|
||||
"email": "rene@whatwedo.ch"
|
||||
},
|
||||
{
|
||||
"name": "Richard Wang",
|
||||
"email": "richardwa@google.com"
|
||||
},
|
||||
{
|
||||
"name": "Rob Howell",
|
||||
"email": "rob@robhowell.com"
|
||||
},
|
||||
{
|
||||
"name": "Roland Warmerdam",
|
||||
"email": "rowno@webspirited.com"
|
||||
},
|
||||
{
|
||||
"name": "Sasha Koss",
|
||||
"email": "koss@nocorp.me"
|
||||
},
|
||||
{
|
||||
"name": "Sean Anderson",
|
||||
"email": "Sean.Palmer.Anderson@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Sergey Belov",
|
||||
"email": "peimei@ya.ru"
|
||||
},
|
||||
{
|
||||
"name": "Sergey Leschina",
|
||||
"email": "mail@putnik.ws"
|
||||
},
|
||||
{
|
||||
"name": "sethjgore",
|
||||
"email": "sethjgore@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Šime Vidas",
|
||||
"email": "sime.vidas@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Simon Lydell",
|
||||
"email": "simon.lydell@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Stephen Edgar",
|
||||
"email": "stephen@netweb.com.au"
|
||||
},
|
||||
{
|
||||
"name": "Steve Mao",
|
||||
"email": "https://github.com/stevemao"
|
||||
},
|
||||
{
|
||||
"name": "Stig Otnes Kolstad",
|
||||
"email": "stig@stigok.net"
|
||||
},
|
||||
{
|
||||
"name": "Subash Pathak",
|
||||
"email": "sbspk@msn.com"
|
||||
},
|
||||
{
|
||||
"name": "sunhao",
|
||||
"email": "sunhao_1988@msn.cn"
|
||||
},
|
||||
{
|
||||
"name": "tomdavenport",
|
||||
"email": "playmusic@me.com"
|
||||
},
|
||||
{
|
||||
"name": "Tony Ganch",
|
||||
"email": "tonyganch@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Vegard Andreas Larsen",
|
||||
"email": "vegard@xaltra.net"
|
||||
},
|
||||
{
|
||||
"name": "Vera Surkova",
|
||||
"email": "vera@surkova.se"
|
||||
},
|
||||
{
|
||||
"name": "Vincent De Oliveira",
|
||||
"email": "vincent@iamvdo.me"
|
||||
},
|
||||
{
|
||||
"name": "Vishnu Ravi",
|
||||
"email": "vishnu@vishnu.io"
|
||||
},
|
||||
{
|
||||
"name": "Vladimir Pouzanov",
|
||||
"email": "farcaller@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "vladkens",
|
||||
"email": "vladkens@yandex.ru"
|
||||
},
|
||||
{
|
||||
"name": "Даниил Пронин",
|
||||
"email": "mail@grawl.ru"
|
||||
},
|
||||
{
|
||||
"name": "一丝",
|
||||
"email": "jie.lijie@alibaba-inc.com"
|
||||
},
|
||||
{
|
||||
"name": "刘祺",
|
||||
"email": "gucong@gmail.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"browserslist": "^1.7.6",
|
||||
"caniuse-db": "^1.0.30000634",
|
||||
"normalize-range": "^0.1.2",
|
||||
"num2fraction": "^1.2.2",
|
||||
"postcss": "^5.2.16",
|
||||
"postcss-value-parser": "^3.2.3"
|
||||
},
|
||||
"description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
|
||||
"devDependencies": {
|
||||
"browserify": "^14.1.0",
|
||||
"coffee-script": "^1.12.4",
|
||||
"eslint-config-postcss": "^2.0.2",
|
||||
"fs-extra": "^2.0.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-coffee": "^2.3.4",
|
||||
"gulp-eslint": "^3.0.1",
|
||||
"gulp-json-editor": "^2.2.1",
|
||||
"gulp-mocha": "^3.0.1",
|
||||
"gulp-replace": "^0.5.4",
|
||||
"mocha": "^3.2.0",
|
||||
"should": "^11.2.1",
|
||||
"vinyl-source-stream": "^1.1.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "eslint-config-postcss/es5"
|
||||
},
|
||||
"homepage": "https://github.com/postcss/autoprefixer#readme",
|
||||
"keywords": [
|
||||
"autoprefixer",
|
||||
"css",
|
||||
"prefix",
|
||||
"postcss",
|
||||
"postcss-plugin"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "lib/autoprefixer",
|
||||
"name": "autoprefixer",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/postcss/autoprefixer.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "gulp"
|
||||
},
|
||||
"version": "6.7.7"
|
||||
}
|
||||
135
build/node_modules/cssnano/node_modules/browserslist/CHANGELOG.md
generated
vendored
Normal file
135
build/node_modules/cssnano/node_modules/browserslist/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
# Change Log
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 1.7.7
|
||||
* Update Firefox ESR.
|
||||
|
||||
## 1.7.6
|
||||
* Fix Android Chrome selection.
|
||||
|
||||
## 1.7.5
|
||||
* Fix combining `not` query with country based statistics.
|
||||
* Fix `--env` argument in CLI (by Tuure Savuoja).
|
||||
|
||||
## 1.7.4
|
||||
* Speed up browser sorting (by Aarni Koskela).
|
||||
|
||||
## 1.7.3
|
||||
* Fix config finding when directory was passed to `path` (by Aarni Koskela).
|
||||
|
||||
## 1.7.2
|
||||
* Fix config finding algorithm (by Aarni Koskela).
|
||||
|
||||
## 1.7.1
|
||||
* Fix unreleased browsers version detection.
|
||||
|
||||
## 1.7
|
||||
* Add `--config` and `--env` arguments to CLI (by Jarek Rencz).
|
||||
|
||||
## 1.6
|
||||
* Convert Electron version to Chrome (by Kilian Valkhof).
|
||||
* Fix `0` version mistake in Can I Use data.
|
||||
|
||||
## 1.5.2
|
||||
* Fix browser versions ordering (by Marco Massarotto).
|
||||
|
||||
## 1.5.1
|
||||
* Fix error on `package.json` and `browserslist` in same directory.
|
||||
|
||||
## 1.5
|
||||
* Add `package.json` support (by Stepan Kuzmin).
|
||||
* Add environments support (by Maksim Semenov and openlibser).
|
||||
* Add `browserslist-stats.json` file support (by Oleh Aloshkin).
|
||||
* Add `config` option to CLI (by Evilebot Tnawi).
|
||||
* Add JSDoc.
|
||||
* Fix tests on Windows (by Anna Stoliar).
|
||||
* Don’t set custom usage statistics globally.
|
||||
|
||||
## 1.4
|
||||
* Add `defaults` keyword.
|
||||
|
||||
## 1.3.6
|
||||
* Add `UCAndroid` alias to `and_uc` (by Evilebot Tnawi).
|
||||
|
||||
## 1.3.5
|
||||
* Fix Opera Mini support. Use `op_mini all`.
|
||||
|
||||
## 1.3.4
|
||||
* Add space-less `>1%` and `>.5%` syntax support (by Andreas Lind).
|
||||
|
||||
## 1.3.3
|
||||
* Clean `0` versions in some country-based requests.
|
||||
|
||||
## 1.3.2
|
||||
* Update Firefox ESR.
|
||||
|
||||
## 1.3.1
|
||||
* Add Safari TP support.
|
||||
|
||||
## 1.3
|
||||
* Add coverage for specific country (by Joshua Wise).
|
||||
|
||||
## 1.2
|
||||
* Add `browserslist.coverage()` method.
|
||||
* Add `--coverage` and `-c` argument to CLI.
|
||||
* Add `-v` argument support to CLI.
|
||||
* Better error handling in CLI.
|
||||
|
||||
## 1.1.3
|
||||
* Fix jspm support (by Sean Anderson).
|
||||
|
||||
## 1.1.2
|
||||
* Fix jspm support (by Sean Anderson).
|
||||
|
||||
## 1.1.1
|
||||
* Fix space-less `>10%` and `>10% in my stats` queries.
|
||||
* Normalize error messages.
|
||||
* Remove development files from npm package.
|
||||
|
||||
## 1.1
|
||||
* Added query against custom browser usage data (by Daniel Rey).
|
||||
|
||||
## 1.0.1
|
||||
* Update Firefox ESR (by Rouven Weßling).
|
||||
|
||||
## 1.0
|
||||
* Remove Opera 12.1 from default query.
|
||||
* Add `not` keyword and exclude browsers by query.
|
||||
* Add Microsoft Edge support (by Andrey Polischuk).
|
||||
* Add CLI for debug and non-JS usage (by Luke Horvat).
|
||||
* Use own class in Browserslist errors.
|
||||
|
||||
## 0.5
|
||||
* Add version ranges `IE 6-9` (by Ben Briggs).
|
||||
|
||||
## 0.4
|
||||
* Add `config` option and `BROWSERSLIST_CONFIG` environment variable support.
|
||||
* Add symlink config support.
|
||||
|
||||
## 0.3.3
|
||||
* Fix DynJS compatibility (by Nick Howes).
|
||||
|
||||
## 0.3.2
|
||||
* Fix joined versions on versions query (by Vincent De Oliveira).
|
||||
|
||||
## 0.3.1
|
||||
* Fix global variable leak (by Peter Müller).
|
||||
|
||||
## 0.3
|
||||
* Takes queries from `BROWSERSLIST` environment variable.
|
||||
|
||||
## 0.2
|
||||
* Return Can I Use joined versions as `ios_saf 7.0-7.1`.
|
||||
|
||||
## 0.1.3
|
||||
* Better work with Can I Use joined versions like `ios_saf 7.0-7.1`.
|
||||
* Browserslist now understands `ios_saf 7.0` or `ios_saf 7`.
|
||||
|
||||
## 0.1.2
|
||||
* Do not create global `browserslist` var (by Maxime Thirouin).
|
||||
|
||||
## 0.1.1
|
||||
* Sort browsers by name and version.
|
||||
|
||||
## 0.1
|
||||
* Initial release.
|
||||
20
build/node_modules/cssnano/node_modules/browserslist/LICENSE
generated
vendored
Normal file
20
build/node_modules/cssnano/node_modules/browserslist/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2014 Andrey Sitnik <andrey@sitnik.ru>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
331
build/node_modules/cssnano/node_modules/browserslist/README.md
generated
vendored
Normal file
331
build/node_modules/cssnano/node_modules/browserslist/README.md
generated
vendored
Normal file
@@ -0,0 +1,331 @@
|
||||
# Browserslist
|
||||
|
||||
Library to share supported browsers list between different front-end tools.
|
||||
It is used in [Autoprefixer], [Stylelint], [eslint-plugin-compat]
|
||||
and [babel-env-preset].
|
||||
|
||||
All tools that rely on Browserslist will find its config automatically,
|
||||
when you add the following to `package.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Or in `browserslist` config:
|
||||
|
||||
```yaml
|
||||
# Browsers that we support
|
||||
|
||||
> 1%
|
||||
Last 2 versions
|
||||
IE 10 # sorry
|
||||
```
|
||||
|
||||
Developers set browsers list in queries like `last 2 version`
|
||||
to be free from updating browser versions manually.
|
||||
Browserslist will use [Can i Use] data for this queries.
|
||||
|
||||
Browserslist will take browsers queries from tool option,
|
||||
`browserslist` config, `browserslist` section in `package.json`
|
||||
or environment variables.
|
||||
|
||||
You can test Browserslist queries in [online demo].
|
||||
|
||||
<a href="https://evilmartians.com/?utm_source=browserslist">
|
||||
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
|
||||
alt="Sponsored by Evil Martians"
|
||||
width="236"
|
||||
height="54"
|
||||
\>
|
||||
</a>
|
||||
|
||||
[eslint-plugin-compat]: https://github.com/amilajack/eslint-plugin-compat
|
||||
[babel-env-preset]: https://github.com/babel/babel-preset-env
|
||||
[Autoprefixer]: https://github.com/postcss/autoprefixer
|
||||
[online demo]: http://browserl.ist/
|
||||
[Stylelint]: http://stylelint.io/
|
||||
[Can I Use]: http://caniuse.com/
|
||||
|
||||
## Queries
|
||||
|
||||
Browserslist will use browsers query from one of this sources:
|
||||
|
||||
1. Tool options. For example `browsers` option in Autoprefixer.
|
||||
2. `BROWSERSLIST` environment variable.
|
||||
3. `browserslist` config file in current or parent directories.
|
||||
4. `browserslist` key in `package.json` file in current or parent directories.
|
||||
5. If the above methods did not produce a valid result
|
||||
Browserslist will use defaults: `> 1%, last 2 versions, Firefox ESR`.
|
||||
|
||||
We recommend to write queries in `browserslist` config or `package.json`.
|
||||
|
||||
You can specify the versions by queries (case insensitive):
|
||||
|
||||
* `last 2 versions`: the last 2 versions for each major browser.
|
||||
* `last 2 Chrome versions`: the last 2 versions of Chrome browser.
|
||||
* `> 5%`: versions selected by global usage statistics.
|
||||
* `> 5% in US`: uses USA usage statistics. It accepts [two-letter country code].
|
||||
* `> 5% in my stats`: uses [custom usage data].
|
||||
* `ie 6-8`: selects an inclusive range of versions.
|
||||
* `Firefox > 20`: versions of Firefox newer than 20.
|
||||
* `Firefox >= 20`: versions of Firefox newer than or equal to 20.
|
||||
* `Firefox < 20`: versions of Firefox less than 20.
|
||||
* `Firefox <= 20`: versions of Firefox less than or equal to 20.
|
||||
* `Firefox ESR`: the latest [Firefox ESR] version.
|
||||
* `iOS 7`: the iOS browser version 7 directly.
|
||||
* `not ie <= 8`: exclude browsers selected before by previous queries.
|
||||
You can add `not ` to any query.
|
||||
|
||||
Browserslist works with separated versions of browsers.
|
||||
You should avoid queries like `Firefox > 0`.
|
||||
|
||||
Multiple criteria are combined as a boolean `OR`. A browser version must match
|
||||
at least one of the criteria to be selected.
|
||||
|
||||
All queries are based on the [Can I Use] support table,
|
||||
e.g. `last 3 iOS versions` might select `8.4, 9.2, 9.3` (mixed major and minor),
|
||||
whereas `last 3 Chrome versions` might select `50, 49, 48` (major only).
|
||||
|
||||
[two-letter country code]: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||
[custom usage data]: #custom-usage-data
|
||||
[Can I Use]: http://caniuse.com/
|
||||
|
||||
## Browsers
|
||||
|
||||
Names are case insensitive:
|
||||
|
||||
### Major Browsers
|
||||
|
||||
* `Chrome` for Google Chrome.
|
||||
* `Firefox` or `ff` for Mozilla Firefox.
|
||||
* `Explorer` or `ie` for Internet Explorer.
|
||||
* `Edge` for Microsoft Edge.
|
||||
* `iOS` or `ios_saf` for iOS Safari.
|
||||
* `Opera` for Opera.
|
||||
* `Safari` for desktop Safari.
|
||||
* `ExplorerMobile` or `ie_mob` for Internet Explorer Mobile.
|
||||
|
||||
### Others
|
||||
|
||||
* `Android` for Android WebView.
|
||||
* `BlackBerry` or `bb` for Blackberry browser.
|
||||
* `ChromeAndroid` or `and_chr` for Chrome for Android
|
||||
(in Other section, because mostly same as common `Chrome`).
|
||||
* `FirefoxAndroid` or `and_ff` for Firefox for Android.
|
||||
* `OperaMobile` or `op_mob` for Opera Mobile.
|
||||
* `OperaMini` or `op_mini` for Opera Mini.
|
||||
* `Samsung` for Samsung Internet.
|
||||
* `UCAndroid` or `and_uc` for UC Browser for Android.
|
||||
* `Electron` for Electron framework. It will be converted to Chrome version.
|
||||
|
||||
### Electron
|
||||
|
||||
[`electron-to-chromium`](https://www.npmjs.com/package/electron-to-chromium)
|
||||
could return a compatible Browserslist query
|
||||
for your (major) Electron version:
|
||||
|
||||
```js
|
||||
const e2c = require('electron-to-chromium')
|
||||
autoprefixer({
|
||||
browsers: e2c.electronToBrowserList('1.4') //=> "Chrome >= 53"
|
||||
})
|
||||
```
|
||||
|
||||
## Config File
|
||||
|
||||
Browserslist config should be named `browserslist` and have browsers queries
|
||||
split by a new line. Comments starts with `#` symbol:
|
||||
|
||||
```yaml
|
||||
# Browsers that we support
|
||||
|
||||
> 1%
|
||||
Last 2 versions
|
||||
IE 8 # sorry
|
||||
```
|
||||
|
||||
Browserslist will check config in every directory in `path`.
|
||||
So, if tool process `app/styles/main.css`, you can put config to root,
|
||||
`app/` or `app/styles`.
|
||||
|
||||
You can specify direct path in `BROWSERSLIST_CONFIG` environment variables.
|
||||
|
||||
## `package.json`
|
||||
|
||||
If you want to reduce config files in project root, you can specify
|
||||
browsers in `package.json` with `browserslist` key:
|
||||
|
||||
```js
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"autoprefixer": "^6.5.4"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Environments
|
||||
|
||||
You can also specify different browser queries for various environments.
|
||||
Browserslist will choose query according to `BROWSERSLIST_ENV` or `NODE_ENV`
|
||||
variables. If none of them is declared, Browserslist will firstly look
|
||||
for `development` queries and then use defaults.
|
||||
|
||||
In `package.json`:
|
||||
|
||||
```js
|
||||
{
|
||||
…
|
||||
"browserslist": {
|
||||
"production": [
|
||||
"last 2 version",
|
||||
"ie 9"
|
||||
],
|
||||
"development": [
|
||||
"last 1 version"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In `browserslist` config:
|
||||
|
||||
```ini
|
||||
[production]
|
||||
last 2 version
|
||||
ie 9
|
||||
|
||||
[development]
|
||||
last 1 version
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
If some tool use Browserslist inside, you can change browsers settings
|
||||
by [environment variables]:
|
||||
|
||||
* `BROWSERSLIST` with browsers queries.
|
||||
|
||||
```sh
|
||||
BROWSERSLIST="> 5%" gulp css
|
||||
```
|
||||
|
||||
* `BROWSERSLIST_CONFIG` with path to config file.
|
||||
|
||||
```sh
|
||||
BROWSERSLIST_CONFIG=./config/browserslist gulp css
|
||||
```
|
||||
|
||||
* `BROWSERSLIST_ENV` with environments string.
|
||||
|
||||
```sh
|
||||
BROWSERSLIST_ENV="development" gulp css
|
||||
```
|
||||
|
||||
* `BROWSERSLIST_STATS` with path to the custom usage data
|
||||
for `> 1% in my stats` query.
|
||||
|
||||
```sh
|
||||
BROWSERSLIST_STATS=./config/usage_data.json gulp css
|
||||
```
|
||||
|
||||
[environment variables]: https://en.wikipedia.org/wiki/Environment_variable
|
||||
|
||||
## Custom Usage Data
|
||||
|
||||
If you have a website, you can query against the usage statistics of your site:
|
||||
|
||||
1. Import your Google Analytics data into [Can I Use].
|
||||
Press `Import…` button in Settings page.
|
||||
2. Open browser DevTools on [Can I Use] and paste this snippet
|
||||
into the browser console:
|
||||
|
||||
```js
|
||||
var e=document.createElement('a');e.setAttribute('href', 'data:text/plain;charset=utf-8,'+encodeURIComponent(JSON.stringify(JSON.parse(localStorage['usage-data-by-id'])[localStorage['config-primary_usage']])));e.setAttribute('download','stats.json');document.body.appendChild(e);e.click();document.body.removeChild(e);
|
||||
```
|
||||
3. Save the data to a `browserslist-stats.json` file in your project.
|
||||
|
||||
Of course, you can generate usage statistics file by any other method.
|
||||
File format should be like:
|
||||
|
||||
```js
|
||||
{
|
||||
"ie": {
|
||||
"6": 0.01,
|
||||
"7": 0.4,
|
||||
"8": 1.5
|
||||
},
|
||||
"chrome": {
|
||||
…
|
||||
},
|
||||
…
|
||||
}
|
||||
```
|
||||
|
||||
Note that you can query against your custom usage data
|
||||
while also querying against global or regional data.
|
||||
For example, the query `> 1% in my stats, > 5% in US, 10%` is permitted.
|
||||
|
||||
[Can I Use]: http://caniuse.com/
|
||||
|
||||
## JS API
|
||||
|
||||
```js
|
||||
var browserslist = require('browserslist');
|
||||
|
||||
// Your CSS/JS build tool code
|
||||
var process = function (source, opts) {
|
||||
var browsers = browserslist(opts.browsers, {
|
||||
stats: opts.stats,
|
||||
path: opts.file,
|
||||
env: opts.env
|
||||
});
|
||||
// Your code to add features for selected browsers
|
||||
}
|
||||
```
|
||||
|
||||
Queries can be a string `"> 5%, last 1 version"`
|
||||
or an array `['> 5%', 'last 1 version']`.
|
||||
|
||||
If a query is missing, Browserslist will look for a config file.
|
||||
You can provide a `path` option (that can be a file) to find the config file
|
||||
relatively to it.
|
||||
|
||||
For non-JS environment and debug purpose you can use CLI tool:
|
||||
|
||||
```sh
|
||||
browserslist "> 1%, last 2 versions"
|
||||
```
|
||||
|
||||
## Coverage
|
||||
|
||||
You can get total users coverage for selected browsers by JS API:
|
||||
|
||||
```js
|
||||
browserslist.coverage(browserslist('> 1%')) //=> 81.4
|
||||
```
|
||||
|
||||
```js
|
||||
browserslist.coverage(browserslist('> 1% in US'), 'US') //=> 83.1
|
||||
```
|
||||
|
||||
Or by CLI:
|
||||
|
||||
```sh
|
||||
$ browserslist --coverage "> 1%"
|
||||
These browsers account for 81.4% of all users globally
|
||||
```
|
||||
|
||||
```sh
|
||||
$ browserslist --coverage=US "> 1% in US"
|
||||
These browsers account for 83.1% of all users in the US
|
||||
```
|
||||
95
build/node_modules/cssnano/node_modules/browserslist/cli.js
generated
vendored
Executable file
95
build/node_modules/cssnano/node_modules/browserslist/cli.js
generated
vendored
Executable file
@@ -0,0 +1,95 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var browserslist = require('./');
|
||||
var pkg = require('./package.json');
|
||||
var args = process.argv.slice(2);
|
||||
|
||||
function isArg(arg) {
|
||||
return args.some(function (str) {
|
||||
return str === arg || str.indexOf(arg + '=') === 0;
|
||||
});
|
||||
}
|
||||
|
||||
function getArgValue(arg) {
|
||||
var found = args.filter(function (str) {
|
||||
return str.indexOf(arg + '=') === 0;
|
||||
})[0];
|
||||
var value = found && found.split('=')[1];
|
||||
return value && value.replace(/^['"]|['"]$/g, '');
|
||||
}
|
||||
|
||||
function error(msg) {
|
||||
process.stderr.write(pkg.name + ': ' + msg + '\n');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
function query(queries, opts) {
|
||||
try {
|
||||
return browserslist(queries, opts);
|
||||
} catch (e) {
|
||||
if ( e.name === 'BrowserslistError' ) {
|
||||
return error(e.message);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( args.length === 0 || isArg('--help') || isArg('-h') ) {
|
||||
process.stdout.write([
|
||||
pkg.description,
|
||||
'',
|
||||
'Usage:',
|
||||
' ' + pkg.name + ' "QUERIES"',
|
||||
' ' + pkg.name + ' --coverage "QUERIES"',
|
||||
' ' + pkg.name + ' --coverage=US "QUERIES"',
|
||||
' ' + pkg.name + ' --config=browserslist "path/to/browserlist/file"',
|
||||
' ' + pkg.name + ' --env="environment name defined in config"',
|
||||
' ' + pkg.name + ' --stats="path/to/browserlist/stats/file"'
|
||||
].join('\n') + '\n');
|
||||
|
||||
} else if ( isArg('--version') || isArg('-v') ) {
|
||||
process.stdout.write(pkg.name + ' ' + pkg.version + '\n');
|
||||
|
||||
} else if ( isArg('--coverage') || isArg('-c') ) {
|
||||
var browsers = args.find(function (i) {
|
||||
return i[0] !== '-';
|
||||
});
|
||||
if ( !browsers ) error('Define a browsers query to get coverage');
|
||||
|
||||
var country = getArgValue('--coverage') || getArgValue('-c');
|
||||
var result = browserslist.coverage(query(browsers), country);
|
||||
var round = Math.round(result * 100) / 100.0;
|
||||
|
||||
var end = 'globally';
|
||||
if (country && country !== 'global') {
|
||||
end = 'in the ' + country.toUpperCase();
|
||||
}
|
||||
|
||||
process.stdout.write(
|
||||
'These browsers account for ' + round + '% of all users ' + end + '\n');
|
||||
|
||||
} else if ( args.length === 1 && args[0][0] !== '-' ) {
|
||||
query(args[0]).forEach(function (browser) {
|
||||
process.stdout.write(browser + '\n');
|
||||
});
|
||||
|
||||
} else if (isArg('--config') || isArg('-b')) {
|
||||
var opts = {
|
||||
config: getArgValue('--config') || getArgValue('-b')
|
||||
};
|
||||
|
||||
if (isArg('--env') || isArg('-e')) {
|
||||
opts.env = getArgValue('--env') || getArgValue('-e');
|
||||
}
|
||||
|
||||
if (isArg('--stats') || isArg('-s')) {
|
||||
opts.stats = getArgValue('--stats') || getArgValue('-s');
|
||||
}
|
||||
|
||||
query(null, opts).forEach(function (browser) {
|
||||
process.stdout.write(browser + '\n');
|
||||
});
|
||||
} else {
|
||||
error('Unknown arguments. Use --help to pick right one.');
|
||||
}
|
||||
648
build/node_modules/cssnano/node_modules/browserslist/index.js
generated
vendored
Normal file
648
build/node_modules/cssnano/node_modules/browserslist/index.js
generated
vendored
Normal file
@@ -0,0 +1,648 @@
|
||||
var path = require('path');
|
||||
var e2c = require('electron-to-chromium/versions');
|
||||
var fs = require('fs');
|
||||
|
||||
var caniuse = require('caniuse-db/data.json').agents;
|
||||
|
||||
function normalize(versions) {
|
||||
return versions.filter(function (version) {
|
||||
return typeof version === 'string';
|
||||
});
|
||||
}
|
||||
|
||||
var FLOAT_RANGE = /^\d+(\.\d+)?(-\d+(\.\d+)?)*$/;
|
||||
var IS_SECTION = /^\s*\[(.+)\]\s*$/;
|
||||
|
||||
function uniq(array) {
|
||||
var filtered = [];
|
||||
for ( var i = 0; i < array.length; i++ ) {
|
||||
if ( filtered.indexOf(array[i]) === -1 ) filtered.push(array[i]);
|
||||
}
|
||||
return filtered;
|
||||
}
|
||||
|
||||
function BrowserslistError(message) {
|
||||
this.name = 'BrowserslistError';
|
||||
this.message = message || '';
|
||||
this.browserslist = true;
|
||||
if ( Error.captureStackTrace ) {
|
||||
Error.captureStackTrace(this, BrowserslistError);
|
||||
}
|
||||
}
|
||||
BrowserslistError.prototype = Error.prototype;
|
||||
|
||||
// Helpers
|
||||
|
||||
function error(name) {
|
||||
throw new BrowserslistError(name);
|
||||
}
|
||||
|
||||
function fillUsage(result, name, data) {
|
||||
for ( var i in data ) {
|
||||
result[name + ' ' + i] = data[i];
|
||||
}
|
||||
}
|
||||
|
||||
function isFile(file) {
|
||||
return fs.existsSync(file) && fs.statSync(file).isFile();
|
||||
}
|
||||
|
||||
function eachParent(file, callback) {
|
||||
if ( !fs.readFileSync || !fs.existsSync || !fs.statSync ) {
|
||||
/* istanbul ignore next */
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if ( file === false ) return undefined;
|
||||
if ( typeof file === 'undefined' ) file = '.';
|
||||
var loc = path.resolve(file);
|
||||
do {
|
||||
var result = callback(loc);
|
||||
if (typeof result !== 'undefined') return result;
|
||||
} while (loc !== (loc = path.dirname(loc)));
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function getStat(opts) {
|
||||
if ( opts.stats ) {
|
||||
return opts.stats;
|
||||
} else if ( process.env.BROWSERSLIST_STATS ) {
|
||||
return process.env.BROWSERSLIST_STATS;
|
||||
} else {
|
||||
return eachParent(opts.path, function (dir) {
|
||||
var file = path.join(dir, 'browserslist-stats.json');
|
||||
if ( isFile(file) ) {
|
||||
return file;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function parsePackage(file) {
|
||||
var config = JSON.parse(fs.readFileSync(file)).browserslist;
|
||||
if ( typeof config === 'object' && config.length ) {
|
||||
config = { defaults: config };
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
function pickEnv(config, opts) {
|
||||
if ( typeof config !== 'object' ) return config;
|
||||
|
||||
var env;
|
||||
if ( typeof opts.env === 'string' ) {
|
||||
env = opts.env;
|
||||
} else if ( typeof process.env.BROWSERSLIST_ENV === 'string' ) {
|
||||
env = process.env.BROWSERSLIST_ENV;
|
||||
} else if ( typeof process.env.NODE_ENV === 'string' ) {
|
||||
env = process.env.NODE_ENV;
|
||||
} else {
|
||||
env = 'development';
|
||||
}
|
||||
|
||||
return config[env] || config.defaults;
|
||||
}
|
||||
|
||||
function generateFilter(sign, version) {
|
||||
version = parseFloat(version);
|
||||
if ( sign === '>' ) {
|
||||
return function (v) {
|
||||
return parseFloat(v) > version;
|
||||
};
|
||||
} else if ( sign === '>=' ) {
|
||||
return function (v) {
|
||||
return parseFloat(v) >= version;
|
||||
};
|
||||
} else if ( sign === '<' ) {
|
||||
return function (v) {
|
||||
return parseFloat(v) < version;
|
||||
};
|
||||
} else if ( sign === '<=' ) {
|
||||
return function (v) {
|
||||
return parseFloat(v) <= version;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function compareStrings(a, b) {
|
||||
if (a < b) return -1;
|
||||
if (a > b) return +1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return array of browsers by selection queries.
|
||||
*
|
||||
* @param {string[]} queries Browser queries.
|
||||
* @param {object} opts Options.
|
||||
* @param {string} [opts.path="."] Path to processed file.
|
||||
* It will be used to find config files.
|
||||
* @param {string} [opts.env="development"] Processing environment.
|
||||
* It will be used to take right
|
||||
* queries from config file.
|
||||
* @param {string} [opts.config] Path to config file with queries.
|
||||
* @param {object} [opts.stats] Custom browser usage statistics
|
||||
* for "> 1% in my stats" query.
|
||||
* @return {string[]} Array with browser names in Can I Use.
|
||||
*
|
||||
* @example
|
||||
* browserslist('IE >= 10, IE 8') //=> ['ie 11', 'ie 10', 'ie 8']
|
||||
*/
|
||||
var browserslist = function (queries, opts) {
|
||||
if ( typeof opts === 'undefined' ) opts = { };
|
||||
|
||||
if ( typeof queries === 'undefined' || queries === null ) {
|
||||
if ( process.env.BROWSERSLIST ) {
|
||||
queries = process.env.BROWSERSLIST;
|
||||
} else if ( opts.config || process.env.BROWSERSLIST_CONFIG ) {
|
||||
var file = opts.config || process.env.BROWSERSLIST_CONFIG;
|
||||
queries = pickEnv(browserslist.readConfig(file), opts);
|
||||
} else {
|
||||
queries = pickEnv(browserslist.findConfig(opts.path), opts);
|
||||
}
|
||||
}
|
||||
|
||||
if ( typeof queries === 'undefined' || queries === null ) {
|
||||
queries = browserslist.defaults;
|
||||
}
|
||||
|
||||
if ( typeof queries === 'string' ) {
|
||||
queries = queries.split(/,\s*/);
|
||||
}
|
||||
|
||||
var context = { };
|
||||
|
||||
var stats = getStat(opts);
|
||||
if ( stats ) {
|
||||
if ( typeof stats === 'string' ) {
|
||||
try {
|
||||
stats = JSON.parse(fs.readFileSync(stats));
|
||||
} catch (e) {
|
||||
error('Can\'t read ' + stats);
|
||||
}
|
||||
}
|
||||
if ( 'dataByBrowser' in stats ) {
|
||||
stats = stats.dataByBrowser;
|
||||
}
|
||||
|
||||
context.customUsage = { };
|
||||
for ( var browser in stats ) {
|
||||
fillUsage(context.customUsage, browser, stats[browser]);
|
||||
}
|
||||
}
|
||||
|
||||
var result = [];
|
||||
|
||||
queries.forEach(function (selection) {
|
||||
if ( selection.trim() === '' ) return;
|
||||
|
||||
var exclude = selection.indexOf('not ') === 0;
|
||||
if ( exclude ) selection = selection.slice(4);
|
||||
|
||||
for ( var i in browserslist.queries ) {
|
||||
var type = browserslist.queries[i];
|
||||
var match = selection.match(type.regexp);
|
||||
if ( match ) {
|
||||
var args = [context].concat(match.slice(1));
|
||||
var array = type.select.apply(browserslist, args);
|
||||
if ( exclude ) {
|
||||
array = array.concat(array.map(function (j) {
|
||||
return j.replace(/\s\d+/, ' 0');
|
||||
}));
|
||||
result = result.filter(function (j) {
|
||||
return array.indexOf(j) === -1;
|
||||
});
|
||||
} else {
|
||||
result = result.concat(array);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
error('Unknown browser query `' + selection + '`');
|
||||
});
|
||||
result = result.map(function (i) {
|
||||
var parts = i.split(' ');
|
||||
var name = parts[0];
|
||||
var version = parts[1];
|
||||
if ( version === '0' ) {
|
||||
return name + ' ' + browserslist.byName(name).versions[0];
|
||||
} else {
|
||||
return i;
|
||||
}
|
||||
}).sort(function (name1, name2) {
|
||||
name1 = name1.split(' ');
|
||||
name2 = name2.split(' ');
|
||||
if ( name1[0] === name2[0] ) {
|
||||
if ( FLOAT_RANGE.test(name1[1]) && FLOAT_RANGE.test(name2[1]) ) {
|
||||
return parseFloat(name2[1]) - parseFloat(name1[1]);
|
||||
} else {
|
||||
return compareStrings(name2[1], name1[1]);
|
||||
}
|
||||
} else {
|
||||
return compareStrings(name1[0], name2[0]);
|
||||
}
|
||||
});
|
||||
|
||||
return uniq(result);
|
||||
};
|
||||
|
||||
var normalizeVersion = function (data, version) {
|
||||
if ( data.versions.indexOf(version) !== -1 ) {
|
||||
return version;
|
||||
} else if ( browserslist.versionAliases[data.name][version] ) {
|
||||
return browserslist.versionAliases[data.name][version];
|
||||
} else if ( data.versions.length === 1 ) {
|
||||
return data.versions[0];
|
||||
}
|
||||
};
|
||||
|
||||
var loadCountryStatistics = function (country) {
|
||||
if ( !browserslist.usage[country] ) {
|
||||
var usage = { };
|
||||
var data = require(
|
||||
'caniuse-db/region-usage-json/' + country + '.json');
|
||||
for ( var i in data.data ) {
|
||||
fillUsage(usage, i, data.data[i]);
|
||||
}
|
||||
browserslist.usage[country] = usage;
|
||||
}
|
||||
};
|
||||
|
||||
// Will be filled by Can I Use data below
|
||||
browserslist.data = { };
|
||||
browserslist.usage = {
|
||||
global: { },
|
||||
custom: null
|
||||
};
|
||||
|
||||
// Default browsers query
|
||||
browserslist.defaults = [
|
||||
'> 1%',
|
||||
'last 2 versions',
|
||||
'Firefox ESR'
|
||||
];
|
||||
|
||||
// What browsers will be used in `last n version` query
|
||||
browserslist.major = [
|
||||
'safari', 'opera', 'ios_saf', 'ie_mob', 'ie', 'edge', 'firefox', 'chrome'
|
||||
];
|
||||
|
||||
// Browser names aliases
|
||||
browserslist.aliases = {
|
||||
fx: 'firefox',
|
||||
ff: 'firefox',
|
||||
ios: 'ios_saf',
|
||||
explorer: 'ie',
|
||||
blackberry: 'bb',
|
||||
explorermobile: 'ie_mob',
|
||||
operamini: 'op_mini',
|
||||
operamobile: 'op_mob',
|
||||
chromeandroid: 'and_chr',
|
||||
firefoxandroid: 'and_ff',
|
||||
ucandroid: 'and_uc'
|
||||
};
|
||||
|
||||
// Aliases to work with joined versions like `ios_saf 7.0-7.1`
|
||||
browserslist.versionAliases = { };
|
||||
|
||||
// Get browser data by alias or case insensitive name
|
||||
browserslist.byName = function (name) {
|
||||
name = name.toLowerCase();
|
||||
name = browserslist.aliases[name] || name;
|
||||
return browserslist.data[name];
|
||||
};
|
||||
|
||||
// Get browser data by alias or case insensitive name and throw error
|
||||
// on unknown browser
|
||||
browserslist.checkName = function (name) {
|
||||
var data = browserslist.byName(name);
|
||||
if ( !data ) error('Unknown browser ' + name);
|
||||
return data;
|
||||
};
|
||||
|
||||
// Read and parse config
|
||||
browserslist.readConfig = function (file) {
|
||||
if ( !fs.existsSync(file) || !fs.statSync(file).isFile() ) {
|
||||
error('Can\'t read ' + file + ' config');
|
||||
}
|
||||
return browserslist.parseConfig(fs.readFileSync(file));
|
||||
};
|
||||
|
||||
// Find config, read file and parse it
|
||||
browserslist.findConfig = function (from) {
|
||||
return eachParent(from, function (dir) {
|
||||
var config = path.join(dir, 'browserslist');
|
||||
var pkg = path.join(dir, 'package.json');
|
||||
|
||||
var pkgBrowserslist;
|
||||
if ( isFile(pkg) ) {
|
||||
try {
|
||||
pkgBrowserslist = parsePackage(pkg);
|
||||
} catch (e) {
|
||||
console.warn(
|
||||
'[Browserslist] Could not parse ' + pkg + '. ' +
|
||||
'Ignoring it.');
|
||||
}
|
||||
}
|
||||
|
||||
if ( isFile(config) && pkgBrowserslist ) {
|
||||
error(
|
||||
dir + ' contains both browserslist ' +
|
||||
'and package.json with browsers');
|
||||
} else if ( isFile(config) ) {
|
||||
return browserslist.readConfig(config);
|
||||
} else if ( pkgBrowserslist ) {
|
||||
return pkgBrowserslist;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Return browsers market coverage.
|
||||
*
|
||||
* @param {string[]} browsers Browsers names in Can I Use.
|
||||
* @param {string} [country="global"] Which country statistics should be used.
|
||||
*
|
||||
* @return {number} Total market coverage for all selected browsers.
|
||||
*
|
||||
* @example
|
||||
* browserslist.coverage(browserslist('> 1% in US'), 'US') //=> 83.1
|
||||
*/
|
||||
browserslist.coverage = function (browsers, country) {
|
||||
if ( country && country !== 'global') {
|
||||
country = country.toUpperCase();
|
||||
loadCountryStatistics(country);
|
||||
} else {
|
||||
country = 'global';
|
||||
}
|
||||
|
||||
return browsers.reduce(function (all, i) {
|
||||
var usage = browserslist.usage[country][i];
|
||||
if ( usage === undefined ) {
|
||||
usage = browserslist.usage[country][i.replace(/ [\d.]+$/, ' 0')];
|
||||
}
|
||||
return all + (usage || 0);
|
||||
}, 0);
|
||||
};
|
||||
|
||||
// Return array of queries from config content
|
||||
browserslist.parseConfig = function (string) {
|
||||
var result = { defaults: [] };
|
||||
var section = 'defaults';
|
||||
|
||||
string.toString()
|
||||
.replace(/#[^\n]*/g, '')
|
||||
.split(/\n/)
|
||||
.map(function (line) {
|
||||
return line.trim();
|
||||
})
|
||||
.filter(function (line) {
|
||||
return line !== '';
|
||||
})
|
||||
.forEach(function (line) {
|
||||
if ( IS_SECTION.test(line) ) {
|
||||
section = line.match(IS_SECTION)[1].trim();
|
||||
result[section] = result[section] || [];
|
||||
} else {
|
||||
result[section].push(line);
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
browserslist.queries = {
|
||||
|
||||
lastVersions: {
|
||||
regexp: /^last\s+(\d+)\s+versions?$/i,
|
||||
select: function (context, versions) {
|
||||
var selected = [];
|
||||
browserslist.major.forEach(function (name) {
|
||||
var data = browserslist.byName(name);
|
||||
if ( !data ) return;
|
||||
var array = data.released.slice(-versions);
|
||||
|
||||
array = array.map(function (v) {
|
||||
return data.name + ' ' + v;
|
||||
});
|
||||
selected = selected.concat(array);
|
||||
});
|
||||
return selected;
|
||||
}
|
||||
},
|
||||
|
||||
lastByBrowser: {
|
||||
regexp: /^last\s+(\d+)\s+(\w+)\s+versions?$/i,
|
||||
select: function (context, versions, name) {
|
||||
var data = browserslist.checkName(name);
|
||||
return data.released.slice(-versions).map(function (v) {
|
||||
return data.name + ' ' + v;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
globalStatistics: {
|
||||
regexp: /^>\s*(\d*\.?\d+)%$/,
|
||||
select: function (context, popularity) {
|
||||
popularity = parseFloat(popularity);
|
||||
var result = [];
|
||||
|
||||
for ( var version in browserslist.usage.global ) {
|
||||
if ( browserslist.usage.global[version] > popularity ) {
|
||||
result.push(version);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
},
|
||||
|
||||
customStatistics: {
|
||||
regexp: /^>\s*(\d*\.?\d+)%\s+in\s+my\s+stats$/,
|
||||
select: function (context, popularity) {
|
||||
popularity = parseFloat(popularity);
|
||||
var result = [];
|
||||
|
||||
if ( !context.customUsage ) {
|
||||
error('Custom usage statistics was not provided');
|
||||
}
|
||||
|
||||
for ( var version in context.customUsage ) {
|
||||
if ( context.customUsage[version] > popularity ) {
|
||||
result.push(version);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
},
|
||||
|
||||
countryStatistics: {
|
||||
regexp: /^>\s*(\d*\.?\d+)%\s+in\s+(\w\w)$/,
|
||||
select: function (context, popularity, country) {
|
||||
popularity = parseFloat(popularity);
|
||||
country = country.toUpperCase();
|
||||
var result = [];
|
||||
|
||||
loadCountryStatistics(country);
|
||||
var usage = browserslist.usage[country];
|
||||
|
||||
for ( var version in usage ) {
|
||||
if ( usage[version] > popularity ) {
|
||||
result.push(version);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
},
|
||||
|
||||
electronRange: {
|
||||
regexp: /^electron\s+([\d\.]+)\s*-\s*([\d\.]+)$/i,
|
||||
select: function (context, from, to) {
|
||||
if ( !e2c[from] ) error('Unknown version ' + from + ' of electron');
|
||||
if ( !e2c[to] ) error('Unknown version ' + to + ' of electron');
|
||||
|
||||
from = parseFloat(from);
|
||||
to = parseFloat(to);
|
||||
|
||||
return Object.keys(e2c).filter(function (i) {
|
||||
var parsed = parseFloat(i);
|
||||
return parsed >= from && parsed <= to;
|
||||
}).map(function (i) {
|
||||
return 'chrome ' + e2c[i];
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
range: {
|
||||
regexp: /^(\w+)\s+([\d\.]+)\s*-\s*([\d\.]+)$/i,
|
||||
select: function (context, name, from, to) {
|
||||
var data = browserslist.checkName(name);
|
||||
from = parseFloat(normalizeVersion(data, from) || from);
|
||||
to = parseFloat(normalizeVersion(data, to) || to);
|
||||
|
||||
var filter = function (v) {
|
||||
var parsed = parseFloat(v);
|
||||
return parsed >= from && parsed <= to;
|
||||
};
|
||||
|
||||
return data.released.filter(filter).map(function (v) {
|
||||
return data.name + ' ' + v;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
electronVersions: {
|
||||
regexp: /^electron\s*(>=?|<=?)\s*([\d\.]+)$/i,
|
||||
select: function (context, sign, version) {
|
||||
return Object.keys(e2c)
|
||||
.filter(generateFilter(sign, version))
|
||||
.map(function (i) {
|
||||
return 'chrome ' + e2c[i];
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
versions: {
|
||||
regexp: /^(\w+)\s*(>=?|<=?)\s*([\d\.]+)$/,
|
||||
select: function (context, name, sign, version) {
|
||||
var data = browserslist.checkName(name);
|
||||
var alias = normalizeVersion(data, version);
|
||||
if ( alias ) {
|
||||
version = alias;
|
||||
}
|
||||
return data.released
|
||||
.filter(generateFilter(sign, version))
|
||||
.map(function (v) {
|
||||
return data.name + ' ' + v;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
esr: {
|
||||
regexp: /^(firefox|ff|fx)\s+esr$/i,
|
||||
select: function () {
|
||||
return ['firefox 52'];
|
||||
}
|
||||
},
|
||||
|
||||
opMini: {
|
||||
regexp: /(operamini|op_mini)\s+all/i,
|
||||
select: function () {
|
||||
return ['op_mini all'];
|
||||
}
|
||||
},
|
||||
|
||||
electron: {
|
||||
regexp: /^electron\s+([\d\.]+)$/i,
|
||||
select: function (context, version) {
|
||||
var chrome = e2c[version];
|
||||
if ( !chrome ) error('Unknown version ' + version + ' of electron');
|
||||
return ['chrome ' + chrome];
|
||||
}
|
||||
},
|
||||
|
||||
direct: {
|
||||
regexp: /^(\w+)\s+(tp|[\d\.]+)$/i,
|
||||
select: function (context, name, version) {
|
||||
if ( /tp/i.test(version) ) version = 'TP';
|
||||
var data = browserslist.checkName(name);
|
||||
var alias = normalizeVersion(data, version);
|
||||
if ( alias ) {
|
||||
version = alias;
|
||||
} else {
|
||||
if ( version.indexOf('.') === -1 ) {
|
||||
alias = version + '.0';
|
||||
} else if ( /\.0$/.test(version) ) {
|
||||
alias = version.replace(/\.0$/, '');
|
||||
}
|
||||
alias = normalizeVersion(data, alias);
|
||||
if ( alias ) {
|
||||
version = alias;
|
||||
} else {
|
||||
error('Unknown version ' + version + ' of ' + name);
|
||||
}
|
||||
}
|
||||
return [data.name + ' ' + version];
|
||||
}
|
||||
},
|
||||
|
||||
defaults: {
|
||||
regexp: /^defaults$/i,
|
||||
select: function () {
|
||||
return browserslist(browserslist.defaults);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Get and convert Can I Use data
|
||||
|
||||
(function () {
|
||||
for ( var name in caniuse ) {
|
||||
var browser = caniuse[name];
|
||||
browserslist.data[name] = {
|
||||
name: name,
|
||||
versions: normalize(caniuse[name].versions),
|
||||
released: normalize(caniuse[name].versions.slice(0, -3))
|
||||
};
|
||||
fillUsage(browserslist.usage.global, name, browser.usage_global);
|
||||
|
||||
browserslist.versionAliases[name] = { };
|
||||
for ( var i = 0; i < browser.versions.length; i++ ) {
|
||||
var full = browser.versions[i];
|
||||
if (!full) continue;
|
||||
|
||||
if ( full.indexOf('-') !== -1 ) {
|
||||
var interval = full.split('-');
|
||||
for ( var j = 0; j < interval.length; j++ ) {
|
||||
browserslist.versionAliases[name][interval[j]] = full;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}());
|
||||
|
||||
module.exports = browserslist;
|
||||
94
build/node_modules/cssnano/node_modules/browserslist/package.json
generated
vendored
Normal file
94
build/node_modules/cssnano/node_modules/browserslist/package.json
generated
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"browserslist@1.7.7",
|
||||
"/Users/asciidisco/Desktop/asciidisco.com/build"
|
||||
]
|
||||
],
|
||||
"_from": "browserslist@1.7.7",
|
||||
"_id": "browserslist@1.7.7",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=",
|
||||
"_location": "/cssnano/browserslist",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "browserslist@1.7.7",
|
||||
"name": "browserslist",
|
||||
"escapedName": "browserslist",
|
||||
"rawSpec": "1.7.7",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.7.7"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cssnano/autoprefixer"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz",
|
||||
"_spec": "1.7.7",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
|
||||
"author": {
|
||||
"name": "Andrey Sitnik",
|
||||
"email": "andrey@sitnik.ru"
|
||||
},
|
||||
"bin": {
|
||||
"browserslist": "./cli.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ai/browserslist/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"caniuse-db": "^1.0.30000639",
|
||||
"electron-to-chromium": "^1.2.7"
|
||||
},
|
||||
"description": "Share browsers list between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset",
|
||||
"devDependencies": {
|
||||
"eslint": "^3.18.0",
|
||||
"eslint-config-postcss": "^2.0.2",
|
||||
"jest": "^19.0.2",
|
||||
"lint-staged": "^3.4.0",
|
||||
"pre-commit": "^1.1.3",
|
||||
"yaspeller-ci": "^0.3.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "eslint-config-postcss/es5",
|
||||
"env": {
|
||||
"jest": true
|
||||
},
|
||||
"rules": {
|
||||
"consistent-return": "off",
|
||||
"no-process-exit": "off",
|
||||
"valid-jsdoc": "error"
|
||||
}
|
||||
},
|
||||
"homepage": "https://github.com/ai/browserslist#readme",
|
||||
"jest": {
|
||||
"coverageThreshold": {
|
||||
"global": {
|
||||
"statements": 100
|
||||
}
|
||||
}
|
||||
},
|
||||
"keywords": [
|
||||
"caniuse",
|
||||
"browsers"
|
||||
],
|
||||
"license": "MIT",
|
||||
"lint-staged": {
|
||||
"*.md": "yaspeller-ci",
|
||||
"*.js": "eslint"
|
||||
},
|
||||
"name": "browserslist",
|
||||
"pre-commit": [
|
||||
"lint-staged"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ai/browserslist.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint-staged": "lint-staged",
|
||||
"test": "jest --coverage && eslint *.js test/*.js && yaspeller-ci *.md"
|
||||
},
|
||||
"version": "1.7.7"
|
||||
}
|
||||
116
build/node_modules/cssnano/node_modules/chalk/index.js
generated
vendored
Normal file
116
build/node_modules/cssnano/node_modules/chalk/index.js
generated
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
'use strict';
|
||||
var escapeStringRegexp = require('escape-string-regexp');
|
||||
var ansiStyles = require('ansi-styles');
|
||||
var stripAnsi = require('strip-ansi');
|
||||
var hasAnsi = require('has-ansi');
|
||||
var supportsColor = require('supports-color');
|
||||
var defineProps = Object.defineProperties;
|
||||
var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM);
|
||||
|
||||
function Chalk(options) {
|
||||
// detect mode if not set manually
|
||||
this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;
|
||||
}
|
||||
|
||||
// use bright blue on Windows as the normal blue color is illegible
|
||||
if (isSimpleWindowsTerm) {
|
||||
ansiStyles.blue.open = '\u001b[94m';
|
||||
}
|
||||
|
||||
var styles = (function () {
|
||||
var ret = {};
|
||||
|
||||
Object.keys(ansiStyles).forEach(function (key) {
|
||||
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
|
||||
|
||||
ret[key] = {
|
||||
get: function () {
|
||||
return build.call(this, this._styles.concat(key));
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
return ret;
|
||||
})();
|
||||
|
||||
var proto = defineProps(function chalk() {}, styles);
|
||||
|
||||
function build(_styles) {
|
||||
var builder = function () {
|
||||
return applyStyle.apply(builder, arguments);
|
||||
};
|
||||
|
||||
builder._styles = _styles;
|
||||
builder.enabled = this.enabled;
|
||||
// __proto__ is used because we must return a function, but there is
|
||||
// no way to create a function with a different prototype.
|
||||
/* eslint-disable no-proto */
|
||||
builder.__proto__ = proto;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
function applyStyle() {
|
||||
// support varags, but simply cast to string in case there's only one arg
|
||||
var args = arguments;
|
||||
var argsLen = args.length;
|
||||
var str = argsLen !== 0 && String(arguments[0]);
|
||||
|
||||
if (argsLen > 1) {
|
||||
// don't slice `arguments`, it prevents v8 optimizations
|
||||
for (var a = 1; a < argsLen; a++) {
|
||||
str += ' ' + args[a];
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.enabled || !str) {
|
||||
return str;
|
||||
}
|
||||
|
||||
var nestedStyles = this._styles;
|
||||
var i = nestedStyles.length;
|
||||
|
||||
// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
|
||||
// see https://github.com/chalk/chalk/issues/58
|
||||
// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
|
||||
var originalDim = ansiStyles.dim.open;
|
||||
if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) {
|
||||
ansiStyles.dim.open = '';
|
||||
}
|
||||
|
||||
while (i--) {
|
||||
var code = ansiStyles[nestedStyles[i]];
|
||||
|
||||
// Replace any instances already present with a re-opening code
|
||||
// otherwise only the part of the string until said closing code
|
||||
// will be colored, and the rest will simply be 'plain'.
|
||||
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
||||
}
|
||||
|
||||
// Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.
|
||||
ansiStyles.dim.open = originalDim;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function init() {
|
||||
var ret = {};
|
||||
|
||||
Object.keys(styles).forEach(function (name) {
|
||||
ret[name] = {
|
||||
get: function () {
|
||||
return build.call(this, [name]);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
defineProps(Chalk.prototype, init());
|
||||
|
||||
module.exports = new Chalk();
|
||||
module.exports.styles = ansiStyles;
|
||||
module.exports.hasColor = hasAnsi;
|
||||
module.exports.stripColor = stripAnsi;
|
||||
module.exports.supportsColor = supportsColor;
|
||||
21
build/node_modules/cssnano/node_modules/chalk/license
generated
vendored
Normal file
21
build/node_modules/cssnano/node_modules/chalk/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
50
build/node_modules/cssnano/node_modules/chalk/node_modules/supports-color/index.js
generated
vendored
Normal file
50
build/node_modules/cssnano/node_modules/chalk/node_modules/supports-color/index.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
'use strict';
|
||||
var argv = process.argv;
|
||||
|
||||
var terminator = argv.indexOf('--');
|
||||
var hasFlag = function (flag) {
|
||||
flag = '--' + flag;
|
||||
var pos = argv.indexOf(flag);
|
||||
return pos !== -1 && (terminator !== -1 ? pos < terminator : true);
|
||||
};
|
||||
|
||||
module.exports = (function () {
|
||||
if ('FORCE_COLOR' in process.env) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (hasFlag('no-color') ||
|
||||
hasFlag('no-colors') ||
|
||||
hasFlag('color=false')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (hasFlag('color') ||
|
||||
hasFlag('colors') ||
|
||||
hasFlag('color=true') ||
|
||||
hasFlag('color=always')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (process.stdout && !process.stdout.isTTY) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ('COLORTERM' in process.env) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (process.env.TERM === 'dumb') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
})();
|
||||
21
build/node_modules/cssnano/node_modules/chalk/node_modules/supports-color/license
generated
vendored
Normal file
21
build/node_modules/cssnano/node_modules/chalk/node_modules/supports-color/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
92
build/node_modules/cssnano/node_modules/chalk/node_modules/supports-color/package.json
generated
vendored
Normal file
92
build/node_modules/cssnano/node_modules/chalk/node_modules/supports-color/package.json
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"supports-color@2.0.0",
|
||||
"/Users/asciidisco/Desktop/asciidisco.com/build"
|
||||
]
|
||||
],
|
||||
"_from": "supports-color@2.0.0",
|
||||
"_id": "supports-color@2.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
||||
"_location": "/cssnano/chalk/supports-color",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "supports-color@2.0.0",
|
||||
"name": "supports-color",
|
||||
"escapedName": "supports-color",
|
||||
"rawSpec": "2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cssnano/chalk"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||
"_spec": "2.0.0",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/chalk/supports-color/issues"
|
||||
},
|
||||
"description": "Detect whether a terminal supports color",
|
||||
"devDependencies": {
|
||||
"mocha": "*",
|
||||
"require-uncached": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/chalk/supports-color#readme",
|
||||
"keywords": [
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"ansi",
|
||||
"styles",
|
||||
"tty",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"command-line",
|
||||
"support",
|
||||
"supports",
|
||||
"capability",
|
||||
"detect"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
{
|
||||
"name": "Joshua Appelman",
|
||||
"email": "jappelman@xebia.com",
|
||||
"url": "jbnicolai.com"
|
||||
}
|
||||
],
|
||||
"name": "supports-color",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chalk/supports-color.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "2.0.0"
|
||||
}
|
||||
36
build/node_modules/cssnano/node_modules/chalk/node_modules/supports-color/readme.md
generated
vendored
Normal file
36
build/node_modules/cssnano/node_modules/chalk/node_modules/supports-color/readme.md
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
# supports-color [](https://travis-ci.org/chalk/supports-color)
|
||||
|
||||
> Detect whether a terminal supports color
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save supports-color
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var supportsColor = require('supports-color');
|
||||
|
||||
if (supportsColor) {
|
||||
console.log('Terminal supports color');
|
||||
}
|
||||
```
|
||||
|
||||
It obeys the `--color` and `--no-color` CLI flags.
|
||||
|
||||
For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
|
||||
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
117
build/node_modules/cssnano/node_modules/chalk/package.json
generated
vendored
Normal file
117
build/node_modules/cssnano/node_modules/chalk/package.json
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"chalk@1.1.3",
|
||||
"/Users/asciidisco/Desktop/asciidisco.com/build"
|
||||
]
|
||||
],
|
||||
"_from": "chalk@1.1.3",
|
||||
"_id": "chalk@1.1.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||
"_location": "/cssnano/chalk",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "chalk@1.1.3",
|
||||
"name": "chalk",
|
||||
"escapedName": "chalk",
|
||||
"rawSpec": "1.1.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.1.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cssnano/postcss"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"_spec": "1.1.3",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
|
||||
"bugs": {
|
||||
"url": "https://github.com/chalk/chalk/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": "^2.2.1",
|
||||
"escape-string-regexp": "^1.0.2",
|
||||
"has-ansi": "^2.0.0",
|
||||
"strip-ansi": "^3.0.0",
|
||||
"supports-color": "^2.0.0"
|
||||
},
|
||||
"description": "Terminal string styling done right. Much color.",
|
||||
"devDependencies": {
|
||||
"coveralls": "^2.11.2",
|
||||
"matcha": "^0.6.0",
|
||||
"mocha": "*",
|
||||
"nyc": "^3.0.0",
|
||||
"require-uncached": "^1.0.2",
|
||||
"resolve-from": "^1.0.0",
|
||||
"semver": "^4.3.3",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/chalk/chalk#readme",
|
||||
"keywords": [
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"str",
|
||||
"ansi",
|
||||
"style",
|
||||
"styles",
|
||||
"tty",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
{
|
||||
"name": "Joshua Appelman",
|
||||
"email": "jappelman@xebia.com",
|
||||
"url": "jbnicolai.com"
|
||||
},
|
||||
{
|
||||
"name": "JD Ballard",
|
||||
"email": "i.am.qix@gmail.com",
|
||||
"url": "github.com/qix-"
|
||||
}
|
||||
],
|
||||
"name": "chalk",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chalk/chalk.git"
|
||||
},
|
||||
"scripts": {
|
||||
"bench": "matcha benchmark.js",
|
||||
"coverage": "nyc npm test && nyc report",
|
||||
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
|
||||
"test": "xo && mocha"
|
||||
},
|
||||
"version": "1.1.3",
|
||||
"xo": {
|
||||
"envs": [
|
||||
"node",
|
||||
"mocha"
|
||||
]
|
||||
}
|
||||
}
|
||||
213
build/node_modules/cssnano/node_modules/chalk/readme.md
generated
vendored
Normal file
213
build/node_modules/cssnano/node_modules/chalk/readme.md
generated
vendored
Normal file
@@ -0,0 +1,213 @@
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<br>
|
||||
<img width="360" src="https://cdn.rawgit.com/chalk/chalk/19935d6484811c5e468817f846b7b3d417d7bf4a/logo.svg" alt="chalk">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
> Terminal string styling done right
|
||||
|
||||
[](https://travis-ci.org/chalk/chalk)
|
||||
[](https://coveralls.io/r/chalk/chalk?branch=master)
|
||||
[](https://www.youtube.com/watch?v=9auOCbH5Ns4)
|
||||
|
||||
|
||||
[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.
|
||||
|
||||
**Chalk is a clean and focused alternative.**
|
||||
|
||||

|
||||
|
||||
|
||||
## Why
|
||||
|
||||
- Highly performant
|
||||
- Doesn't extend `String.prototype`
|
||||
- Expressive API
|
||||
- Ability to nest styles
|
||||
- Clean and focused
|
||||
- Auto-detects color support
|
||||
- Actively maintained
|
||||
- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save chalk
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
|
||||
|
||||
```js
|
||||
var chalk = require('chalk');
|
||||
|
||||
// style a string
|
||||
chalk.blue('Hello world!');
|
||||
|
||||
// combine styled and normal strings
|
||||
chalk.blue('Hello') + 'World' + chalk.red('!');
|
||||
|
||||
// compose multiple styles using the chainable API
|
||||
chalk.blue.bgRed.bold('Hello world!');
|
||||
|
||||
// pass in multiple arguments
|
||||
chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz');
|
||||
|
||||
// nest styles
|
||||
chalk.red('Hello', chalk.underline.bgBlue('world') + '!');
|
||||
|
||||
// nest styles of the same type even (color, underline, background)
|
||||
chalk.green(
|
||||
'I am a green line ' +
|
||||
chalk.blue.underline.bold('with a blue substring') +
|
||||
' that becomes green again!'
|
||||
);
|
||||
```
|
||||
|
||||
Easily define your own themes.
|
||||
|
||||
```js
|
||||
var chalk = require('chalk');
|
||||
var error = chalk.bold.red;
|
||||
console.log(error('Error!'));
|
||||
```
|
||||
|
||||
Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data).
|
||||
|
||||
```js
|
||||
var name = 'Sindre';
|
||||
console.log(chalk.green('Hello %s'), name);
|
||||
//=> Hello Sindre
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### chalk.`<style>[.<style>...](string, [string...])`
|
||||
|
||||
Example: `chalk.red.bold.underline('Hello', 'world');`
|
||||
|
||||
Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `Chalk.red.yellow.green` is equivalent to `Chalk.green`.
|
||||
|
||||
Multiple arguments will be separated by space.
|
||||
|
||||
### chalk.enabled
|
||||
|
||||
Color support is automatically detected, but you can override it by setting the `enabled` property. You should however only do this in your own code as it applies globally to all chalk consumers.
|
||||
|
||||
If you need to change this in a reusable module create a new instance:
|
||||
|
||||
```js
|
||||
var ctx = new chalk.constructor({enabled: false});
|
||||
```
|
||||
|
||||
### chalk.supportsColor
|
||||
|
||||
Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
|
||||
|
||||
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
|
||||
|
||||
### chalk.styles
|
||||
|
||||
Exposes the styles as [ANSI escape codes](https://github.com/chalk/ansi-styles).
|
||||
|
||||
Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with your own.
|
||||
|
||||
```js
|
||||
var chalk = require('chalk');
|
||||
|
||||
console.log(chalk.styles.red);
|
||||
//=> {open: '\u001b[31m', close: '\u001b[39m'}
|
||||
|
||||
console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);
|
||||
```
|
||||
|
||||
### chalk.hasColor(string)
|
||||
|
||||
Check whether a string [has color](https://github.com/chalk/has-ansi).
|
||||
|
||||
### chalk.stripColor(string)
|
||||
|
||||
[Strip color](https://github.com/chalk/strip-ansi) from a string.
|
||||
|
||||
Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var chalk = require('chalk');
|
||||
var styledString = getText();
|
||||
|
||||
if (!chalk.supportsColor) {
|
||||
styledString = chalk.stripColor(styledString);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Styles
|
||||
|
||||
### Modifiers
|
||||
|
||||
- `reset`
|
||||
- `bold`
|
||||
- `dim`
|
||||
- `italic` *(not widely supported)*
|
||||
- `underline`
|
||||
- `inverse`
|
||||
- `hidden`
|
||||
- `strikethrough` *(not widely supported)*
|
||||
|
||||
### Colors
|
||||
|
||||
- `black`
|
||||
- `red`
|
||||
- `green`
|
||||
- `yellow`
|
||||
- `blue` *(on Windows the bright version is used as normal blue is illegible)*
|
||||
- `magenta`
|
||||
- `cyan`
|
||||
- `white`
|
||||
- `gray`
|
||||
|
||||
### Background colors
|
||||
|
||||
- `bgBlack`
|
||||
- `bgRed`
|
||||
- `bgGreen`
|
||||
- `bgYellow`
|
||||
- `bgBlue`
|
||||
- `bgMagenta`
|
||||
- `bgCyan`
|
||||
- `bgWhite`
|
||||
|
||||
|
||||
## 256-colors
|
||||
|
||||
Chalk does not support anything other than the base eight colors, which guarantees it will work on all terminals and systems. Some terminals, specifically `xterm` compliant ones, will support the full range of 8-bit colors. For this the lower level [ansi-256-colors](https://github.com/jbnicolai/ansi-256-colors) package can be used.
|
||||
|
||||
|
||||
## Windows
|
||||
|
||||
If you're on Windows, do yourself a favor and use [`cmder`](http://bliker.github.io/cmder/) instead of `cmd.exe`.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
|
||||
- [ansi-styles](https://github.com/chalk/ansi-styles/) - ANSI escape codes for styling strings in the terminal
|
||||
- [supports-color](https://github.com/chalk/supports-color/) - Detect whether a terminal supports color
|
||||
- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
|
||||
- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
|
||||
- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
|
||||
- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user