first commit
This commit is contained in:
147
build/node_modules/autoprefixer/AUTHORS
generated
vendored
Normal file
147
build/node_modules/autoprefixer/AUTHORS
generated
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
# 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 Komarov <alex7kom@gmail.com>
|
||||
Alexey Plutalov <demiazz.py@gmail.com>
|
||||
Anders Olsen Sandvik <https://github.com/Andersos>
|
||||
Andreas Haller <Andreas.Haller@invision.de>
|
||||
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>
|
||||
Artem Yavorsky <info@yavorsky.org>
|
||||
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>
|
||||
Danny Pule <kojikusan@gmail.com>
|
||||
Darius
|
||||
David Narbutovich <vamnemne@gmail.com>
|
||||
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>
|
||||
Dmitry Semigradsky <semigradskyd@gmail.com>
|
||||
Efremov Alexey <lexich121@gmail.com>
|
||||
eitanr <eitanr@wix.com>
|
||||
Erik Sundahl <esundahl@gmail.com>
|
||||
Eugene Datsky <eugene@datsky.ru>
|
||||
Evgeny Petukhov <petukhov.yevgeny@gmail.com>
|
||||
Evilebot Tnawi <sheo13666q@gmail.com>
|
||||
Fangzhou Li <riophaelee@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>
|
||||
Joan León <joan.leon@gmail.com>
|
||||
Johannes J. Schmidt <schmidt@netzmerk.com>
|
||||
John Kreitlow <jkreitlow@deepfocus.net>
|
||||
Jonathan Ong <jonathanrichardong@gmail.com>
|
||||
Josh Gillies <github@joshgilli.es>
|
||||
Junliang Huang
|
||||
jvdanilo <jvdanilo@gmail.com>
|
||||
Kevin Pfefferle <kevin@rebaseinteractive.com>
|
||||
Kieran <Kieranju@gmail.com>
|
||||
Kir Shatrov <shatrov@me.com>
|
||||
Kiwi <vinh@wikiwi.io>
|
||||
kizu <kizmarh@gmail.com>
|
||||
Leonya Khachaturov <leonidkhachaturov@gmail.com>
|
||||
Lovchikov Anton <besyanya@yandex.ru>
|
||||
L.T <ec.huyinghuan@gmail.com>
|
||||
Lucas Caton <lucascaton@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-Owczarek <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 Marchenko <n30n1ck@gmail.com>
|
||||
Nick Schonning <nschonni@gmail.com>
|
||||
nickspielgist <dev@nickspiel.me>
|
||||
Niels Dequeker <niels.dequeker@gmail.com>
|
||||
Nikolay Burlov <kohgpat@gmail.com>
|
||||
Oleksandr Sergiienko <sigerello@gmail.com>
|
||||
Pavel Pustovalov <pustovalov.pavel@gmail.com>
|
||||
Paul Statezny <Paulstatezny@gmail.com>
|
||||
Peter van Westen <info@regularlabs.com>
|
||||
Peter Zotov <whitequark@whitequark.org>
|
||||
Phil Dokas <phil@jetless.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>
|
||||
Roman Dvornov <rdvornov@gmail.com>
|
||||
Ryan Zimmerman
|
||||
Sami Suo-Heikki <suoheikki.sami@gmail.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>
|
||||
Yet Another Minion <yam@thinkalexandria.com>
|
||||
Даниил Пронин <mail@grawl.ru>
|
||||
一丝 <jie.lijie@alibaba-inc.com>
|
||||
刘祺 <gucong@gmail.com>
|
||||
忆初 <baby@justjavac.com>
|
||||
754
build/node_modules/autoprefixer/CHANGELOG.md
generated
vendored
Normal file
754
build/node_modules/autoprefixer/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,754 @@
|
||||
# Change Log
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 7.2.4
|
||||
* Fix IE 10 support.
|
||||
|
||||
## 7.2.3
|
||||
* Fix `grid-template-areas` in `@media` (by Evgeny Petukhov).
|
||||
|
||||
## 7.2.2
|
||||
* Fix `_autoprefixerDisabled is undefined` issue.
|
||||
|
||||
## 7.2.1
|
||||
* Fix IE and other old JS runtimes support.
|
||||
|
||||
## 7.2 “Ordem e Progresso”
|
||||
* Add `grid-template-areas` support (by Evgeny Petukhov).
|
||||
* Add `grid-template` support (by Evgeny Petukhov).
|
||||
* Add `grid-area` support (by Alexey Komarov).
|
||||
* Add `autoprefixer-info` CLI tool.
|
||||
* Add wrong `radial-gradient` properties warning.
|
||||
* Use current working dir on missed `from` in `info()` (by Phil Dokas).
|
||||
* Fix `grid-row` and `grid-column` support (by Alexey Komarov).
|
||||
* Do not prefix `reverse` animation direction.
|
||||
* Improve test coverage (by Dmitry Semigradsky).
|
||||
|
||||
## 7.1.6
|
||||
* Add warning for using `browserslist` option instead of `browsers`.
|
||||
* Add warning for multiple control comments in the same scope.
|
||||
* Fix `Invalid array length` error during indent changes.
|
||||
|
||||
## 7.1.5
|
||||
* Fix `::placeholder` prefix for Edge.
|
||||
* Fix `inherit`/`initial`/`unset` values for `flex-direction`.
|
||||
* Fix RegExp usage in gradients (by Yet Another Minion).
|
||||
|
||||
## 7.1.4
|
||||
* Fix `radial-gradient` direction conversion.
|
||||
* Fix `image-set` in `cursor`.
|
||||
|
||||
## 7.1.3
|
||||
* Add warning for old `radial-gradient` direction syntax.
|
||||
|
||||
## 7.1.2
|
||||
* Fix `text-decoration` shortcut support.
|
||||
|
||||
## 7.1.1
|
||||
* Remove non-`-webkit-` intrinsic prefixes in Grid Layout (by 一丝).
|
||||
|
||||
## 7.1 “Universitas litterarum”
|
||||
* Add `unicode-bidi` support.
|
||||
* Add `-webkit-appearance` support for Edge.
|
||||
* Add `from` option to `info()`.
|
||||
* Fix intrinsic widths prefixes in Grid Layout.
|
||||
|
||||
## 7.0.1
|
||||
* Fix Autoprefixer for old JS runtimes.
|
||||
|
||||
## 7.0 “Coelestem adspicit lucem”
|
||||
* Remove node.js 0.12 support.
|
||||
* Use PostCSS 6.0.
|
||||
* Use Browserslist 2.
|
||||
* Use `caniuse-lite` instead of `caniuse-db` (by Ben Briggs).
|
||||
* Use `^` for Browserslist dependencies, instead of `~`.
|
||||
* Rewrite project from CoffeeScript to Babel (by Dmitry Semigradsky).
|
||||
* Disable Grid Layout prefixes for IE by default.
|
||||
* Fix `-ms-grid-column-align`.
|
||||
* Move tests to Jest.
|
||||
|
||||
## 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/autoprefixer/LICENSE
generated
vendored
Normal file
20
build/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.
|
||||
628
build/node_modules/autoprefixer/README.md
generated
vendored
Normal file
628
build/node_modules/autoprefixer/README.md
generated
vendored
Normal file
@@ -0,0 +1,628 @@
|
||||
# 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
|
||||
|
||||
#### What is unprefixed version for `-webkit-min-device-pixel-ratio`?
|
||||
|
||||
```css
|
||||
@media (min-resolution: 2dppx) {
|
||||
.image {
|
||||
background-image: url(image@2x.png);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Will be compiled to:
|
||||
|
||||
```css
|
||||
@media (-webkit-min-device-pixel-ratio: 2),
|
||||
(-o-min-device-pixel-ratio: 2/1),
|
||||
(min-resolution: 2dppx) {
|
||||
.image {
|
||||
background-image: url(image@2x.png);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 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 [postcss-unprefix] before Autoprefixer.
|
||||
|
||||
[postcss-unprefix]: https://github.com/gucong3000/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: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ["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]
|
||||
* **Neutrino**: [neutrino-middleware-postcss]
|
||||
* **Jekyll**: add `autoprefixer-rails` and `jekyll-assets` to `Gemfile`
|
||||
* **Brunch**: [postcss-brunch]
|
||||
* **Broccoli**: [broccoli-postcss]
|
||||
* **Middleman**: [middleman-autoprefixer]
|
||||
* **Mincer**: add `autoprefixer` npm package and enable it:
|
||||
`environment.enable('autoprefixer')`
|
||||
|
||||
[neutrino-middleware-postcss]: https://www.npmjs.com/package/neutrino-middleware-postcss
|
||||
[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://codekitapp.com/help/autoprefixer/)
|
||||
* [Prepros](https://prepros.io)
|
||||
|
||||
### CLI
|
||||
|
||||
You can use the [postcss-cli] to run Autoprefixer from CLI:
|
||||
|
||||
```sh
|
||||
npm install postcss-cli autoprefixer
|
||||
npx postcss *.css --use autoprefixer -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
|
||||
|
||||
### Prefixes
|
||||
|
||||
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.
|
||||
|
||||
### Features
|
||||
|
||||
There are 4 plugin’s options to disable some Autoprefixer features.
|
||||
|
||||
* `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.
|
||||
* `remove: false` will disable cleaning outdated prefixes.
|
||||
|
||||
You shoud set them to the plugin:
|
||||
|
||||
```js
|
||||
autoprefixer({ grid: true });
|
||||
```
|
||||
|
||||
### Control Comments
|
||||
|
||||
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
|
||||
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 `false`.
|
||||
* `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]: http://api.postcss.org
|
||||
|
||||
## Debug
|
||||
|
||||
Run `npx autoprefixer-info` in your project directory to check
|
||||
which browsers are selected and which properties will be prefixed:
|
||||
|
||||
```
|
||||
$ npx autoprefixer-info
|
||||
Browsers:
|
||||
Edge: 16
|
||||
|
||||
These browsers account for 0.04% of all users globally
|
||||
|
||||
At-Rules:
|
||||
@viewport: ms
|
||||
|
||||
Selectors:
|
||||
::placeholder: ms
|
||||
|
||||
Properties:
|
||||
user-select: ms
|
||||
hyphens: ms
|
||||
appearance: webkit
|
||||
scroll-snap-type: ms
|
||||
scroll-snap-coordinate: ms
|
||||
scroll-snap-destination: ms
|
||||
scroll-snap-points-x: ms
|
||||
scroll-snap-points-y: ms
|
||||
flow-into: ms
|
||||
flow-from: ms
|
||||
region-fragment: ms
|
||||
text-spacing: ms
|
||||
```
|
||||
|
||||
JS API is also available:
|
||||
|
||||
```js
|
||||
var info = autoprefixer().info();
|
||||
console.log(info);
|
||||
```
|
||||
3
build/node_modules/autoprefixer/bin/autoprefixer-info
generated
vendored
Executable file
3
build/node_modules/autoprefixer/bin/autoprefixer-info
generated
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
process.stdout.write(require('../')().info() + '\n');
|
||||
705
build/node_modules/autoprefixer/data/prefixes.js
generated
vendored
Normal file
705
build/node_modules/autoprefixer/data/prefixes.js
generated
vendored
Normal file
@@ -0,0 +1,705 @@
|
||||
'use strict';
|
||||
|
||||
var unpack = require('caniuse-lite').feature;
|
||||
|
||||
var browsersSort = function browsersSort(a, b) {
|
||||
a = a.split(' ');
|
||||
b = b.split(' ');
|
||||
if (a[0] > b[0]) {
|
||||
return 1;
|
||||
} else if (a[0] < b[0]) {
|
||||
return -1;
|
||||
} else {
|
||||
return Math.sign(parseFloat(a[1]) - parseFloat(b[1]));
|
||||
}
|
||||
};
|
||||
|
||||
// Convert Can I Use data
|
||||
function f(data, opts, callback) {
|
||||
data = unpack(data);
|
||||
|
||||
if (!callback) {
|
||||
var _ref = [opts, {}];
|
||||
callback = _ref[0];
|
||||
opts = _ref[1];
|
||||
}
|
||||
|
||||
var match = opts.match || /\sx($|\s)/;
|
||||
var need = [];
|
||||
|
||||
for (var browser in data.stats) {
|
||||
var versions = data.stats[browser];
|
||||
for (var version in versions) {
|
||||
var support = versions[version];
|
||||
if (support.match(match)) {
|
||||
need.push(browser + ' ' + version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
callback(need.sort(browsersSort));
|
||||
}
|
||||
|
||||
// Add data for all properties
|
||||
var result = {};
|
||||
|
||||
var prefix = function prefix(names, data) {
|
||||
for (var _iterator = names, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref2 = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref2 = _i.value;
|
||||
}
|
||||
|
||||
var name = _ref2;
|
||||
|
||||
result[name] = Object.assign({}, data);
|
||||
}
|
||||
};
|
||||
|
||||
var add = function add(names, data) {
|
||||
for (var _iterator2 = names, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
||||
var _ref3;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref3 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref3 = _i2.value;
|
||||
}
|
||||
|
||||
var name = _ref3;
|
||||
|
||||
result[name].browsers = result[name].browsers.concat(data.browsers).sort(browsersSort);
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = result;
|
||||
|
||||
// Border Radius
|
||||
f(require('caniuse-lite/data/features/border-radius.js'), 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-'],
|
||||
feature: 'border-radius',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Box Shadow
|
||||
f(require('caniuse-lite/data/features/css-boxshadow.js'), function (browsers) {
|
||||
return prefix(['box-shadow'], {
|
||||
mistakes: ['-khtml-'],
|
||||
feature: 'css-boxshadow',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Animation
|
||||
f(require('caniuse-lite/data/features/css-animation.js'), 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-'],
|
||||
feature: 'css-animation',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Transition
|
||||
f(require('caniuse-lite/data/features/css-transitions.js'), function (browsers) {
|
||||
return prefix(['transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function'], {
|
||||
mistakes: ['-khtml-', '-ms-'],
|
||||
browsers: browsers,
|
||||
feature: 'css-transitions'
|
||||
});
|
||||
});
|
||||
|
||||
// Transform 2D
|
||||
f(require('caniuse-lite/data/features/transforms2d.js'), function (browsers) {
|
||||
return prefix(['transform', 'transform-origin'], {
|
||||
feature: 'transforms2d',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Transform 3D
|
||||
var transforms3d = require('caniuse-lite/data/features/transforms3d.js');
|
||||
|
||||
f(transforms3d, function (browsers) {
|
||||
prefix(['perspective', 'perspective-origin'], {
|
||||
feature: 'transforms3d',
|
||||
browsers: browsers
|
||||
});
|
||||
return prefix(['transform-style'], {
|
||||
mistakes: ['-ms-', '-o-'],
|
||||
browsers: browsers,
|
||||
feature: 'transforms3d'
|
||||
});
|
||||
});
|
||||
|
||||
f(transforms3d, { match: /y\sx|y\s#2/ }, function (browsers) {
|
||||
return prefix(['backface-visibility'], {
|
||||
mistakes: ['-ms-', '-o-'],
|
||||
feature: 'transforms3d',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Gradients
|
||||
var gradients = require('caniuse-lite/data/features/css-gradients.js');
|
||||
|
||||
f(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-'],
|
||||
feature: 'css-gradients',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
f(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'], {
|
||||
feature: 'css-gradients',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Box sizing
|
||||
f(require('caniuse-lite/data/features/css3-boxsizing.js'), function (browsers) {
|
||||
return prefix(['box-sizing'], {
|
||||
feature: 'css3-boxsizing',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Filter Effects
|
||||
f(require('caniuse-lite/data/features/css-filters.js'), function (browsers) {
|
||||
return prefix(['filter'], {
|
||||
feature: 'css-filters',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// filter() function
|
||||
f(require('caniuse-lite/data/features/css-filter-function.js'), function (browsers) {
|
||||
return prefix(['filter-function'], {
|
||||
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
||||
feature: 'css-filter-function',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Backdrop-filter
|
||||
f(require('caniuse-lite/data/features/css-backdrop-filter.js'), function (browsers) {
|
||||
return prefix(['backdrop-filter'], {
|
||||
feature: 'css-backdrop-filter',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// element() function
|
||||
f(require('caniuse-lite/data/features/css-element-function.js'), function (browsers) {
|
||||
return prefix(['element'], {
|
||||
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
||||
feature: 'css-element-function',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Multicolumns
|
||||
f(require('caniuse-lite/data/features/multicolumn.js'), function (browsers) {
|
||||
prefix(['columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width'], {
|
||||
feature: 'multicolumn',
|
||||
browsers: browsers
|
||||
});
|
||||
|
||||
prefix(['column-count', 'column-rule-style', 'column-span', 'column-fill', 'break-before', 'break-after', 'break-inside'], {
|
||||
feature: 'multicolumn',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// User select
|
||||
f(require('caniuse-lite/data/features/user-select-none.js'), function (browsers) {
|
||||
return prefix(['user-select'], {
|
||||
mistakes: ['-khtml-'],
|
||||
feature: 'user-select-none',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Flexible Box Layout
|
||||
var flexbox = require('caniuse-lite/data/features/flexbox.js');
|
||||
f(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'],
|
||||
feature: 'flexbox',
|
||||
browsers: browsers
|
||||
});
|
||||
prefix(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], {
|
||||
feature: 'flexbox',
|
||||
browsers: browsers
|
||||
});
|
||||
prefix(['flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content'], {
|
||||
feature: 'flexbox',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
f(flexbox, { match: /y\sx/ }, function (browsers) {
|
||||
add(['display-flex', 'inline-flex'], {
|
||||
feature: 'flexbox',
|
||||
browsers: browsers
|
||||
});
|
||||
add(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], {
|
||||
feature: 'flexbox',
|
||||
browsers: browsers
|
||||
});
|
||||
add(['flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content'], {
|
||||
feature: 'flexbox',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// calc() unit
|
||||
f(require('caniuse-lite/data/features/calc.js'), function (browsers) {
|
||||
return prefix(['calc'], {
|
||||
props: ['*'],
|
||||
feature: 'calc',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Background options
|
||||
f(require('caniuse-lite/data/features/background-img-opts.js'), function (browsers) {
|
||||
return prefix(['background-clip', 'background-origin', 'background-size'], {
|
||||
feature: 'background-img-opts',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Font feature settings
|
||||
f(require('caniuse-lite/data/features/font-feature.js'), function (browsers) {
|
||||
return prefix(['font-feature-settings', 'font-variant-ligatures', 'font-language-override'], {
|
||||
feature: 'font-feature',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS font-kerning property
|
||||
f(require('caniuse-lite/data/features/font-kerning.js'), function (browsers) {
|
||||
return prefix(['font-kerning'], {
|
||||
feature: 'font-kerning',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Border image
|
||||
f(require('caniuse-lite/data/features/border-image.js'), function (browsers) {
|
||||
return prefix(['border-image'], {
|
||||
feature: 'border-image',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Selection selector
|
||||
f(require('caniuse-lite/data/features/css-selection.js'), function (browsers) {
|
||||
return prefix(['::selection'], {
|
||||
selector: true,
|
||||
feature: 'css-selection',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Placeholder selector
|
||||
f(require('caniuse-lite/data/features/css-placeholder.js'), function (browsers) {
|
||||
browsers = browsers.map(function (i) {
|
||||
var _i$split = i.split(' '),
|
||||
name = _i$split[0],
|
||||
version = _i$split[1];
|
||||
|
||||
if (name === 'firefox' && parseFloat(version) <= 18) {
|
||||
return i + ' old';
|
||||
} else if (name === 'ie') {
|
||||
return i + ' old';
|
||||
} else {
|
||||
return i;
|
||||
}
|
||||
});
|
||||
|
||||
prefix(['::placeholder'], {
|
||||
selector: true,
|
||||
feature: 'css-placeholder',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Hyphenation
|
||||
f(require('caniuse-lite/data/features/css-hyphens.js'), function (browsers) {
|
||||
return prefix(['hyphens'], {
|
||||
feature: 'css-hyphens',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Fullscreen selector
|
||||
var fullscreen = require('caniuse-lite/data/features/fullscreen.js');
|
||||
|
||||
f(fullscreen, function (browsers) {
|
||||
return prefix([':fullscreen'], {
|
||||
selector: true,
|
||||
feature: 'fullscreen',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
f(fullscreen, { match: /x(\s#2|$)/ }, function (browsers) {
|
||||
return prefix(['::backdrop'], {
|
||||
selector: true,
|
||||
feature: 'fullscreen',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Tab size
|
||||
f(require('caniuse-lite/data/features/css3-tabsize.js'), function (browsers) {
|
||||
return prefix(['tab-size'], {
|
||||
feature: 'css3-tabsize',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Intrinsic & extrinsic sizing
|
||||
f(require('caniuse-lite/data/features/intrinsic-width.js'), 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', 'grid', 'grid-template', 'grid-template-rows', 'grid-template-columns', 'grid-auto-columns', 'grid-auto-rows'],
|
||||
feature: 'intrinsic-width',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Zoom cursors
|
||||
f(require('caniuse-lite/data/features/css3-cursors-newer.js'), function (browsers) {
|
||||
return prefix(['zoom-in', 'zoom-out'], {
|
||||
props: ['cursor'],
|
||||
feature: 'css3-cursors-newer',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Grab cursors
|
||||
f(require('caniuse-lite/data/features/css3-cursors-grab.js'), function (browsers) {
|
||||
return prefix(['grab', 'grabbing'], {
|
||||
props: ['cursor'],
|
||||
feature: 'css3-cursors-grab',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Sticky position
|
||||
f(require('caniuse-lite/data/features/css-sticky.js'), function (browsers) {
|
||||
return prefix(['sticky'], {
|
||||
props: ['position'],
|
||||
feature: 'css-sticky',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Pointer Events
|
||||
f(require('caniuse-lite/data/features/pointer.js'), function (browsers) {
|
||||
return prefix(['touch-action'], {
|
||||
feature: 'pointer',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Text decoration
|
||||
var decoration = require('caniuse-lite/data/features/text-decoration.js');
|
||||
|
||||
f(decoration, function (browsers) {
|
||||
return prefix(['text-decoration-style', 'text-decoration-color', 'text-decoration-line', 'text-decoration'], {
|
||||
feature: 'text-decoration',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
f(decoration, { match: /x.*#[23]/ }, function (browsers) {
|
||||
return prefix(['text-decoration-skip'], {
|
||||
feature: 'text-decoration',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Text Size Adjust
|
||||
f(require('caniuse-lite/data/features/text-size-adjust.js'), function (browsers) {
|
||||
return prefix(['text-size-adjust'], {
|
||||
feature: 'text-size-adjust',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS Masks
|
||||
f(require('caniuse-lite/data/features/css-masks.js'), function (browsers) {
|
||||
prefix(['mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-repeat', 'mask-border-repeat', 'mask-border-source'], {
|
||||
feature: 'css-masks',
|
||||
browsers: browsers
|
||||
});
|
||||
prefix(['mask', 'mask-position', 'mask-size', 'mask-border', 'mask-border-outset', 'mask-border-width', 'mask-border-slice'], {
|
||||
feature: 'css-masks',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS clip-path property
|
||||
f(require('caniuse-lite/data/features/css-clip-path.js'), function (browsers) {
|
||||
return prefix(['clip-path'], {
|
||||
feature: 'css-clip-path',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Fragmented Borders and Backgrounds
|
||||
f(require('caniuse-lite/data/features/css-boxdecorationbreak.js'), function (browsers) {
|
||||
return prefix(['box-decoration-break'], {
|
||||
feature: 'css-boxdecorationbreak',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS3 object-fit/object-position
|
||||
f(require('caniuse-lite/data/features/object-fit.js'), function (browsers) {
|
||||
return prefix(['object-fit', 'object-position'], {
|
||||
feature: 'object-fit',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS Shapes
|
||||
f(require('caniuse-lite/data/features/css-shapes.js'), function (browsers) {
|
||||
return prefix(['shape-margin', 'shape-outside', 'shape-image-threshold'], {
|
||||
feature: 'css-shapes',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS3 text-overflow
|
||||
f(require('caniuse-lite/data/features/text-overflow.js'), function (browsers) {
|
||||
return prefix(['text-overflow'], {
|
||||
feature: 'text-overflow',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Viewport at-rule
|
||||
f(require('caniuse-lite/data/features/css-deviceadaptation.js'), function (browsers) {
|
||||
return prefix(['@viewport'], {
|
||||
feature: 'css-deviceadaptation',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Resolution Media Queries
|
||||
var resolut = require('caniuse-lite/data/features/css-media-resolution.js');
|
||||
f(resolut, { match: /( x($| )|a #3)/ }, function (browsers) {
|
||||
return prefix(['@resolution'], {
|
||||
feature: 'css-media-resolution',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS text-align-last
|
||||
f(require('caniuse-lite/data/features/css-text-align-last.js'), function (browsers) {
|
||||
return prefix(['text-align-last'], {
|
||||
feature: 'css-text-align-last',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Crisp Edges Image Rendering Algorithm
|
||||
var crispedges = require('caniuse-lite/data/features/css-crisp-edges.js');
|
||||
|
||||
f(crispedges, { match: /y x|a x #1/ }, function (browsers) {
|
||||
return prefix(['pixelated'], {
|
||||
props: ['image-rendering'],
|
||||
feature: 'css-crisp-edges',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
f(crispedges, { match: /a x #2/ }, function (browsers) {
|
||||
return prefix(['image-rendering'], {
|
||||
feature: 'css-crisp-edges',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Logical Properties
|
||||
var logicalProps = require('caniuse-lite/data/features/css-logical-props.js');
|
||||
|
||||
f(logicalProps, function (browsers) {
|
||||
return prefix(['border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end'], {
|
||||
feature: 'css-logical-props',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
f(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'], {
|
||||
feature: 'css-logical-props',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS appearance
|
||||
var appearance = require('caniuse-lite/data/features/css-appearance.js');
|
||||
f(appearance, { match: /#2|x/ }, function (browsers) {
|
||||
return prefix(['appearance'], {
|
||||
feature: 'css-appearance',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS Scroll snap points
|
||||
f(require('caniuse-lite/data/features/css-snappoints.js'), function (browsers) {
|
||||
return prefix(['scroll-snap-type', 'scroll-snap-coordinate', 'scroll-snap-destination', 'scroll-snap-points-x', 'scroll-snap-points-y'], {
|
||||
feature: 'css-snappoints',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS Regions
|
||||
f(require('caniuse-lite/data/features/css-regions.js'), function (browsers) {
|
||||
return prefix(['flow-into', 'flow-from', 'region-fragment'], {
|
||||
feature: 'css-regions',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS image-set
|
||||
f(require('caniuse-lite/data/features/css-image-set.js'), function (browsers) {
|
||||
return prefix(['image-set'], {
|
||||
props: ['background', 'background-image', 'border-image', 'cursor', 'mask', 'mask-image', 'list-style', 'list-style-image', 'content'],
|
||||
feature: 'css-image-set',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Writing Mode
|
||||
var writingMode = require('caniuse-lite/data/features/css-writing-mode.js');
|
||||
f(writingMode, { match: /a|x/ }, function (browsers) {
|
||||
return prefix(['writing-mode'], {
|
||||
feature: 'css-writing-mode',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Cross-Fade Function
|
||||
f(require('caniuse-lite/data/features/css-cross-fade.js'), function (browsers) {
|
||||
return prefix(['cross-fade'], {
|
||||
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
|
||||
feature: 'css-cross-fade',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Read Only selector
|
||||
f(require('caniuse-lite/data/features/css-read-only-write.js'), function (browsers) {
|
||||
return prefix([':read-only', ':read-write'], {
|
||||
selector: true,
|
||||
feature: 'css-read-only-write',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// Text Emphasize
|
||||
f(require('caniuse-lite/data/features/text-emphasis.js'), function (browsers) {
|
||||
return prefix(['text-emphasis', 'text-emphasis-position', 'text-emphasis-style', 'text-emphasis-color'], {
|
||||
feature: 'text-emphasis',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS Grid Layout
|
||||
var grid = require('caniuse-lite/data/features/css-grid.js');
|
||||
|
||||
f(grid, function (browsers) {
|
||||
prefix(['display-grid', 'inline-grid'], {
|
||||
props: ['display'],
|
||||
feature: 'css-grid',
|
||||
browsers: browsers
|
||||
});
|
||||
prefix(['grid-template-columns', 'grid-template-rows', 'grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end', 'grid-row', 'grid-column', 'grid-area', 'grid-template', 'grid-template-areas'], {
|
||||
feature: 'css-grid',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
f(grid, { match: /a x/ }, function (browsers) {
|
||||
return prefix(['grid-column-align', 'grid-row-align'], {
|
||||
feature: 'css-grid',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// CSS text-spacing
|
||||
f(require('caniuse-lite/data/features/css-text-spacing.js'), function (browsers) {
|
||||
return prefix(['text-spacing'], {
|
||||
feature: 'css-text-spacing',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// :any-link selector
|
||||
f(require('caniuse-lite/data/features/css-any-link.js'), function (browsers) {
|
||||
return prefix([':any-link'], {
|
||||
selector: true,
|
||||
feature: 'css-any-link',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
// unicode-bidi
|
||||
var bidi = require('caniuse-lite/data/features/css-unicode-bidi.js');
|
||||
|
||||
f(bidi, function (browsers) {
|
||||
return prefix(['isolate'], {
|
||||
props: ['unicode-bidi'],
|
||||
feature: 'css-unicode-bidi',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
f(bidi, { match: /y x|a x #2/ }, function (browsers) {
|
||||
return prefix(['plaintext'], {
|
||||
props: ['unicode-bidi'],
|
||||
feature: 'css-unicode-bidi',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
f(bidi, { match: /y x/ }, function (browsers) {
|
||||
return prefix(['isolate-override'], {
|
||||
props: ['unicode-bidi'],
|
||||
feature: 'css-unicode-bidi',
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
70
build/node_modules/autoprefixer/lib/at-rule.js
generated
vendored
Normal file
70
build/node_modules/autoprefixer/lib/at-rule.js
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Prefixer = require('./prefixer');
|
||||
|
||||
var AtRule = function (_Prefixer) {
|
||||
_inherits(AtRule, _Prefixer);
|
||||
|
||||
function AtRule() {
|
||||
_classCallCheck(this, AtRule);
|
||||
|
||||
return _possibleConstructorReturn(this, _Prefixer.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone and add prefixes for at-rule
|
||||
*/
|
||||
AtRule.prototype.add = function add(rule, prefix) {
|
||||
var prefixed = prefix + rule.name;
|
||||
|
||||
var already = rule.parent.some(function (i) {
|
||||
return i.name === prefixed && i.params === rule.params;
|
||||
});
|
||||
if (already) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var cloned = this.clone(rule, { name: prefixed });
|
||||
return rule.parent.insertBefore(rule, cloned);
|
||||
};
|
||||
|
||||
/**
|
||||
* Clone node with prefixes
|
||||
*/
|
||||
|
||||
|
||||
AtRule.prototype.process = function process(node) {
|
||||
var parent = this.parentPrefix(node);
|
||||
|
||||
for (var _iterator = this.prefixes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var prefix = _ref;
|
||||
|
||||
if (!parent || parent === prefix) {
|
||||
this.add(node, prefix);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return AtRule;
|
||||
}(Prefixer);
|
||||
|
||||
module.exports = AtRule;
|
||||
126
build/node_modules/autoprefixer/lib/autoprefixer.js
generated
vendored
Normal file
126
build/node_modules/autoprefixer/lib/autoprefixer.js
generated
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
'use strict';
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
var browserslist = require('browserslist');
|
||||
var postcss = require('postcss');
|
||||
|
||||
var Browsers = require('./browsers');
|
||||
var Prefixes = require('./prefixes');
|
||||
|
||||
function isPlainObject(obj) {
|
||||
return Object.prototype.toString.apply(obj) === '[object Object]';
|
||||
}
|
||||
|
||||
var cache = {};
|
||||
|
||||
function timeCapsule(result, prefixes) {
|
||||
if (prefixes.browsers.selected.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (prefixes.add.selectors.length > 0) {
|
||||
return;
|
||||
}
|
||||
if (Object.keys(prefixes.add).length > 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* istanbul ignore next */
|
||||
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 () {
|
||||
for (var _len = arguments.length, reqs = Array(_len), _key = 0; _key < _len; _key++) {
|
||||
reqs[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
var options = void 0;
|
||||
if (reqs.length === 1 && isPlainObject(reqs[0])) {
|
||||
options = reqs[0];
|
||||
reqs = undefined;
|
||||
} else if (reqs.length === 0 || reqs.length === 1 && !reqs[0]) {
|
||||
reqs = undefined;
|
||||
} else if (reqs.length <= 2 && (reqs[0] instanceof Array || !reqs[0])) {
|
||||
options = reqs[1];
|
||||
reqs = reqs[0];
|
||||
} else if (_typeof(reqs[reqs.length - 1]) === 'object') {
|
||||
options = reqs.pop();
|
||||
}
|
||||
|
||||
if (!options) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
if (options.browser) {
|
||||
throw new Error('Change `browser` option to `browsers` in Autoprefixer');
|
||||
} else if (options.browserslist) {
|
||||
throw new Error('Change `browserslist` option to `browsers` in Autoprefixer');
|
||||
}
|
||||
|
||||
if (options.browsers) {
|
||||
reqs = options.browsers;
|
||||
}
|
||||
|
||||
if (typeof options.grid === 'undefined') {
|
||||
options.grid = false;
|
||||
}
|
||||
|
||||
var loadPrefixes = function loadPrefixes(opts) {
|
||||
var data = module.exports.data;
|
||||
var browsers = new Browsers(data.browsers, reqs, opts, options.stats);
|
||||
var key = browsers.selected.join(', ') + JSON.stringify(options);
|
||||
|
||||
if (!cache[key]) {
|
||||
cache[key] = new Prefixes(data.prefixes, browsers, options);
|
||||
}
|
||||
|
||||
return cache[key];
|
||||
};
|
||||
|
||||
var plugin = function plugin(css, result) {
|
||||
var prefixes = loadPrefixes({
|
||||
from: css.source && css.source.input.file,
|
||||
env: options.env
|
||||
});
|
||||
timeCapsule(result, prefixes);
|
||||
if (options.remove !== false) {
|
||||
prefixes.processor.remove(css, result);
|
||||
}
|
||||
if (options.add !== false) {
|
||||
prefixes.processor.add(css, result);
|
||||
}
|
||||
};
|
||||
|
||||
plugin.options = options;
|
||||
|
||||
plugin.browsers = reqs;
|
||||
|
||||
plugin.info = function (opts) {
|
||||
opts = opts || {};
|
||||
opts.from = opts.from || process.cwd();
|
||||
|
||||
return require('./info')(loadPrefixes(opts));
|
||||
};
|
||||
|
||||
return plugin;
|
||||
});
|
||||
|
||||
/**
|
||||
* Autoprefixer data
|
||||
*/
|
||||
module.exports.data = {
|
||||
browsers: require('caniuse-lite').agents,
|
||||
prefixes: require('../data/prefixes')
|
||||
};
|
||||
|
||||
/**
|
||||
* Autoprefixer default browsers
|
||||
*/
|
||||
module.exports.defaults = browserslist.defaults;
|
||||
|
||||
/**
|
||||
* Inspect with default Autoprefixer
|
||||
*/
|
||||
module.exports.info = function () {
|
||||
return module.exports().info();
|
||||
};
|
||||
71
build/node_modules/autoprefixer/lib/brackets.js
generated
vendored
Normal file
71
build/node_modules/autoprefixer/lib/brackets.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
'use strict';
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
var last = function last(array) {
|
||||
return array[array.length - 1];
|
||||
};
|
||||
|
||||
var brackets = {
|
||||
|
||||
/**
|
||||
* Parse string to nodes tree
|
||||
*/
|
||||
parse: function parse(str) {
|
||||
var current = [''];
|
||||
var stack = [current];
|
||||
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
var sym = str[i];
|
||||
if (sym === '(') {
|
||||
current = [''];
|
||||
last(stack).push(current);
|
||||
stack.push(current);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sym === ')') {
|
||||
stack.pop();
|
||||
current = last(stack);
|
||||
current.push('');
|
||||
continue;
|
||||
}
|
||||
|
||||
current[current.length - 1] += sym;
|
||||
}
|
||||
|
||||
return stack[0];
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Generate output string by nodes tree
|
||||
*/
|
||||
stringify: function stringify(ast) {
|
||||
var result = '';
|
||||
for (var _iterator = ast, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var i = _ref;
|
||||
|
||||
if ((typeof i === 'undefined' ? 'undefined' : _typeof(i)) === 'object') {
|
||||
result += '(' + brackets.stringify(i) + ')';
|
||||
continue;
|
||||
}
|
||||
|
||||
result += i;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = brackets;
|
||||
99
build/node_modules/autoprefixer/lib/browsers.js
generated
vendored
Normal file
99
build/node_modules/autoprefixer/lib/browsers.js
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
'use strict';
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
var browserslist = require('browserslist');
|
||||
|
||||
var utils = require('./utils');
|
||||
|
||||
var Browsers = function () {
|
||||
|
||||
/**
|
||||
* Return all prefixes for default browser data
|
||||
*/
|
||||
Browsers.prefixes = function prefixes() {
|
||||
if (this.prefixesCache) {
|
||||
return this.prefixesCache;
|
||||
}
|
||||
|
||||
var data = require('caniuse-lite').agents;
|
||||
|
||||
this.prefixesCache = [];
|
||||
for (var name in data) {
|
||||
this.prefixesCache.push('-' + data[name].prefix + '-');
|
||||
}
|
||||
|
||||
this.prefixesCache = utils.uniq(this.prefixesCache).sort(function (a, b) {
|
||||
return b.length - a.length;
|
||||
});
|
||||
|
||||
return this.prefixesCache;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check is value contain any possibe prefix
|
||||
*/
|
||||
|
||||
|
||||
Browsers.withPrefix = function withPrefix(value) {
|
||||
if (!this.prefixesRegexp) {
|
||||
this.prefixesRegexp = new RegExp(this.prefixes().join('|'));
|
||||
}
|
||||
|
||||
return this.prefixesRegexp.test(value);
|
||||
};
|
||||
|
||||
function Browsers(data, requirements, options, stats) {
|
||||
_classCallCheck(this, Browsers);
|
||||
|
||||
this.data = data;
|
||||
this.options = options || {};
|
||||
this.stats = stats;
|
||||
this.selected = this.parse(requirements);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return browsers selected by requirements
|
||||
*/
|
||||
|
||||
|
||||
Browsers.prototype.parse = function parse(requirements) {
|
||||
return browserslist(requirements, {
|
||||
stats: this.stats,
|
||||
path: this.options.from,
|
||||
env: this.options.env
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Return prefix for selected browser
|
||||
*/
|
||||
|
||||
|
||||
Browsers.prototype.prefix = function prefix(browser) {
|
||||
var _browser$split = browser.split(' '),
|
||||
name = _browser$split[0],
|
||||
version = _browser$split[1];
|
||||
|
||||
var data = this.data[name];
|
||||
|
||||
var prefix = data.prefix_exceptions && data.prefix_exceptions[version];
|
||||
if (!prefix) {
|
||||
prefix = data.prefix;
|
||||
}
|
||||
return '-' + prefix + '-';
|
||||
};
|
||||
|
||||
/**
|
||||
* Is browser is selected by requirements
|
||||
*/
|
||||
|
||||
|
||||
Browsers.prototype.isSelected = function isSelected(browser) {
|
||||
return this.selected.indexOf(browser) !== -1;
|
||||
};
|
||||
|
||||
return Browsers;
|
||||
}();
|
||||
|
||||
module.exports = Browsers;
|
||||
261
build/node_modules/autoprefixer/lib/declaration.js
generated
vendored
Normal file
261
build/node_modules/autoprefixer/lib/declaration.js
generated
vendored
Normal file
@@ -0,0 +1,261 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Prefixer = require('./prefixer');
|
||||
var Browsers = require('./browsers');
|
||||
var utils = require('./utils');
|
||||
|
||||
var Declaration = function (_Prefixer) {
|
||||
_inherits(Declaration, _Prefixer);
|
||||
|
||||
function Declaration() {
|
||||
_classCallCheck(this, Declaration);
|
||||
|
||||
return _possibleConstructorReturn(this, _Prefixer.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Always true, because we already get prefixer by property name
|
||||
*/
|
||||
Declaration.prototype.check = function check() /* decl */{
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return prefixed version of property
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
return prefix + prop;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return unprefixed version of property
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.normalize = function normalize(prop) {
|
||||
return prop;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check `value`, that it contain other prefixes, rather than `prefix`
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.otherPrefixes = function otherPrefixes(value, prefix) {
|
||||
for (var _iterator = Browsers.prefixes(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var other = _ref;
|
||||
|
||||
if (other === prefix) {
|
||||
continue;
|
||||
}
|
||||
if (value.indexOf(other) !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set prefix to declaration
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.set = function set(decl, prefix) {
|
||||
decl.prop = this.prefixed(decl.prop, prefix);
|
||||
return decl;
|
||||
};
|
||||
|
||||
/**
|
||||
* Should we use visual cascade for prefixes
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.needCascade = function needCascade(decl) {
|
||||
if (!decl._autoprefixerCascade) {
|
||||
decl._autoprefixerCascade = this.all.options.cascade !== false && decl.raw('before').indexOf('\n') !== -1;
|
||||
}
|
||||
return decl._autoprefixerCascade;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return maximum length of possible prefixed property
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.maxPrefixed = function maxPrefixed(prefixes, decl) {
|
||||
if (decl._autoprefixerMax) {
|
||||
return decl._autoprefixerMax;
|
||||
}
|
||||
|
||||
var max = 0;
|
||||
for (var _iterator2 = prefixes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var prefix = _ref2;
|
||||
|
||||
prefix = utils.removeNote(prefix);
|
||||
if (prefix.length > max) {
|
||||
max = prefix.length;
|
||||
}
|
||||
}
|
||||
decl._autoprefixerMax = max;
|
||||
|
||||
return decl._autoprefixerMax;
|
||||
};
|
||||
|
||||
/**
|
||||
* Calculate indentation to create visual cascade
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.calcBefore = function calcBefore(prefixes, decl) {
|
||||
var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
||||
|
||||
var max = this.maxPrefixed(prefixes, decl);
|
||||
var diff = max - utils.removeNote(prefix).length;
|
||||
|
||||
var before = decl.raw('before');
|
||||
if (diff > 0) {
|
||||
before += Array(diff).fill(' ').join('');
|
||||
}
|
||||
|
||||
return before;
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove visual cascade
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.restoreBefore = function restoreBefore(decl) {
|
||||
var lines = decl.raw('before').split('\n');
|
||||
var min = lines[lines.length - 1];
|
||||
|
||||
this.all.group(decl).up(function (prefixed) {
|
||||
var array = prefixed.raw('before').split('\n');
|
||||
var last = array[array.length - 1];
|
||||
if (last.length < min.length) {
|
||||
min = last;
|
||||
}
|
||||
});
|
||||
|
||||
lines[lines.length - 1] = min;
|
||||
decl.raws.before = lines.join('\n');
|
||||
};
|
||||
|
||||
/**
|
||||
* Clone and insert new declaration
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.insert = function insert(decl, prefix, prefixes) {
|
||||
var cloned = this.set(this.clone(decl), prefix);
|
||||
if (!cloned) return undefined;
|
||||
|
||||
var already = decl.parent.some(function (i) {
|
||||
return i.prop === cloned.prop && i.value === cloned.value;
|
||||
});
|
||||
if (already) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
|
||||
}
|
||||
return decl.parent.insertBefore(decl, cloned);
|
||||
};
|
||||
|
||||
/**
|
||||
* Did this declaration has this prefix above
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.isAlready = function isAlready(decl, prefixed) {
|
||||
var already = this.all.group(decl).up(function (i) {
|
||||
return i.prop === prefixed;
|
||||
});
|
||||
if (!already) {
|
||||
already = this.all.group(decl).down(function (i) {
|
||||
return i.prop === prefixed;
|
||||
});
|
||||
}
|
||||
return already;
|
||||
};
|
||||
|
||||
/**
|
||||
* Clone and add prefixes for declaration
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.add = function add(decl, prefix, prefixes, result) {
|
||||
var prefixed = this.prefixed(decl.prop, prefix);
|
||||
if (this.isAlready(decl, prefixed) || this.otherPrefixes(decl.value, prefix)) {
|
||||
return undefined;
|
||||
}
|
||||
return this.insert(decl, prefix, prefixes, result);
|
||||
};
|
||||
|
||||
/**
|
||||
* Add spaces for visual cascade
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.process = function process(decl, result) {
|
||||
if (!this.needCascade(decl)) {
|
||||
_Prefixer.prototype.process.call(this, decl, result);
|
||||
return;
|
||||
}
|
||||
|
||||
var prefixes = _Prefixer.prototype.process.call(this, decl, result);
|
||||
|
||||
if (!prefixes || !prefixes.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.restoreBefore(decl);
|
||||
decl.raws.before = this.calcBefore(prefixes, decl);
|
||||
};
|
||||
|
||||
/**
|
||||
* Return list of prefixed properties to clean old prefixes
|
||||
*/
|
||||
|
||||
|
||||
Declaration.prototype.old = function old(prop, prefix) {
|
||||
return [this.prefixed(prop, prefix)];
|
||||
};
|
||||
|
||||
return Declaration;
|
||||
}(Prefixer);
|
||||
|
||||
module.exports = Declaration;
|
||||
86
build/node_modules/autoprefixer/lib/hacks/align-content.js
generated
vendored
Normal file
86
build/node_modules/autoprefixer/lib/hacks/align-content.js
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var AlignContent = function (_Declaration) {
|
||||
_inherits(AlignContent, _Declaration);
|
||||
|
||||
function AlignContent() {
|
||||
_classCallCheck(this, AlignContent);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for 2012 spec
|
||||
*/
|
||||
AlignContent.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec[0];
|
||||
prefix = _flexSpec[1];
|
||||
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-line-pack';
|
||||
} else {
|
||||
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
|
||||
|
||||
AlignContent.prototype.normalize = function normalize() {
|
||||
return 'align-content';
|
||||
};
|
||||
|
||||
/**
|
||||
* Change value for 2012 spec and ignore prefix for 2009
|
||||
*/
|
||||
|
||||
|
||||
AlignContent.prototype.set = function set(decl, prefix) {
|
||||
var spec = flexSpec(prefix)[0];
|
||||
if (spec === 2012) {
|
||||
decl.value = AlignContent.oldValues[decl.value] || decl.value;
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
} else if (spec === 'final') {
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
return AlignContent;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(AlignContent, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['align-content', 'flex-line-pack']
|
||||
});
|
||||
Object.defineProperty(AlignContent, 'oldValues', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start',
|
||||
'space-between': 'justify',
|
||||
'space-around': 'distribute'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = AlignContent;
|
||||
83
build/node_modules/autoprefixer/lib/hacks/align-items.js
generated
vendored
Normal file
83
build/node_modules/autoprefixer/lib/hacks/align-items.js
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var AlignItems = function (_Declaration) {
|
||||
_inherits(AlignItems, _Declaration);
|
||||
|
||||
function AlignItems() {
|
||||
_classCallCheck(this, AlignItems);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for 2009 and 2012 specs
|
||||
*/
|
||||
AlignItems.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec[0];
|
||||
prefix = _flexSpec[1];
|
||||
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-align';
|
||||
} else if (spec === 2012) {
|
||||
return prefix + 'flex-align';
|
||||
} else {
|
||||
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
|
||||
|
||||
AlignItems.prototype.normalize = function normalize() {
|
||||
return 'align-items';
|
||||
};
|
||||
|
||||
/**
|
||||
* Change value for 2009 and 2012 specs
|
||||
*/
|
||||
|
||||
|
||||
AlignItems.prototype.set = function set(decl, prefix) {
|
||||
var spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009 || spec === 2012) {
|
||||
decl.value = AlignItems.oldValues[decl.value] || decl.value;
|
||||
}
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return AlignItems;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(AlignItems, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['align-items', 'flex-align', 'box-align']
|
||||
});
|
||||
Object.defineProperty(AlignItems, 'oldValues', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = AlignItems;
|
||||
84
build/node_modules/autoprefixer/lib/hacks/align-self.js
generated
vendored
Normal file
84
build/node_modules/autoprefixer/lib/hacks/align-self.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var AlignSelf = function (_Declaration) {
|
||||
_inherits(AlignSelf, _Declaration);
|
||||
|
||||
function AlignSelf() {
|
||||
_classCallCheck(this, AlignSelf);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for 2012 specs
|
||||
*/
|
||||
AlignSelf.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec[0];
|
||||
prefix = _flexSpec[1];
|
||||
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-item-align';
|
||||
} else {
|
||||
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
|
||||
|
||||
AlignSelf.prototype.normalize = function normalize() {
|
||||
return 'align-self';
|
||||
};
|
||||
|
||||
/**
|
||||
* Change value for 2012 spec and ignore prefix for 2009
|
||||
*/
|
||||
|
||||
|
||||
AlignSelf.prototype.set = function set(decl, prefix) {
|
||||
var spec = flexSpec(prefix)[0];
|
||||
if (spec === 2012) {
|
||||
decl.value = AlignSelf.oldValues[decl.value] || decl.value;
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
} else if (spec === 'final') {
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
return AlignSelf;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(AlignSelf, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['align-self', 'flex-item-align']
|
||||
});
|
||||
Object.defineProperty(AlignSelf, 'oldValues', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = AlignSelf;
|
||||
42
build/node_modules/autoprefixer/lib/hacks/animation.js
generated
vendored
Normal file
42
build/node_modules/autoprefixer/lib/hacks/animation.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var Animation = function (_Declaration) {
|
||||
_inherits(Animation, _Declaration);
|
||||
|
||||
function Animation() {
|
||||
_classCallCheck(this, Animation);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Don’t add prefixes for modern values.
|
||||
*/
|
||||
Animation.prototype.check = function check(decl) {
|
||||
return !decl.value.split(/\s+/).some(function (i) {
|
||||
var lower = i.toLowerCase();
|
||||
return lower === 'reverse' || lower === 'alternate-reverse';
|
||||
});
|
||||
};
|
||||
|
||||
return Animation;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(Animation, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['animation', 'animation-direction']
|
||||
});
|
||||
|
||||
|
||||
module.exports = Animation;
|
||||
44
build/node_modules/autoprefixer/lib/hacks/appearance.js
generated
vendored
Normal file
44
build/node_modules/autoprefixer/lib/hacks/appearance.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
var utils = require('../utils');
|
||||
|
||||
var Appearance = function (_Declaration) {
|
||||
_inherits(Appearance, _Declaration);
|
||||
|
||||
function Appearance(name, prefixes, all) {
|
||||
_classCallCheck(this, Appearance);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, _Declaration.call(this, name, prefixes, all));
|
||||
|
||||
if (_this.prefixes) {
|
||||
_this.prefixes = utils.uniq(_this.prefixes.map(function (i) {
|
||||
if (i === '-ms-') {
|
||||
return '-webkit-';
|
||||
} else {
|
||||
return i;
|
||||
}
|
||||
}));
|
||||
}
|
||||
return _this;
|
||||
}
|
||||
|
||||
return Appearance;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(Appearance, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['appearance']
|
||||
});
|
||||
|
||||
|
||||
module.exports = Appearance;
|
||||
43
build/node_modules/autoprefixer/lib/hacks/background-size.js
generated
vendored
Normal file
43
build/node_modules/autoprefixer/lib/hacks/background-size.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var BackgroundSize = function (_Declaration) {
|
||||
_inherits(BackgroundSize, _Declaration);
|
||||
|
||||
function BackgroundSize() {
|
||||
_classCallCheck(this, BackgroundSize);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Duplication parameter for -webkit- browsers
|
||||
*/
|
||||
BackgroundSize.prototype.set = function set(decl, prefix) {
|
||||
var value = decl.value.toLowerCase();
|
||||
if (prefix === '-webkit-' && value.indexOf(' ') === -1 && value !== 'contain' && value !== 'cover') {
|
||||
decl.value = decl.value + ' ' + decl.value;
|
||||
}
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return BackgroundSize;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(BackgroundSize, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['background-size']
|
||||
});
|
||||
|
||||
|
||||
module.exports = BackgroundSize;
|
||||
52
build/node_modules/autoprefixer/lib/hacks/block-logical.js
generated
vendored
Normal file
52
build/node_modules/autoprefixer/lib/hacks/block-logical.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var BlockLogical = function (_Declaration) {
|
||||
_inherits(BlockLogical, _Declaration);
|
||||
|
||||
function BlockLogical() {
|
||||
_classCallCheck(this, BlockLogical);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Use old syntax for -moz- and -webkit-
|
||||
*/
|
||||
BlockLogical.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
return prefix + (prop.indexOf('-start') !== -1 ? prop.replace('-block-start', '-before') : prop.replace('-block-end', '-after'));
|
||||
};
|
||||
|
||||
/**
|
||||
* Return property name by spec
|
||||
*/
|
||||
|
||||
|
||||
BlockLogical.prototype.normalize = function normalize(prop) {
|
||||
if (prop.indexOf('-before') !== -1) {
|
||||
return prop.replace('-before', '-block-start');
|
||||
} else {
|
||||
return prop.replace('-after', '-block-end');
|
||||
}
|
||||
};
|
||||
|
||||
return BlockLogical;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(BlockLogical, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['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']
|
||||
});
|
||||
|
||||
|
||||
module.exports = BlockLogical;
|
||||
40
build/node_modules/autoprefixer/lib/hacks/border-image.js
generated
vendored
Normal file
40
build/node_modules/autoprefixer/lib/hacks/border-image.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var BorderImage = function (_Declaration) {
|
||||
_inherits(BorderImage, _Declaration);
|
||||
|
||||
function BorderImage() {
|
||||
_classCallCheck(this, BorderImage);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove fill parameter for prefixed declarations
|
||||
*/
|
||||
BorderImage.prototype.set = function set(decl, prefix) {
|
||||
decl.value = decl.value.replace(/\s+fill(\s)/, '$1');
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return BorderImage;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(BorderImage, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['border-image']
|
||||
});
|
||||
|
||||
|
||||
module.exports = BorderImage;
|
||||
79
build/node_modules/autoprefixer/lib/hacks/border-radius.js
generated
vendored
Normal file
79
build/node_modules/autoprefixer/lib/hacks/border-radius.js
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var BorderRadius = function (_Declaration) {
|
||||
_inherits(BorderRadius, _Declaration);
|
||||
|
||||
function BorderRadius() {
|
||||
_classCallCheck(this, BorderRadius);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Change syntax, when add Mozilla prefix
|
||||
*/
|
||||
BorderRadius.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
if (prefix === '-moz-') {
|
||||
return prefix + (BorderRadius.toMozilla[prop] || prop);
|
||||
} else {
|
||||
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Return unprefixed version of property
|
||||
*/
|
||||
|
||||
|
||||
BorderRadius.prototype.normalize = function normalize(prop) {
|
||||
return BorderRadius.toNormal[prop] || prop;
|
||||
};
|
||||
|
||||
return BorderRadius;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(BorderRadius, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['border-radius']
|
||||
});
|
||||
Object.defineProperty(BorderRadius, 'toMozilla', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: {}
|
||||
});
|
||||
Object.defineProperty(BorderRadius, 'toNormal', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: {}
|
||||
});
|
||||
var _arr = ['top', 'bottom'];
|
||||
|
||||
|
||||
for (var _i = 0; _i < _arr.length; _i++) {
|
||||
var ver = _arr[_i];var _arr2 = ['left', 'right'];
|
||||
|
||||
for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
|
||||
var hor = _arr2[_i2];
|
||||
var normal = 'border-' + ver + '-' + hor + '-radius';
|
||||
var mozilla = 'border-radius-' + ver + hor;
|
||||
|
||||
BorderRadius.names.push(normal);
|
||||
BorderRadius.names.push(mozilla);
|
||||
|
||||
BorderRadius.toMozilla[normal] = mozilla;
|
||||
BorderRadius.toNormal[mozilla] = normal;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = BorderRadius;
|
||||
87
build/node_modules/autoprefixer/lib/hacks/break-props.js
generated
vendored
Normal file
87
build/node_modules/autoprefixer/lib/hacks/break-props.js
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var BreakProps = function (_Declaration) {
|
||||
_inherits(BreakProps, _Declaration);
|
||||
|
||||
function BreakProps() {
|
||||
_classCallCheck(this, BreakProps);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Change name for -webkit- and -moz- prefix
|
||||
*/
|
||||
BreakProps.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
if (prefix === '-moz-') {
|
||||
return 'page-' + prop;
|
||||
} else {
|
||||
return prefix + 'column-' + prop;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
|
||||
|
||||
BreakProps.prototype.normalize = function normalize(prop) {
|
||||
if (prop.indexOf('inside') !== -1) {
|
||||
return 'break-inside';
|
||||
} else if (prop.indexOf('before') !== -1) {
|
||||
return 'break-before';
|
||||
} else {
|
||||
return 'break-after';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Change prefixed value for avoid-column and avoid-page
|
||||
*/
|
||||
|
||||
|
||||
BreakProps.prototype.set = function set(decl, prefix) {
|
||||
if (decl.prop === 'break-inside' && decl.value === 'avoid-column' || decl.value === 'avoid-page') {
|
||||
decl.value = 'avoid';
|
||||
}
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
/**
|
||||
* Don’t prefix some values
|
||||
*/
|
||||
|
||||
|
||||
BreakProps.prototype.insert = function insert(decl, prefix, prefixes) {
|
||||
if (decl.prop !== 'break-inside') {
|
||||
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
} else if (decl.value === 'avoid-region') {
|
||||
return undefined;
|
||||
} else if (decl.value === 'avoid-page' && prefix === '-webkit-') {
|
||||
return undefined;
|
||||
} else {
|
||||
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
}
|
||||
};
|
||||
|
||||
return BreakProps;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(BreakProps, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['break-inside', 'page-break-inside', 'column-break-inside', 'break-before', 'page-break-before', 'column-break-before', 'break-after', 'page-break-after', 'column-break-after']
|
||||
});
|
||||
|
||||
|
||||
module.exports = BreakProps;
|
||||
58
build/node_modules/autoprefixer/lib/hacks/cross-fade.js
generated
vendored
Normal file
58
build/node_modules/autoprefixer/lib/hacks/cross-fade.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Value = require('../value');
|
||||
var list = require('postcss/lib/list');
|
||||
|
||||
var CrossFade = function (_Value) {
|
||||
_inherits(CrossFade, _Value);
|
||||
|
||||
function CrossFade() {
|
||||
_classCallCheck(this, CrossFade);
|
||||
|
||||
return _possibleConstructorReturn(this, _Value.apply(this, arguments));
|
||||
}
|
||||
|
||||
CrossFade.prototype.replace = function replace(string, prefix) {
|
||||
var _this2 = this;
|
||||
|
||||
return list.space(string).map(function (value) {
|
||||
if (value.slice(0, +_this2.name.length + 1) !== _this2.name + '(') {
|
||||
return value;
|
||||
}
|
||||
|
||||
var close = value.lastIndexOf(')');
|
||||
var after = value.slice(close + 1);
|
||||
var args = value.slice(_this2.name.length + 1, close);
|
||||
|
||||
if (prefix === '-webkit-') {
|
||||
var match = args.match(/\d*.?\d+%?/);
|
||||
if (match) {
|
||||
args = args.slice(match[0].length).trim();
|
||||
args += ', ' + match[0];
|
||||
} else {
|
||||
args += ', 0.5';
|
||||
}
|
||||
}
|
||||
return prefix + _this2.name + '(' + args + ')' + after;
|
||||
}).join(' ');
|
||||
};
|
||||
|
||||
return CrossFade;
|
||||
}(Value);
|
||||
|
||||
Object.defineProperty(CrossFade, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['cross-fade']
|
||||
});
|
||||
|
||||
|
||||
module.exports = CrossFade;
|
||||
102
build/node_modules/autoprefixer/lib/hacks/display-flex.js
generated
vendored
Normal file
102
build/node_modules/autoprefixer/lib/hacks/display-flex.js
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var OldValue = require('../old-value');
|
||||
var Value = require('../value');
|
||||
|
||||
var DisplayFlex = function (_Value) {
|
||||
_inherits(DisplayFlex, _Value);
|
||||
|
||||
function DisplayFlex(name, prefixes) {
|
||||
_classCallCheck(this, DisplayFlex);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, _Value.call(this, name, prefixes));
|
||||
|
||||
if (name === 'display-flex') {
|
||||
_this.name = 'flex';
|
||||
}
|
||||
return _this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Faster check for flex value
|
||||
*/
|
||||
|
||||
|
||||
DisplayFlex.prototype.check = function check(decl) {
|
||||
return decl.prop === 'display' && decl.value === this.name;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return value by spec
|
||||
*/
|
||||
|
||||
|
||||
DisplayFlex.prototype.prefixed = function prefixed(prefix) {
|
||||
var spec = void 0,
|
||||
value = void 0;
|
||||
|
||||
var _flexSpec = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec[0];
|
||||
prefix = _flexSpec[1];
|
||||
|
||||
|
||||
if (spec === 2009) {
|
||||
if (this.name === 'flex') {
|
||||
value = 'box';
|
||||
} else {
|
||||
value = 'inline-box';
|
||||
}
|
||||
} else if (spec === 2012) {
|
||||
if (this.name === 'flex') {
|
||||
value = 'flexbox';
|
||||
} else {
|
||||
value = 'inline-flexbox';
|
||||
}
|
||||
} else if (spec === 'final') {
|
||||
value = this.name;
|
||||
}
|
||||
|
||||
return prefix + value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add prefix to value depend on flebox spec version
|
||||
*/
|
||||
|
||||
|
||||
DisplayFlex.prototype.replace = function replace(string, prefix) {
|
||||
return this.prefixed(prefix);
|
||||
};
|
||||
|
||||
/**
|
||||
* Change value for old specs
|
||||
*/
|
||||
|
||||
|
||||
DisplayFlex.prototype.old = function old(prefix) {
|
||||
var prefixed = this.prefixed(prefix);
|
||||
if (!prefixed) return undefined;
|
||||
return new OldValue(this.name, prefixed);
|
||||
};
|
||||
|
||||
return DisplayFlex;
|
||||
}(Value);
|
||||
|
||||
Object.defineProperty(DisplayFlex, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['display-flex', 'inline-flex']
|
||||
});
|
||||
|
||||
|
||||
module.exports = DisplayFlex;
|
||||
46
build/node_modules/autoprefixer/lib/hacks/display-grid.js
generated
vendored
Normal file
46
build/node_modules/autoprefixer/lib/hacks/display-grid.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Value = require('../value');
|
||||
|
||||
var DisplayGrid = function (_Value) {
|
||||
_inherits(DisplayGrid, _Value);
|
||||
|
||||
function DisplayGrid(name, prefixes) {
|
||||
_classCallCheck(this, DisplayGrid);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, _Value.call(this, name, prefixes));
|
||||
|
||||
if (name === 'display-grid') {
|
||||
_this.name = 'grid';
|
||||
}
|
||||
return _this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Faster check for flex value
|
||||
*/
|
||||
|
||||
|
||||
DisplayGrid.prototype.check = function check(decl) {
|
||||
return decl.prop === 'display' && decl.value === this.name;
|
||||
};
|
||||
|
||||
return DisplayGrid;
|
||||
}(Value);
|
||||
|
||||
Object.defineProperty(DisplayGrid, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['display-grid', 'inline-grid']
|
||||
});
|
||||
|
||||
|
||||
module.exports = DisplayGrid;
|
||||
37
build/node_modules/autoprefixer/lib/hacks/filter-value.js
generated
vendored
Normal file
37
build/node_modules/autoprefixer/lib/hacks/filter-value.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Value = require('../value');
|
||||
|
||||
var FilterValue = function (_Value) {
|
||||
_inherits(FilterValue, _Value);
|
||||
|
||||
function FilterValue(name, prefixes) {
|
||||
_classCallCheck(this, FilterValue);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, _Value.call(this, name, prefixes));
|
||||
|
||||
if (name === 'filter-function') {
|
||||
_this.name = 'filter';
|
||||
}
|
||||
return _this;
|
||||
}
|
||||
|
||||
return FilterValue;
|
||||
}(Value);
|
||||
|
||||
Object.defineProperty(FilterValue, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['filter', 'filter-function']
|
||||
});
|
||||
|
||||
|
||||
module.exports = FilterValue;
|
||||
40
build/node_modules/autoprefixer/lib/hacks/filter.js
generated
vendored
Normal file
40
build/node_modules/autoprefixer/lib/hacks/filter.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var Filter = function (_Declaration) {
|
||||
_inherits(Filter, _Declaration);
|
||||
|
||||
function Filter() {
|
||||
_classCallCheck(this, Filter);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check is it Internet Explorer filter
|
||||
*/
|
||||
Filter.prototype.check = function check(decl) {
|
||||
var v = decl.value;
|
||||
return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1 && v.indexOf('data:image/svg+xml') === -1;
|
||||
};
|
||||
|
||||
return Filter;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(Filter, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['filter']
|
||||
});
|
||||
|
||||
|
||||
module.exports = Filter;
|
||||
79
build/node_modules/autoprefixer/lib/hacks/flex-basis.js
generated
vendored
Normal file
79
build/node_modules/autoprefixer/lib/hacks/flex-basis.js
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var FlexBasis = function (_Declaration) {
|
||||
_inherits(FlexBasis, _Declaration);
|
||||
|
||||
function FlexBasis() {
|
||||
_classCallCheck(this, FlexBasis);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
FlexBasis.prototype.normalize = function normalize() {
|
||||
return 'flex-basis';
|
||||
};
|
||||
|
||||
/**
|
||||
* Return flex property for 2012 spec
|
||||
*/
|
||||
|
||||
|
||||
FlexBasis.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec[0];
|
||||
prefix = _flexSpec[1];
|
||||
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-preferred-size';
|
||||
} else {
|
||||
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Ignore 2009 spec and use flex property for 2012
|
||||
*/
|
||||
|
||||
|
||||
FlexBasis.prototype.set = function set(decl, prefix) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec2 = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec2[0];
|
||||
prefix = _flexSpec2[1];
|
||||
|
||||
if (spec === 2012 || spec === 'final') {
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
return FlexBasis;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(FlexBasis, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['flex-basis', 'flex-preferred-size']
|
||||
});
|
||||
|
||||
|
||||
module.exports = FlexBasis;
|
||||
112
build/node_modules/autoprefixer/lib/hacks/flex-direction.js
generated
vendored
Normal file
112
build/node_modules/autoprefixer/lib/hacks/flex-direction.js
generated
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var FlexDirection = function (_Declaration) {
|
||||
_inherits(FlexDirection, _Declaration);
|
||||
|
||||
function FlexDirection() {
|
||||
_classCallCheck(this, FlexDirection);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
FlexDirection.prototype.normalize = function normalize() {
|
||||
return 'flex-direction';
|
||||
};
|
||||
|
||||
/**
|
||||
* Use two properties for 2009 spec
|
||||
*/
|
||||
|
||||
|
||||
FlexDirection.prototype.insert = function insert(decl, prefix, prefixes) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec[0];
|
||||
prefix = _flexSpec[1];
|
||||
|
||||
if (spec !== 2009) {
|
||||
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
} else {
|
||||
var already = decl.parent.some(function (i) {
|
||||
return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
|
||||
});
|
||||
if (already) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var v = decl.value;
|
||||
var orient = void 0,
|
||||
dir = void 0;
|
||||
if (v === 'inherit' || v === 'initial' || v === 'unset') {
|
||||
orient = v;
|
||||
dir = v;
|
||||
} else {
|
||||
orient = v.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
|
||||
dir = v.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
|
||||
}
|
||||
|
||||
var 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);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Clean two properties for 2009 spec
|
||||
*/
|
||||
|
||||
|
||||
FlexDirection.prototype.old = function old(prop, prefix) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec2 = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec2[0];
|
||||
prefix = _flexSpec2[1];
|
||||
|
||||
if (spec === 2009) {
|
||||
return [prefix + 'box-orient', prefix + 'box-direction'];
|
||||
} else {
|
||||
return _Declaration.prototype.old.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexDirection;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(FlexDirection, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['flex-direction', 'box-direction', 'box-orient']
|
||||
});
|
||||
|
||||
|
||||
module.exports = FlexDirection;
|
||||
83
build/node_modules/autoprefixer/lib/hacks/flex-flow.js
generated
vendored
Normal file
83
build/node_modules/autoprefixer/lib/hacks/flex-flow.js
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var FlexFlow = function (_Declaration) {
|
||||
_inherits(FlexFlow, _Declaration);
|
||||
|
||||
function FlexFlow() {
|
||||
_classCallCheck(this, FlexFlow);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Use two properties for 2009 spec
|
||||
*/
|
||||
FlexFlow.prototype.insert = function insert(decl, prefix, prefixes) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec[0];
|
||||
prefix = _flexSpec[1];
|
||||
|
||||
if (spec !== 2009) {
|
||||
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
} else {
|
||||
var values = decl.value.split(/\s+/).filter(function (i) {
|
||||
return i !== 'wrap' && i !== 'nowrap' && 'wrap-reverse';
|
||||
});
|
||||
if (values.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var already = decl.parent.some(function (i) {
|
||||
return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
|
||||
});
|
||||
if (already) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var value = values[0];
|
||||
var orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
|
||||
var dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
|
||||
|
||||
var 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);
|
||||
|
||||
Object.defineProperty(FlexFlow, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['flex-flow', 'box-direction', 'box-orient']
|
||||
});
|
||||
|
||||
|
||||
module.exports = FlexFlow;
|
||||
62
build/node_modules/autoprefixer/lib/hacks/flex-grow.js
generated
vendored
Normal file
62
build/node_modules/autoprefixer/lib/hacks/flex-grow.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var Flex = function (_Declaration) {
|
||||
_inherits(Flex, _Declaration);
|
||||
|
||||
function Flex() {
|
||||
_classCallCheck(this, Flex);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
Flex.prototype.normalize = function normalize() {
|
||||
return 'flex';
|
||||
};
|
||||
|
||||
/**
|
||||
* Return flex property for 2009 and 2012 specs
|
||||
*/
|
||||
|
||||
|
||||
Flex.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec[0];
|
||||
prefix = _flexSpec[1];
|
||||
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-flex';
|
||||
} else if (spec === 2012) {
|
||||
return prefix + 'flex-positive';
|
||||
} else {
|
||||
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
return Flex;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(Flex, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['flex-grow', 'flex-positive']
|
||||
});
|
||||
|
||||
|
||||
module.exports = Flex;
|
||||
79
build/node_modules/autoprefixer/lib/hacks/flex-shrink.js
generated
vendored
Normal file
79
build/node_modules/autoprefixer/lib/hacks/flex-shrink.js
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var FlexShrink = function (_Declaration) {
|
||||
_inherits(FlexShrink, _Declaration);
|
||||
|
||||
function FlexShrink() {
|
||||
_classCallCheck(this, FlexShrink);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
FlexShrink.prototype.normalize = function normalize() {
|
||||
return 'flex-shrink';
|
||||
};
|
||||
|
||||
/**
|
||||
* Return flex property for 2012 spec
|
||||
*/
|
||||
|
||||
|
||||
FlexShrink.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec[0];
|
||||
prefix = _flexSpec[1];
|
||||
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-negative';
|
||||
} else {
|
||||
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Ignore 2009 spec and use flex property for 2012
|
||||
*/
|
||||
|
||||
|
||||
FlexShrink.prototype.set = function set(decl, prefix) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec2 = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec2[0];
|
||||
prefix = _flexSpec2[1];
|
||||
|
||||
if (spec === 2012 || spec === 'final') {
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
return FlexShrink;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(FlexShrink, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['flex-shrink', 'flex-negative']
|
||||
});
|
||||
|
||||
|
||||
module.exports = FlexShrink;
|
||||
21
build/node_modules/autoprefixer/lib/hacks/flex-spec.js
generated
vendored
Normal file
21
build/node_modules/autoprefixer/lib/hacks/flex-spec.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Return flexbox spec versions by prefix
|
||||
*/
|
||||
module.exports = function (prefix) {
|
||||
var spec = void 0;
|
||||
if (prefix === '-webkit- 2009' || prefix === '-moz-') {
|
||||
spec = 2009;
|
||||
} else if (prefix === '-ms-') {
|
||||
spec = 2012;
|
||||
} else if (prefix === '-webkit-') {
|
||||
spec = 'final';
|
||||
}
|
||||
|
||||
if (prefix === '-webkit- 2009') {
|
||||
prefix = '-webkit-';
|
||||
}
|
||||
|
||||
return [spec, prefix];
|
||||
};
|
||||
44
build/node_modules/autoprefixer/lib/hacks/flex-wrap.js
generated
vendored
Normal file
44
build/node_modules/autoprefixer/lib/hacks/flex-wrap.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var FlexWrap = function (_Declaration) {
|
||||
_inherits(FlexWrap, _Declaration);
|
||||
|
||||
function FlexWrap() {
|
||||
_classCallCheck(this, FlexWrap);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't add prefix for 2009 spec
|
||||
*/
|
||||
FlexWrap.prototype.set = function set(decl, prefix) {
|
||||
var spec = flexSpec(prefix)[0];
|
||||
if (spec !== 2009) {
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
return FlexWrap;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(FlexWrap, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['flex-wrap']
|
||||
});
|
||||
|
||||
|
||||
module.exports = FlexWrap;
|
||||
91
build/node_modules/autoprefixer/lib/hacks/flex.js
generated
vendored
Normal file
91
build/node_modules/autoprefixer/lib/hacks/flex.js
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var list = require('postcss/lib/list');
|
||||
|
||||
var Flex = function (_Declaration) {
|
||||
_inherits(Flex, _Declaration);
|
||||
|
||||
function Flex() {
|
||||
_classCallCheck(this, Flex);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for 2009 spec
|
||||
*/
|
||||
Flex.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec[0];
|
||||
prefix = _flexSpec[1];
|
||||
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-flex';
|
||||
} else {
|
||||
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
|
||||
|
||||
Flex.prototype.normalize = function normalize() {
|
||||
return 'flex';
|
||||
};
|
||||
|
||||
/**
|
||||
* Spec 2009 supports only first argument
|
||||
* Spec 2012 disallows unitless basis
|
||||
*/
|
||||
|
||||
|
||||
Flex.prototype.set = function set(decl, prefix) {
|
||||
var spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009) {
|
||||
decl.value = list.space(decl.value)[0];
|
||||
decl.value = Flex.oldValues[decl.value] || decl.value;
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
} else if (spec === 2012) {
|
||||
var components = list.space(decl.value);
|
||||
if (components.length === 3 && components[2] === '0') {
|
||||
decl.value = components.slice(0, 2).concat('0px').join(' ');
|
||||
}
|
||||
}
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return Flex;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(Flex, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['flex', 'box-flex']
|
||||
});
|
||||
Object.defineProperty(Flex, 'oldValues', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: {
|
||||
auto: '1',
|
||||
none: '0'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = Flex;
|
||||
45
build/node_modules/autoprefixer/lib/hacks/fullscreen.js
generated
vendored
Normal file
45
build/node_modules/autoprefixer/lib/hacks/fullscreen.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Selector = require('../selector');
|
||||
|
||||
var Fullscreen = function (_Selector) {
|
||||
_inherits(Fullscreen, _Selector);
|
||||
|
||||
function Fullscreen() {
|
||||
_classCallCheck(this, Fullscreen);
|
||||
|
||||
return _possibleConstructorReturn(this, _Selector.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return different selectors depend on prefix
|
||||
*/
|
||||
Fullscreen.prototype.prefixed = function prefixed(prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return ':-webkit-full-screen';
|
||||
} else if (prefix === '-moz-') {
|
||||
return ':-moz-full-screen';
|
||||
} else {
|
||||
return ':' + prefix + 'fullscreen';
|
||||
}
|
||||
};
|
||||
|
||||
return Fullscreen;
|
||||
}(Selector);
|
||||
|
||||
Object.defineProperty(Fullscreen, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: [':fullscreen']
|
||||
});
|
||||
|
||||
|
||||
module.exports = Fullscreen;
|
||||
525
build/node_modules/autoprefixer/lib/hacks/gradient.js
generated
vendored
Normal file
525
build/node_modules/autoprefixer/lib/hacks/gradient.js
generated
vendored
Normal file
@@ -0,0 +1,525 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var OldValue = require('../old-value');
|
||||
var Value = require('../value');
|
||||
var utils = require('../utils');
|
||||
|
||||
var parser = require('postcss-value-parser');
|
||||
var range = require('normalize-range');
|
||||
|
||||
var isDirection = /top|left|right|bottom/gi;
|
||||
|
||||
var Gradient = function (_Value) {
|
||||
_inherits(Gradient, _Value);
|
||||
|
||||
function Gradient() {
|
||||
var _temp, _this, _ret;
|
||||
|
||||
_classCallCheck(this, Gradient);
|
||||
|
||||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Value.call.apply(_Value, [this].concat(args))), _this), Object.defineProperty(_this, 'directions', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: {
|
||||
top: 'bottom',
|
||||
left: 'right',
|
||||
bottom: 'top',
|
||||
right: 'left'
|
||||
}
|
||||
}), Object.defineProperty(_this, 'oldDirections', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: {
|
||||
'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'
|
||||
}
|
||||
}), _temp), _possibleConstructorReturn(_this, _ret);
|
||||
}
|
||||
|
||||
// Direction to replace
|
||||
|
||||
|
||||
// Direction to replace
|
||||
|
||||
|
||||
/**
|
||||
* Change degrees for webkit prefix
|
||||
*/
|
||||
Gradient.prototype.replace = function replace(string, prefix) {
|
||||
var ast = parser(string);
|
||||
for (var _iterator = ast.nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var node = _ref;
|
||||
|
||||
if (node.type === 'function' && node.value === this.name) {
|
||||
node.nodes = this.newDirection(node.nodes);
|
||||
node.nodes = this.normalize(node.nodes);
|
||||
if (prefix === '-webkit- old') {
|
||||
var changes = this.oldWebkit(node);
|
||||
if (!changes) {
|
||||
return undefined;
|
||||
}
|
||||
} else {
|
||||
node.nodes = this.convertDirection(node.nodes);
|
||||
node.value = prefix + node.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ast.toString();
|
||||
};
|
||||
|
||||
/**
|
||||
* Replace first token
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.replaceFirst = function replaceFirst(params) {
|
||||
for (var _len2 = arguments.length, words = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
||||
words[_key2 - 1] = arguments[_key2];
|
||||
}
|
||||
|
||||
var prefix = words.map(function (i) {
|
||||
if (i === ' ') {
|
||||
return { type: 'space', value: i };
|
||||
} else {
|
||||
return { type: 'word', value: i };
|
||||
}
|
||||
});
|
||||
return prefix.concat(params.slice(1));
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert angle unit to deg
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.normalizeUnit = function normalizeUnit(str, full) {
|
||||
var num = parseFloat(str);
|
||||
var deg = num / full * 360;
|
||||
return deg + 'deg';
|
||||
};
|
||||
|
||||
/**
|
||||
* Normalize angle
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.normalize = function normalize(nodes) {
|
||||
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) {
|
||||
var 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;
|
||||
};
|
||||
|
||||
/**
|
||||
* Replace old direction to new
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.newDirection = function newDirection(params) {
|
||||
if (params[0].value === 'to') {
|
||||
return params;
|
||||
}
|
||||
isDirection.lastIndex = 0; // reset search index of global regexp
|
||||
if (!isDirection.test(params[0].value)) {
|
||||
return params;
|
||||
}
|
||||
|
||||
params.unshift({
|
||||
type: 'word',
|
||||
value: 'to'
|
||||
}, {
|
||||
type: 'space',
|
||||
value: ' '
|
||||
});
|
||||
|
||||
for (var i = 2; i < params.length; i++) {
|
||||
if (params[i].type === 'div') {
|
||||
break;
|
||||
}
|
||||
if (params[i].type === 'word') {
|
||||
params[i].value = this.revertDirection(params[i].value);
|
||||
}
|
||||
}
|
||||
|
||||
return params;
|
||||
};
|
||||
|
||||
/**
|
||||
* Change new direction to old
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.convertDirection = function convertDirection(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] && params[2].value === 'at') {
|
||||
this.fixRadial(params);
|
||||
}
|
||||
}
|
||||
return params;
|
||||
};
|
||||
|
||||
/**
|
||||
* Replace `to top left` to `bottom right`
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.fixDirection = function fixDirection(params) {
|
||||
params.splice(0, 2);
|
||||
|
||||
for (var _iterator2 = params, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var param = _ref2;
|
||||
|
||||
if (param.type === 'div') {
|
||||
break;
|
||||
}
|
||||
if (param.type === 'word') {
|
||||
param.value = this.revertDirection(param.value);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Add 90 degrees
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.fixAngle = function fixAngle(params) {
|
||||
var first = params[0].value;
|
||||
first = parseFloat(first);
|
||||
first = Math.abs(450 - first) % 360;
|
||||
first = this.roundFloat(first, 3);
|
||||
params[0].value = first + 'deg';
|
||||
};
|
||||
|
||||
/**
|
||||
* Fix radial direction syntax
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.fixRadial = function fixRadial(params) {
|
||||
var first = params[0];
|
||||
var second = [];
|
||||
var i = void 0;
|
||||
|
||||
var div = void 0;
|
||||
for (i = 4; i < params.length; i++) {
|
||||
if (params[i].type === 'div') {
|
||||
div = params[i];
|
||||
break;
|
||||
} else {
|
||||
second.push(params[i]);
|
||||
}
|
||||
}
|
||||
|
||||
params.splice.apply(params, [0, i].concat(second, [div, first]));
|
||||
};
|
||||
|
||||
Gradient.prototype.revertDirection = function revertDirection(word) {
|
||||
return this.directions[word.toLowerCase()] || word;
|
||||
};
|
||||
|
||||
/**
|
||||
* Round float and save digits under dot
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.roundFloat = function roundFloat(float, digits) {
|
||||
return parseFloat(float.toFixed(digits));
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert to old webkit syntax
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.oldWebkit = function oldWebkit(node) {
|
||||
var nodes = node.nodes;
|
||||
|
||||
var 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 || string.indexOf('-corner') !== -1 || string.indexOf('-side') !== -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var params = [[]];
|
||||
for (var _iterator3 = nodes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
|
||||
var _ref3;
|
||||
|
||||
if (_isArray3) {
|
||||
if (_i3 >= _iterator3.length) break;
|
||||
_ref3 = _iterator3[_i3++];
|
||||
} else {
|
||||
_i3 = _iterator3.next();
|
||||
if (_i3.done) break;
|
||||
_ref3 = _i3.value;
|
||||
}
|
||||
|
||||
var i = _ref3;
|
||||
|
||||
params[params.length - 1].push(i);
|
||||
if (i.type === 'div' && i.value === ',') {
|
||||
params.push([]);
|
||||
}
|
||||
}
|
||||
|
||||
this.oldDirection(params);
|
||||
this.colorStops(params);
|
||||
|
||||
node.nodes = [];
|
||||
for (var _iterator4 = params, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
|
||||
var _ref4;
|
||||
|
||||
if (_isArray4) {
|
||||
if (_i4 >= _iterator4.length) break;
|
||||
_ref4 = _iterator4[_i4++];
|
||||
} else {
|
||||
_i4 = _iterator4.next();
|
||||
if (_i4.done) break;
|
||||
_ref4 = _i4.value;
|
||||
}
|
||||
|
||||
var param = _ref4;
|
||||
|
||||
node.nodes = node.nodes.concat(param);
|
||||
}
|
||||
|
||||
node.nodes.unshift({ type: 'word', value: 'linear' }, this.cloneDiv(node.nodes));
|
||||
node.value = '-webkit-gradient';
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Change direction syntax to old webkit
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.oldDirection = function oldDirection(params) {
|
||||
var div = this.cloneDiv(params[0]);
|
||||
|
||||
if (params[0][0].value !== 'to') {
|
||||
return params.unshift([{ type: 'word', value: this.oldDirections.bottom }, div]);
|
||||
} else {
|
||||
var _words = [];
|
||||
for (var _iterator5 = params[0].slice(2), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
|
||||
var _ref5;
|
||||
|
||||
if (_isArray5) {
|
||||
if (_i5 >= _iterator5.length) break;
|
||||
_ref5 = _iterator5[_i5++];
|
||||
} else {
|
||||
_i5 = _iterator5.next();
|
||||
if (_i5.done) break;
|
||||
_ref5 = _i5.value;
|
||||
}
|
||||
|
||||
var node = _ref5;
|
||||
|
||||
if (node.type === 'word') {
|
||||
_words.push(node.value.toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
_words = _words.join(' ');
|
||||
var old = this.oldDirections[_words] || _words;
|
||||
|
||||
params[0] = [{ type: 'word', value: old }, div];
|
||||
return params[0];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get div token from exists parameters
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.cloneDiv = function cloneDiv(params) {
|
||||
for (var _iterator6 = params, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
|
||||
var _ref6;
|
||||
|
||||
if (_isArray6) {
|
||||
if (_i6 >= _iterator6.length) break;
|
||||
_ref6 = _iterator6[_i6++];
|
||||
} else {
|
||||
_i6 = _iterator6.next();
|
||||
if (_i6.done) break;
|
||||
_ref6 = _i6.value;
|
||||
}
|
||||
|
||||
var i = _ref6;
|
||||
|
||||
if (i.type === 'div' && i.value === ',') {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return { type: 'div', value: ',', after: ' ' };
|
||||
};
|
||||
|
||||
/**
|
||||
* Change colors syntax to old webkit
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.colorStops = function colorStops(params) {
|
||||
var result = [];
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
var pos = void 0;
|
||||
var param = params[i];
|
||||
var item = void 0;
|
||||
if (i === 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var 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;
|
||||
}
|
||||
|
||||
var stop = void 0;
|
||||
if (i === 1 && (!pos || pos === '0%')) {
|
||||
stop = 'from(' + color + ')';
|
||||
} else if (i === params.length - 1 && (!pos || pos === '100%')) {
|
||||
stop = 'to(' + color + ')';
|
||||
} else if (pos) {
|
||||
stop = 'color-stop(' + pos + ', ' + color + ')';
|
||||
} else {
|
||||
stop = 'color-stop(' + color + ')';
|
||||
}
|
||||
|
||||
var div = param[param.length - 1];
|
||||
params[i] = [{ type: 'word', value: stop }];
|
||||
if (div.type === 'div' && div.value === ',') {
|
||||
item = params[i].push(div);
|
||||
}
|
||||
result.push(item);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove old WebKit gradient too
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.old = function old(prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
var type = this.name === 'linear-gradient' ? 'linear' : 'radial';
|
||||
var string = '-gradient';
|
||||
var regexp = utils.regexp('-webkit-(' + type + '-gradient|gradient\\(\\s*' + type + ')', false);
|
||||
|
||||
return new OldValue(this.name, prefix + this.name, string, regexp);
|
||||
} else {
|
||||
return _Value.prototype.old.call(this, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Do not add non-webkit prefixes for list-style and object
|
||||
*/
|
||||
|
||||
|
||||
Gradient.prototype.add = function add(decl, prefix) {
|
||||
var p = decl.prop;
|
||||
if (p.indexOf('mask') !== -1) {
|
||||
if (prefix === '-webkit-' || prefix === '-webkit- old') {
|
||||
return _Value.prototype.add.call(this, decl, prefix);
|
||||
}
|
||||
} else if (p === 'list-style' || p === 'list-style-image' || p === 'content') {
|
||||
if (prefix === '-webkit-' || prefix === '-webkit- old') {
|
||||
return _Value.prototype.add.call(this, decl, prefix);
|
||||
}
|
||||
} else {
|
||||
return _Value.prototype.add.call(this, decl, prefix);
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
return Gradient;
|
||||
}(Value);
|
||||
|
||||
Object.defineProperty(Gradient, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient']
|
||||
});
|
||||
|
||||
|
||||
module.exports = Gradient;
|
||||
86
build/node_modules/autoprefixer/lib/hacks/grid-area.js
generated
vendored
Normal file
86
build/node_modules/autoprefixer/lib/hacks/grid-area.js
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
var shorthand = require('./grid-shorthand');
|
||||
|
||||
var GridArea = function (_Declaration) {
|
||||
_inherits(GridArea, _Declaration);
|
||||
|
||||
function GridArea() {
|
||||
_classCallCheck(this, GridArea);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate grid-area to separate -ms- prefixed properties
|
||||
*/
|
||||
GridArea.prototype.insert = function insert(decl, prefix, prefixes) {
|
||||
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
|
||||
if (decl.parent.some(function (i) {
|
||||
return i.prop === '-ms-grid-row';
|
||||
})) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var values = shorthand.parse(decl);
|
||||
|
||||
var _shorthand$translate = shorthand.translate(values, 0, 2),
|
||||
rowStart = _shorthand$translate[0],
|
||||
rowSpan = _shorthand$translate[1];
|
||||
|
||||
var _shorthand$translate2 = shorthand.translate(values, 1, 3),
|
||||
columnStart = _shorthand$translate2[0],
|
||||
columnSpan = _shorthand$translate2[1];
|
||||
|
||||
if (rowStart) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-grid-row',
|
||||
value: rowStart.toString()
|
||||
});
|
||||
}
|
||||
|
||||
if (rowSpan) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-grid-row-span',
|
||||
value: rowSpan.toString()
|
||||
});
|
||||
}
|
||||
|
||||
if (columnStart) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-grid-column',
|
||||
value: columnStart.toString()
|
||||
});
|
||||
}
|
||||
|
||||
if (columnSpan) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-grid-column-span',
|
||||
value: columnSpan.toString()
|
||||
});
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
return GridArea;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(GridArea, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['grid-area']
|
||||
});
|
||||
|
||||
|
||||
module.exports = GridArea;
|
||||
57
build/node_modules/autoprefixer/lib/hacks/grid-column-align.js
generated
vendored
Normal file
57
build/node_modules/autoprefixer/lib/hacks/grid-column-align.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var GridColumnAlign = function (_Declaration) {
|
||||
_inherits(GridColumnAlign, _Declaration);
|
||||
|
||||
function GridColumnAlign() {
|
||||
_classCallCheck(this, GridColumnAlign);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not prefix flexbox values
|
||||
*/
|
||||
GridColumnAlign.prototype.check = function check(decl) {
|
||||
return decl.value.indexOf('flex-') === -1 && decl.value !== 'baseline';
|
||||
};
|
||||
|
||||
/**
|
||||
* Change property name for IE
|
||||
*/
|
||||
|
||||
|
||||
GridColumnAlign.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
return prefix + 'grid-column-align';
|
||||
};
|
||||
|
||||
/**
|
||||
* Change IE property back
|
||||
*/
|
||||
|
||||
|
||||
GridColumnAlign.prototype.normalize = function normalize() {
|
||||
return 'justify-self';
|
||||
};
|
||||
|
||||
return GridColumnAlign;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(GridColumnAlign, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['grid-column-align']
|
||||
});
|
||||
|
||||
|
||||
module.exports = GridColumnAlign;
|
||||
73
build/node_modules/autoprefixer/lib/hacks/grid-end.js
generated
vendored
Normal file
73
build/node_modules/autoprefixer/lib/hacks/grid-end.js
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var GridEnd = function (_Declaration) {
|
||||
_inherits(GridEnd, _Declaration);
|
||||
|
||||
function GridEnd() {
|
||||
_classCallCheck(this, GridEnd);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not add prefix for unsupported value in IE
|
||||
*/
|
||||
GridEnd.prototype.check = function check(decl) {
|
||||
return decl.value.indexOf('span') !== -1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return a final spec property
|
||||
*/
|
||||
|
||||
|
||||
GridEnd.prototype.normalize = function normalize(prop) {
|
||||
return prop.replace(/(-span|-end)/, '');
|
||||
};
|
||||
|
||||
/**
|
||||
* Change property name for IE
|
||||
*/
|
||||
|
||||
|
||||
GridEnd.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
var result = _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
if (prefix === '-ms-') {
|
||||
result = result.replace('-end', '-span');
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Change repeating syntax for IE
|
||||
*/
|
||||
|
||||
|
||||
GridEnd.prototype.set = function set(decl, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
decl.value = decl.value.replace(/span\s/i, '');
|
||||
}
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return GridEnd;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(GridEnd, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['grid-row-end', 'grid-column-end', 'grid-row-span', 'grid-column-span']
|
||||
});
|
||||
|
||||
|
||||
module.exports = GridEnd;
|
||||
57
build/node_modules/autoprefixer/lib/hacks/grid-row-align.js
generated
vendored
Normal file
57
build/node_modules/autoprefixer/lib/hacks/grid-row-align.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var GridRowAlign = function (_Declaration) {
|
||||
_inherits(GridRowAlign, _Declaration);
|
||||
|
||||
function GridRowAlign() {
|
||||
_classCallCheck(this, GridRowAlign);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not prefix flexbox values
|
||||
*/
|
||||
GridRowAlign.prototype.check = function check(decl) {
|
||||
return decl.value.indexOf('flex-') === -1 && decl.value !== 'baseline';
|
||||
};
|
||||
|
||||
/**
|
||||
* Change property name for IE
|
||||
*/
|
||||
|
||||
|
||||
GridRowAlign.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
return prefix + 'grid-row-align';
|
||||
};
|
||||
|
||||
/**
|
||||
* Change IE property back
|
||||
*/
|
||||
|
||||
|
||||
GridRowAlign.prototype.normalize = function normalize() {
|
||||
return 'align-self';
|
||||
};
|
||||
|
||||
return GridRowAlign;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(GridRowAlign, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['grid-row-align']
|
||||
});
|
||||
|
||||
|
||||
module.exports = GridRowAlign;
|
||||
62
build/node_modules/autoprefixer/lib/hacks/grid-row-column.js
generated
vendored
Normal file
62
build/node_modules/autoprefixer/lib/hacks/grid-row-column.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
var shorthand = require('./grid-shorthand');
|
||||
|
||||
var GridRowColumn = function (_Declaration) {
|
||||
_inherits(GridRowColumn, _Declaration);
|
||||
|
||||
function GridRowColumn() {
|
||||
_classCallCheck(this, GridRowColumn);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate grid-row / grid-column to separate -ms- prefixed properties
|
||||
*/
|
||||
GridRowColumn.prototype.insert = function insert(decl, prefix, prefixes) {
|
||||
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
|
||||
var values = shorthand.parse(decl);
|
||||
|
||||
var _shorthand$translate = shorthand.translate(values, 0, 1),
|
||||
start = _shorthand$translate[0],
|
||||
span = _shorthand$translate[1];
|
||||
|
||||
if (start) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-' + decl.prop,
|
||||
value: start.toString()
|
||||
});
|
||||
}
|
||||
|
||||
if (span) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-' + decl.prop + '-span',
|
||||
value: span.toString()
|
||||
});
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
return GridRowColumn;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(GridRowColumn, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['grid-row', 'grid-column']
|
||||
});
|
||||
|
||||
|
||||
module.exports = GridRowColumn;
|
||||
65
build/node_modules/autoprefixer/lib/hacks/grid-rows-columns.js
generated
vendored
Normal file
65
build/node_modules/autoprefixer/lib/hacks/grid-rows-columns.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
var shorthand = require('./grid-shorthand');
|
||||
|
||||
var GridRowsColumns = function (_Declaration) {
|
||||
_inherits(GridRowsColumns, _Declaration);
|
||||
|
||||
function GridRowsColumns() {
|
||||
_classCallCheck(this, GridRowsColumns);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for IE
|
||||
*/
|
||||
GridRowsColumns.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return prefix + prop.replace('template-', '');
|
||||
} else {
|
||||
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Change IE property back
|
||||
*/
|
||||
|
||||
|
||||
GridRowsColumns.prototype.normalize = function normalize(prop) {
|
||||
return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1');
|
||||
};
|
||||
|
||||
/**
|
||||
* Change repeating syntax for IE
|
||||
*/
|
||||
|
||||
|
||||
GridRowsColumns.prototype.set = function set(decl, prefix) {
|
||||
if (prefix === '-ms-' && decl.value.indexOf('repeat(') !== -1) {
|
||||
decl.value = shorthand.changeRepeat(decl.value);
|
||||
}
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return GridRowsColumns;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(GridRowsColumns, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['grid-template-rows', 'grid-template-columns', 'grid-rows', 'grid-columns']
|
||||
});
|
||||
|
||||
|
||||
module.exports = GridRowsColumns;
|
||||
160
build/node_modules/autoprefixer/lib/hacks/grid-shorthand.js
generated
vendored
Normal file
160
build/node_modules/autoprefixer/lib/hacks/grid-shorthand.js
generated
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
'use strict';
|
||||
|
||||
var parser = require('postcss-value-parser');
|
||||
|
||||
function convert(value) {
|
||||
if (value && value.length === 2 && value[0] === 'span' && parseInt(value[1], 10) > 0) {
|
||||
return [false, parseInt(value[1], 10)];
|
||||
}
|
||||
|
||||
if (value && value.length === 1 && parseInt(value[0], 10) > 0) {
|
||||
return [parseInt(value[0], 10), false];
|
||||
}
|
||||
|
||||
return [false, false];
|
||||
}
|
||||
|
||||
function translate(values, startIndex, endIndex) {
|
||||
var startValue = values[startIndex];
|
||||
var endValue = values[endIndex];
|
||||
|
||||
if (!startValue) {
|
||||
return [false, false];
|
||||
}
|
||||
|
||||
var _convert = convert(startValue),
|
||||
start = _convert[0],
|
||||
spanStart = _convert[1];
|
||||
|
||||
var _convert2 = convert(endValue),
|
||||
end = _convert2[0],
|
||||
spanEnd = _convert2[1];
|
||||
|
||||
if (start && !endValue) {
|
||||
return [start, false];
|
||||
}
|
||||
|
||||
if (spanStart && end) {
|
||||
return [end - spanStart, spanStart];
|
||||
}
|
||||
|
||||
if (start && spanEnd) {
|
||||
return [start, spanEnd];
|
||||
}
|
||||
|
||||
if (start && end) {
|
||||
return [start, end - start];
|
||||
}
|
||||
|
||||
return [false, false];
|
||||
}
|
||||
|
||||
function parse(decl) {
|
||||
var node = parser(decl.value);
|
||||
|
||||
var values = [];
|
||||
var current = 0;
|
||||
values[current] = [];
|
||||
|
||||
for (var _iterator = node.nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var i = _ref;
|
||||
|
||||
if (i.type === 'div') {
|
||||
current += 1;
|
||||
values[current] = [];
|
||||
} else if (i.type === 'word') {
|
||||
values[current].push(i.value);
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
function parseTemplateShortcut(decl) {
|
||||
var node = parser(decl.value, { loose: true });
|
||||
|
||||
var values = [];
|
||||
var current = 0;
|
||||
values[current] = [];
|
||||
|
||||
for (var _iterator2 = node.nodes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var i = _ref2;
|
||||
|
||||
if (i.type === 'div') {
|
||||
current += 1;
|
||||
values[current] = [];
|
||||
} else {
|
||||
values[current].push(parser.stringify(i));
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
function walkRepeat(node) {
|
||||
var fixed = [];
|
||||
for (var _iterator3 = node.nodes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
|
||||
var _ref3;
|
||||
|
||||
if (_isArray3) {
|
||||
if (_i3 >= _iterator3.length) break;
|
||||
_ref3 = _iterator3[_i3++];
|
||||
} else {
|
||||
_i3 = _iterator3.next();
|
||||
if (_i3.done) break;
|
||||
_ref3 = _i3.value;
|
||||
}
|
||||
|
||||
var i = _ref3;
|
||||
|
||||
if (i.nodes) {
|
||||
walkRepeat(i);
|
||||
}
|
||||
fixed.push(i);
|
||||
if (i.type === 'function' && i.value === 'repeat') {
|
||||
var first = i.nodes.shift();
|
||||
if (first) {
|
||||
var count = first.value;
|
||||
i.nodes.shift();
|
||||
i.value = '';
|
||||
fixed.push({ type: 'word', value: '[' + count + ']' });
|
||||
}
|
||||
}
|
||||
}
|
||||
node.nodes = fixed;
|
||||
}
|
||||
|
||||
function changeRepeat(value) {
|
||||
var ast = parser(value);
|
||||
walkRepeat(ast);
|
||||
return ast.toString();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
parse: parse,
|
||||
translate: translate,
|
||||
changeRepeat: changeRepeat,
|
||||
parseTemplateShortcut: parseTemplateShortcut
|
||||
};
|
||||
62
build/node_modules/autoprefixer/lib/hacks/grid-start.js
generated
vendored
Normal file
62
build/node_modules/autoprefixer/lib/hacks/grid-start.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var GridStart = function (_Declaration) {
|
||||
_inherits(GridStart, _Declaration);
|
||||
|
||||
function GridStart() {
|
||||
_classCallCheck(this, GridStart);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not add prefix for unsupported value in IE
|
||||
*/
|
||||
GridStart.prototype.check = function check(decl) {
|
||||
var value = decl.value;
|
||||
return value.indexOf('/') === -1 || value.indexOf('span') !== -1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return a final spec property
|
||||
*/
|
||||
|
||||
|
||||
GridStart.prototype.normalize = function normalize(prop) {
|
||||
return prop.replace('-start', '');
|
||||
};
|
||||
|
||||
/**
|
||||
* Change property name for IE
|
||||
*/
|
||||
|
||||
|
||||
GridStart.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
var result = _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
if (prefix === '-ms-') {
|
||||
result = result.replace('-start', '');
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
return GridStart;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(GridStart, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['grid-row-start', 'grid-column-start']
|
||||
});
|
||||
|
||||
|
||||
module.exports = GridStart;
|
||||
135
build/node_modules/autoprefixer/lib/hacks/grid-template-areas.js
generated
vendored
Normal file
135
build/node_modules/autoprefixer/lib/hacks/grid-template-areas.js
generated
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var DOTS = /^\.+$/;
|
||||
|
||||
function track(start, end) {
|
||||
return { start: start, end: end, span: end - start };
|
||||
}
|
||||
|
||||
function getRows(tpl) {
|
||||
return tpl.trim().slice(1, -1).split(/['"]\s*['"]?/g);
|
||||
}
|
||||
|
||||
function getColumns(line) {
|
||||
return line.trim().split(/\s+/g);
|
||||
}
|
||||
|
||||
function parseGridAreas(tpl) {
|
||||
return getRows(tpl).reduce(function (areas, line, rowIndex) {
|
||||
if (line.trim() === '') return areas;
|
||||
getColumns(line).forEach(function (area, columnIndex) {
|
||||
if (DOTS.test(area)) return;
|
||||
if (typeof areas[area] === 'undefined') {
|
||||
areas[area] = {
|
||||
column: track(columnIndex + 1, columnIndex + 2),
|
||||
row: track(rowIndex + 1, rowIndex + 2)
|
||||
};
|
||||
} else {
|
||||
var _areas$area = areas[area],
|
||||
column = _areas$area.column,
|
||||
row = _areas$area.row;
|
||||
|
||||
|
||||
column.start = Math.min(column.start, columnIndex + 1);
|
||||
column.end = Math.max(column.end, columnIndex + 2);
|
||||
column.span = column.end - column.start;
|
||||
|
||||
row.start = Math.min(row.start, rowIndex + 1);
|
||||
row.end = Math.max(row.end, rowIndex + 2);
|
||||
row.span = row.end - row.start;
|
||||
}
|
||||
});
|
||||
return areas;
|
||||
}, {});
|
||||
}
|
||||
|
||||
var GridTemplateAreas = function (_Declaration) {
|
||||
_inherits(GridTemplateAreas, _Declaration);
|
||||
|
||||
function GridTemplateAreas() {
|
||||
_classCallCheck(this, GridTemplateAreas);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
GridTemplateAreas.prototype.getRoot = function getRoot(parent) {
|
||||
if (parent.type === 'atrule' || !parent.parent) {
|
||||
return parent;
|
||||
}
|
||||
return this.getRoot(parent.parent);
|
||||
};
|
||||
|
||||
/**
|
||||
* Translate grid-template-areas to separate -ms- prefixed properties
|
||||
*/
|
||||
|
||||
|
||||
GridTemplateAreas.prototype.insert = function insert(decl, prefix, prefixes, result) {
|
||||
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
|
||||
var areas = parseGridAreas(decl.value);
|
||||
this.getRoot(decl.parent).walkDecls('grid-area', function (gridArea) {
|
||||
var value = gridArea.value;
|
||||
var area = areas[value];
|
||||
delete areas[value];
|
||||
|
||||
if (gridArea.parent.some(function (i) {
|
||||
return i.prop === '-ms-grid-row';
|
||||
})) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (area) {
|
||||
gridArea.cloneBefore({
|
||||
prop: '-ms-grid-row',
|
||||
value: String(area.row.start)
|
||||
});
|
||||
if (area.row.span > 1) {
|
||||
gridArea.cloneBefore({
|
||||
prop: '-ms-grid-row-span',
|
||||
value: String(area.row.span)
|
||||
});
|
||||
}
|
||||
gridArea.cloneBefore({
|
||||
prop: '-ms-grid-column',
|
||||
value: String(area.column.start)
|
||||
});
|
||||
if (area.column.span > 1) {
|
||||
gridArea.cloneBefore({
|
||||
prop: '-ms-grid-column-span',
|
||||
value: String(area.column.span)
|
||||
});
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
|
||||
var missed = Object.keys(areas);
|
||||
if (missed.length > 0) {
|
||||
decl.warn(result, 'Can not find grid areas: ' + missed.join(', '));
|
||||
}
|
||||
|
||||
return decl;
|
||||
};
|
||||
|
||||
return GridTemplateAreas;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(GridTemplateAreas, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['grid-template-areas']
|
||||
});
|
||||
|
||||
|
||||
module.exports = GridTemplateAreas;
|
||||
75
build/node_modules/autoprefixer/lib/hacks/grid-template.js
generated
vendored
Normal file
75
build/node_modules/autoprefixer/lib/hacks/grid-template.js
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
var shorthand = require('./grid-shorthand');
|
||||
|
||||
var GridTemplate = function (_Declaration) {
|
||||
_inherits(GridTemplate, _Declaration);
|
||||
|
||||
function GridTemplate() {
|
||||
_classCallCheck(this, GridTemplate);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not add prefix for unsupported value in IE
|
||||
*/
|
||||
GridTemplate.prototype.check = function check(decl) {
|
||||
return decl.value.includes('/') && !decl.value.includes('[') && !decl.value.includes('"') && !decl.value.includes('\'');
|
||||
};
|
||||
|
||||
/**
|
||||
* Translate grid-template to separate -ms- prefixed properties
|
||||
*/
|
||||
|
||||
|
||||
GridTemplate.prototype.insert = function insert(decl, prefix, prefixes) {
|
||||
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
|
||||
if (decl.parent.some(function (i) {
|
||||
return i.prop === '-ms-grid-rows';
|
||||
})) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var _shorthand$parseTempl = shorthand.parseTemplateShortcut(decl),
|
||||
templateRows = _shorthand$parseTempl[0],
|
||||
templateColumns = _shorthand$parseTempl[1];
|
||||
|
||||
if (templateRows) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-grid-rows',
|
||||
value: shorthand.changeRepeat(templateRows.join(''))
|
||||
});
|
||||
}
|
||||
|
||||
if (templateColumns) {
|
||||
decl.cloneBefore({
|
||||
prop: '-ms-grid-columns',
|
||||
value: shorthand.changeRepeat(templateColumns.join(''))
|
||||
});
|
||||
}
|
||||
|
||||
return decl;
|
||||
};
|
||||
|
||||
return GridTemplate;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(GridTemplate, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['grid-template']
|
||||
});
|
||||
|
||||
|
||||
module.exports = GridTemplate;
|
||||
82
build/node_modules/autoprefixer/lib/hacks/image-rendering.js
generated
vendored
Normal file
82
build/node_modules/autoprefixer/lib/hacks/image-rendering.js
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var ImageRendering = function (_Declaration) {
|
||||
_inherits(ImageRendering, _Declaration);
|
||||
|
||||
function ImageRendering() {
|
||||
_classCallCheck(this, ImageRendering);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add hack only for crisp-edges
|
||||
*/
|
||||
ImageRendering.prototype.check = function check(decl) {
|
||||
return decl.value === 'pixelated';
|
||||
};
|
||||
|
||||
/**
|
||||
* Change property name for IE
|
||||
*/
|
||||
|
||||
|
||||
ImageRendering.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return '-ms-interpolation-mode';
|
||||
} else {
|
||||
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Change property and value for IE
|
||||
*/
|
||||
|
||||
|
||||
ImageRendering.prototype.set = function set(decl, prefix) {
|
||||
if (prefix !== '-ms-') return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
decl.prop = '-ms-interpolation-mode';
|
||||
decl.value = 'nearest-neighbor';
|
||||
return decl;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return property name by spec
|
||||
*/
|
||||
|
||||
|
||||
ImageRendering.prototype.normalize = function normalize() {
|
||||
return 'image-rendering';
|
||||
};
|
||||
|
||||
/**
|
||||
* Warn on old value
|
||||
*/
|
||||
|
||||
|
||||
ImageRendering.prototype.process = function process(node, result) {
|
||||
return _Declaration.prototype.process.call(this, node, result);
|
||||
};
|
||||
|
||||
return ImageRendering;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(ImageRendering, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['image-rendering', 'interpolation-mode']
|
||||
});
|
||||
|
||||
|
||||
module.exports = ImageRendering;
|
||||
43
build/node_modules/autoprefixer/lib/hacks/image-set.js
generated
vendored
Normal file
43
build/node_modules/autoprefixer/lib/hacks/image-set.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Value = require('../value');
|
||||
|
||||
var ImageSet = function (_Value) {
|
||||
_inherits(ImageSet, _Value);
|
||||
|
||||
function ImageSet() {
|
||||
_classCallCheck(this, ImageSet);
|
||||
|
||||
return _possibleConstructorReturn(this, _Value.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Use non-standard name for WebKit and Firefox
|
||||
*/
|
||||
ImageSet.prototype.replace = function replace(string, prefix) {
|
||||
var fixed = _Value.prototype.replace.call(this, string, prefix);
|
||||
if (prefix === '-webkit-') {
|
||||
fixed = fixed.replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi, 'url($1)$2');
|
||||
}
|
||||
return fixed;
|
||||
};
|
||||
|
||||
return ImageSet;
|
||||
}(Value);
|
||||
|
||||
Object.defineProperty(ImageSet, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['image-set']
|
||||
});
|
||||
|
||||
|
||||
module.exports = ImageSet;
|
||||
48
build/node_modules/autoprefixer/lib/hacks/inline-logical.js
generated
vendored
Normal file
48
build/node_modules/autoprefixer/lib/hacks/inline-logical.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var InlineLogical = function (_Declaration) {
|
||||
_inherits(InlineLogical, _Declaration);
|
||||
|
||||
function InlineLogical() {
|
||||
_classCallCheck(this, InlineLogical);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Use old syntax for -moz- and -webkit-
|
||||
*/
|
||||
InlineLogical.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
return prefix + prop.replace('-inline', '');
|
||||
};
|
||||
|
||||
/**
|
||||
* Return property name by spec
|
||||
*/
|
||||
|
||||
|
||||
InlineLogical.prototype.normalize = function normalize(prop) {
|
||||
return prop.replace(/(margin|padding|border)-(start|end)/, '$1-inline-$2');
|
||||
};
|
||||
|
||||
return InlineLogical;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(InlineLogical, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['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']
|
||||
});
|
||||
|
||||
|
||||
module.exports = InlineLogical;
|
||||
75
build/node_modules/autoprefixer/lib/hacks/intrinsic.js
generated
vendored
Normal file
75
build/node_modules/autoprefixer/lib/hacks/intrinsic.js
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var OldValue = require('../old-value');
|
||||
var Value = require('../value');
|
||||
|
||||
function _regexp(name) {
|
||||
return new RegExp('(^|[\\s,(])(' + name + '($|[\\s),]))', 'gi');
|
||||
}
|
||||
|
||||
var Intrinsic = function (_Value) {
|
||||
_inherits(Intrinsic, _Value);
|
||||
|
||||
function Intrinsic() {
|
||||
_classCallCheck(this, Intrinsic);
|
||||
|
||||
return _possibleConstructorReturn(this, _Value.apply(this, arguments));
|
||||
}
|
||||
|
||||
Intrinsic.prototype.regexp = function regexp() {
|
||||
if (!this.regexpCache) this.regexpCache = _regexp(this.name);
|
||||
return this.regexpCache;
|
||||
};
|
||||
|
||||
Intrinsic.prototype.isStretch = function isStretch() {
|
||||
return this.name === 'stretch' || this.name === 'fill' || this.name === 'fill-available';
|
||||
};
|
||||
|
||||
Intrinsic.prototype.replace = function replace(string, prefix) {
|
||||
if (prefix === '-moz-' && this.isStretch()) {
|
||||
return string.replace(this.regexp(), '$1-moz-available$3');
|
||||
} else if (prefix === '-webkit-' && this.isStretch()) {
|
||||
return string.replace(this.regexp(), '$1-webkit-fill-available$3');
|
||||
} else {
|
||||
return _Value.prototype.replace.call(this, string, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
Intrinsic.prototype.old = function old(prefix) {
|
||||
var prefixed = prefix + this.name;
|
||||
if (this.isStretch()) {
|
||||
if (prefix === '-moz-') {
|
||||
prefixed = '-moz-available';
|
||||
} else if (prefix === '-webkit-') {
|
||||
prefixed = '-webkit-fill-available';
|
||||
}
|
||||
}
|
||||
return new OldValue(this.name, prefixed, prefixed, _regexp(prefixed));
|
||||
};
|
||||
|
||||
Intrinsic.prototype.add = function add(decl, prefix) {
|
||||
if (decl.prop.indexOf('grid') !== -1 && prefix !== '-webkit-') {
|
||||
return undefined;
|
||||
}
|
||||
return _Value.prototype.add.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return Intrinsic;
|
||||
}(Value);
|
||||
|
||||
Object.defineProperty(Intrinsic, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['max-content', 'min-content', 'fit-content', 'fill', 'fill-available', 'stretch']
|
||||
});
|
||||
|
||||
|
||||
module.exports = Intrinsic;
|
||||
91
build/node_modules/autoprefixer/lib/hacks/justify-content.js
generated
vendored
Normal file
91
build/node_modules/autoprefixer/lib/hacks/justify-content.js
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var JustifyContent = function (_Declaration) {
|
||||
_inherits(JustifyContent, _Declaration);
|
||||
|
||||
function JustifyContent() {
|
||||
_classCallCheck(this, JustifyContent);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for 2009 and 2012 specs
|
||||
*/
|
||||
JustifyContent.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec[0];
|
||||
prefix = _flexSpec[1];
|
||||
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-pack';
|
||||
} else if (spec === 2012) {
|
||||
return prefix + 'flex-pack';
|
||||
} else {
|
||||
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
|
||||
|
||||
JustifyContent.prototype.normalize = function normalize() {
|
||||
return 'justify-content';
|
||||
};
|
||||
|
||||
/**
|
||||
* Change value for 2009 and 2012 specs
|
||||
*/
|
||||
|
||||
|
||||
JustifyContent.prototype.set = function set(decl, prefix) {
|
||||
var spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009 || spec === 2012) {
|
||||
var value = JustifyContent.oldValues[decl.value] || decl.value;
|
||||
decl.value = value;
|
||||
if (spec !== 2009 || value !== 'distribute') {
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
}
|
||||
} else if (spec === 'final') {
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
return JustifyContent;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(JustifyContent, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['justify-content', 'flex-pack', 'box-pack']
|
||||
});
|
||||
Object.defineProperty(JustifyContent, 'oldValues', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start',
|
||||
'space-between': 'justify',
|
||||
'space-around': 'distribute'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = JustifyContent;
|
||||
52
build/node_modules/autoprefixer/lib/hacks/mask-border.js
generated
vendored
Normal file
52
build/node_modules/autoprefixer/lib/hacks/mask-border.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var MaskBorder = function (_Declaration) {
|
||||
_inherits(MaskBorder, _Declaration);
|
||||
|
||||
function MaskBorder() {
|
||||
_classCallCheck(this, MaskBorder);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
MaskBorder.prototype.normalize = function normalize() {
|
||||
return this.name.replace('box-image', 'border');
|
||||
};
|
||||
|
||||
/**
|
||||
* Return flex property for 2012 spec
|
||||
*/
|
||||
|
||||
|
||||
MaskBorder.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
var result = _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
if (prefix === '-webkit-') {
|
||||
result = result.replace('border', 'box-image');
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
return MaskBorder;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(MaskBorder, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['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']
|
||||
});
|
||||
|
||||
|
||||
module.exports = MaskBorder;
|
||||
77
build/node_modules/autoprefixer/lib/hacks/order.js
generated
vendored
Normal file
77
build/node_modules/autoprefixer/lib/hacks/order.js
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var flexSpec = require('./flex-spec');
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var Order = function (_Declaration) {
|
||||
_inherits(Order, _Declaration);
|
||||
|
||||
function Order() {
|
||||
_classCallCheck(this, Order);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Change property name for 2009 and 2012 specs
|
||||
*/
|
||||
Order.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
var spec = void 0;
|
||||
|
||||
var _flexSpec = flexSpec(prefix);
|
||||
|
||||
spec = _flexSpec[0];
|
||||
prefix = _flexSpec[1];
|
||||
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-ordinal-group';
|
||||
} else if (spec === 2012) {
|
||||
return prefix + 'flex-order';
|
||||
} else {
|
||||
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
|
||||
|
||||
Order.prototype.normalize = function normalize() {
|
||||
return 'order';
|
||||
};
|
||||
|
||||
/**
|
||||
* Fix value for 2009 spec
|
||||
*/
|
||||
|
||||
|
||||
Order.prototype.set = function set(decl, prefix) {
|
||||
var spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009 && /\d/.test(decl.value)) {
|
||||
decl.value = (parseInt(decl.value) + 1).toString();
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
return Order;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(Order, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['order', 'flex-order', 'box-ordinal-group']
|
||||
});
|
||||
|
||||
|
||||
module.exports = Order;
|
||||
61
build/node_modules/autoprefixer/lib/hacks/pixelated.js
generated
vendored
Normal file
61
build/node_modules/autoprefixer/lib/hacks/pixelated.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var OldValue = require('../old-value');
|
||||
var Value = require('../value');
|
||||
|
||||
var Pixelated = function (_Value) {
|
||||
_inherits(Pixelated, _Value);
|
||||
|
||||
function Pixelated() {
|
||||
_classCallCheck(this, Pixelated);
|
||||
|
||||
return _possibleConstructorReturn(this, _Value.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Use non-standard name for WebKit and Firefox
|
||||
*/
|
||||
Pixelated.prototype.replace = function replace(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 _Value.prototype.replace.call(this, string, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Different name for WebKit and Firefox
|
||||
*/
|
||||
|
||||
|
||||
Pixelated.prototype.old = function old(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 _Value.prototype.old.call(this, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
return Pixelated;
|
||||
}(Value);
|
||||
|
||||
Object.defineProperty(Pixelated, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['pixelated']
|
||||
});
|
||||
|
||||
|
||||
module.exports = Pixelated;
|
||||
58
build/node_modules/autoprefixer/lib/hacks/placeholder.js
generated
vendored
Normal file
58
build/node_modules/autoprefixer/lib/hacks/placeholder.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Selector = require('../selector');
|
||||
|
||||
var Placeholder = function (_Selector) {
|
||||
_inherits(Placeholder, _Selector);
|
||||
|
||||
function Placeholder() {
|
||||
_classCallCheck(this, Placeholder);
|
||||
|
||||
return _possibleConstructorReturn(this, _Selector.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add old mozilla to possible prefixes
|
||||
*/
|
||||
Placeholder.prototype.possible = function possible() {
|
||||
return _Selector.prototype.possible.call(this).concat(['-moz- old', '-ms- old']);
|
||||
};
|
||||
|
||||
/**
|
||||
* Return different selectors depend on prefix
|
||||
*/
|
||||
|
||||
|
||||
Placeholder.prototype.prefixed = function prefixed(prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return '::-webkit-input-placeholder';
|
||||
} else if (prefix === '-ms-') {
|
||||
return '::-ms-input-placeholder';
|
||||
} else if (prefix === '-ms- old') {
|
||||
return ':-ms-input-placeholder';
|
||||
} else if (prefix === '-moz- old') {
|
||||
return ':-moz-placeholder';
|
||||
} else {
|
||||
return '::' + prefix + 'placeholder';
|
||||
}
|
||||
};
|
||||
|
||||
return Placeholder;
|
||||
}(Selector);
|
||||
|
||||
Object.defineProperty(Placeholder, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['::placeholder']
|
||||
});
|
||||
|
||||
|
||||
module.exports = Placeholder;
|
||||
43
build/node_modules/autoprefixer/lib/hacks/text-decoration.js
generated
vendored
Normal file
43
build/node_modules/autoprefixer/lib/hacks/text-decoration.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var BASIC = ['none', 'underline', 'overline', 'line-through', 'blink', 'inherit', 'initial', 'unset'];
|
||||
|
||||
var TextDecoration = function (_Declaration) {
|
||||
_inherits(TextDecoration, _Declaration);
|
||||
|
||||
function TextDecoration() {
|
||||
_classCallCheck(this, TextDecoration);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not add prefixes for basic values.
|
||||
*/
|
||||
TextDecoration.prototype.check = function check(decl) {
|
||||
return decl.value.split(/\s+/).some(function (i) {
|
||||
return BASIC.indexOf(i) === -1;
|
||||
});
|
||||
};
|
||||
|
||||
return TextDecoration;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(TextDecoration, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['text-decoration']
|
||||
});
|
||||
|
||||
|
||||
module.exports = TextDecoration;
|
||||
39
build/node_modules/autoprefixer/lib/hacks/text-emphasis-position.js
generated
vendored
Normal file
39
build/node_modules/autoprefixer/lib/hacks/text-emphasis-position.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var TextEmphasisPosition = function (_Declaration) {
|
||||
_inherits(TextEmphasisPosition, _Declaration);
|
||||
|
||||
function TextEmphasisPosition() {
|
||||
_classCallCheck(this, TextEmphasisPosition);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
TextEmphasisPosition.prototype.set = function set(decl, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
decl.value = decl.value.replace(/\s*(right|left)\s*/i, '');
|
||||
}
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return TextEmphasisPosition;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(TextEmphasisPosition, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['text-emphasis-position']
|
||||
});
|
||||
|
||||
|
||||
module.exports = TextEmphasisPosition;
|
||||
118
build/node_modules/autoprefixer/lib/hacks/transform-decl.js
generated
vendored
Normal file
118
build/node_modules/autoprefixer/lib/hacks/transform-decl.js
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var TransformDecl = function (_Declaration) {
|
||||
_inherits(TransformDecl, _Declaration);
|
||||
|
||||
function TransformDecl() {
|
||||
_classCallCheck(this, TransformDecl);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively check all parents for @keyframes
|
||||
*/
|
||||
TransformDecl.prototype.keyframeParents = function keyframeParents(decl) {
|
||||
var parent = decl.parent;
|
||||
|
||||
while (parent) {
|
||||
if (parent.type === 'atrule' && parent.name === 'keyframes') {
|
||||
return true;
|
||||
}
|
||||
var _parent = parent;
|
||||
parent = _parent.parent;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Is transform contain 3D commands
|
||||
*/
|
||||
|
||||
|
||||
TransformDecl.prototype.contain3d = function contain3d(decl) {
|
||||
if (decl.prop === 'transform-origin') {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var _iterator = TransformDecl.functions3d, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var func = _ref;
|
||||
|
||||
if (decl.value.indexOf(func + '(') !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Replace rotateZ to rotate for IE 9
|
||||
*/
|
||||
|
||||
|
||||
TransformDecl.prototype.set = function set(decl, prefix) {
|
||||
decl = _Declaration.prototype.set.call(this, decl, prefix);
|
||||
if (prefix === '-ms-') {
|
||||
decl.value = decl.value.replace(/rotateZ/gi, 'rotate');
|
||||
}
|
||||
return decl;
|
||||
};
|
||||
|
||||
/**
|
||||
* Don't add prefix for IE in keyframes
|
||||
*/
|
||||
|
||||
|
||||
TransformDecl.prototype.insert = function insert(decl, prefix, prefixes) {
|
||||
if (prefix === '-ms-') {
|
||||
if (!this.contain3d(decl) && !this.keyframeParents(decl)) {
|
||||
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
}
|
||||
} else if (prefix === '-o-') {
|
||||
if (!this.contain3d(decl)) {
|
||||
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
}
|
||||
} else {
|
||||
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
return TransformDecl;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(TransformDecl, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['transform', 'transform-origin']
|
||||
});
|
||||
Object.defineProperty(TransformDecl, 'functions3d', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['matrix3d', 'translate3d', 'translateZ', 'scale3d', 'scaleZ', 'rotate3d', 'rotateX', 'rotateY', 'perspective']
|
||||
});
|
||||
|
||||
|
||||
module.exports = TransformDecl;
|
||||
50
build/node_modules/autoprefixer/lib/hacks/writing-mode.js
generated
vendored
Normal file
50
build/node_modules/autoprefixer/lib/hacks/writing-mode.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Declaration = require('../declaration');
|
||||
|
||||
var WritingMode = function (_Declaration) {
|
||||
_inherits(WritingMode, _Declaration);
|
||||
|
||||
function WritingMode() {
|
||||
_classCallCheck(this, WritingMode);
|
||||
|
||||
return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
|
||||
}
|
||||
|
||||
WritingMode.prototype.set = function set(decl, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
decl.value = WritingMode.msValues[decl.value] || decl.value;
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return _Declaration.prototype.set.call(this, decl, prefix);
|
||||
}
|
||||
};
|
||||
|
||||
return WritingMode;
|
||||
}(Declaration);
|
||||
|
||||
Object.defineProperty(WritingMode, 'names', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['writing-mode']
|
||||
});
|
||||
Object.defineProperty(WritingMode, 'msValues', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: {
|
||||
'horizontal-tb': 'lr-tb',
|
||||
'vertical-rl': 'tb-rl',
|
||||
'vertical-lr': 'tb-lr'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = WritingMode;
|
||||
152
build/node_modules/autoprefixer/lib/info.js
generated
vendored
Normal file
152
build/node_modules/autoprefixer/lib/info.js
generated
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
'use strict';
|
||||
|
||||
var browserslist = require('browserslist');
|
||||
|
||||
function capitalize(str) {
|
||||
return str.slice(0, 1).toUpperCase() + str.slice(1);
|
||||
}
|
||||
|
||||
var 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'
|
||||
};
|
||||
|
||||
var prefix = function prefix(name, prefixes) {
|
||||
var out = ' ' + name + ': ';
|
||||
out += prefixes.map(function (i) {
|
||||
return i.replace(/^-(.*)-$/g, '$1');
|
||||
}).join(', ');
|
||||
out += '\n';
|
||||
return out;
|
||||
};
|
||||
|
||||
module.exports = function (prefixes) {
|
||||
if (prefixes.browsers.selected.length === 0) {
|
||||
return 'No browsers selected';
|
||||
}
|
||||
|
||||
var versions = {};
|
||||
for (var _iterator = prefixes.browsers.selected, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var browser = _ref;
|
||||
|
||||
var _browser$split = browser.split(' '),
|
||||
name = _browser$split[0],
|
||||
version = _browser$split[1];
|
||||
|
||||
name = names[name] || capitalize(name);
|
||||
if (versions[name]) {
|
||||
versions[name].push(version);
|
||||
} else {
|
||||
versions[name] = [version];
|
||||
}
|
||||
}
|
||||
|
||||
var out = 'Browsers:\n';
|
||||
for (var _browser in versions) {
|
||||
var list = versions[_browser];
|
||||
list = list.sort(function (a, b) {
|
||||
return parseFloat(b) - parseFloat(a);
|
||||
});
|
||||
out += ' ' + _browser + ': ' + list.join(', ') + '\n';
|
||||
}
|
||||
|
||||
var coverage = browserslist.coverage(prefixes.browsers.selected);
|
||||
var round = Math.round(coverage * 100) / 100.0;
|
||||
out += '\nThese browsers account for ' + round + '% of all users globally\n';
|
||||
|
||||
var atrules = '';
|
||||
for (var name in prefixes.add) {
|
||||
var data = prefixes.add[name];
|
||||
if (name[0] === '@' && data.prefixes) {
|
||||
atrules += prefix(name, data.prefixes);
|
||||
}
|
||||
}
|
||||
if (atrules !== '') {
|
||||
out += '\nAt-Rules:\n' + atrules;
|
||||
}
|
||||
|
||||
var selectors = '';
|
||||
for (var _iterator2 = prefixes.add.selectors, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var selector = _ref2;
|
||||
|
||||
if (selector.prefixes) {
|
||||
selectors += prefix(selector.name, selector.prefixes);
|
||||
}
|
||||
}
|
||||
if (selectors !== '') {
|
||||
out += '\nSelectors:\n' + selectors;
|
||||
}
|
||||
|
||||
var values = '';
|
||||
var props = '';
|
||||
for (var _name in prefixes.add) {
|
||||
var _data = prefixes.add[_name];
|
||||
if (_name[0] !== '@' && _data.prefixes) {
|
||||
props += prefix(_name, _data.prefixes);
|
||||
}
|
||||
|
||||
if (!_data.values) {
|
||||
continue;
|
||||
}
|
||||
for (var _iterator3 = _data.values, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
|
||||
var _ref3;
|
||||
|
||||
if (_isArray3) {
|
||||
if (_i3 >= _iterator3.length) break;
|
||||
_ref3 = _iterator3[_i3++];
|
||||
} else {
|
||||
_i3 = _iterator3.next();
|
||||
if (_i3.done) break;
|
||||
_ref3 = _i3.value;
|
||||
}
|
||||
|
||||
var value = _ref3;
|
||||
|
||||
var 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;
|
||||
};
|
||||
94
build/node_modules/autoprefixer/lib/old-selector.js
generated
vendored
Normal file
94
build/node_modules/autoprefixer/lib/old-selector.js
generated
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
"use strict";
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
var OldSelector = function () {
|
||||
function OldSelector(selector, prefix) {
|
||||
_classCallCheck(this, OldSelector);
|
||||
|
||||
this.prefix = prefix;
|
||||
this.prefixed = selector.prefixed(this.prefix);
|
||||
this.regexp = selector.regexp(this.prefix);
|
||||
|
||||
this.prefixeds = selector.possible().map(function (x) {
|
||||
return [selector.prefixed(x), selector.regexp(x)];
|
||||
});
|
||||
|
||||
this.unprefixed = selector.name;
|
||||
this.nameRegexp = selector.regexp();
|
||||
}
|
||||
|
||||
/**
|
||||
* Is rule a hack without unprefixed version bottom
|
||||
*/
|
||||
|
||||
|
||||
OldSelector.prototype.isHack = function isHack(rule) {
|
||||
var index = rule.parent.index(rule) + 1;
|
||||
var rules = rule.parent.nodes;
|
||||
|
||||
while (index < rules.length) {
|
||||
var before = rules[index].selector;
|
||||
if (!before) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (before.indexOf(this.unprefixed) !== -1 && before.match(this.nameRegexp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var some = false;
|
||||
for (var _iterator = this.prefixeds, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref2 = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref2 = _i.value;
|
||||
}
|
||||
|
||||
var _ref = _ref2;
|
||||
var string = _ref[0];
|
||||
var regexp = _ref[1];
|
||||
|
||||
if (before.indexOf(string) !== -1 && before.match(regexp)) {
|
||||
some = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!some) {
|
||||
return true;
|
||||
}
|
||||
|
||||
index += 1;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Does rule contain an unnecessary prefixed selector
|
||||
*/
|
||||
|
||||
|
||||
OldSelector.prototype.check = function check(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;
|
||||
32
build/node_modules/autoprefixer/lib/old-value.js
generated
vendored
Normal file
32
build/node_modules/autoprefixer/lib/old-value.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
'use strict';
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
var utils = require('./utils');
|
||||
|
||||
var OldValue = function () {
|
||||
function OldValue(unprefixed, prefixed, string, regexp) {
|
||||
_classCallCheck(this, OldValue);
|
||||
|
||||
this.unprefixed = unprefixed;
|
||||
this.prefixed = prefixed;
|
||||
this.string = string || prefixed;
|
||||
this.regexp = regexp || utils.regexp(prefixed);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check, that value contain old value
|
||||
*/
|
||||
|
||||
|
||||
OldValue.prototype.check = function check(value) {
|
||||
if (value.indexOf(this.string) !== -1) {
|
||||
return !!value.match(this.regexp);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
return OldValue;
|
||||
}();
|
||||
|
||||
module.exports = OldValue;
|
||||
188
build/node_modules/autoprefixer/lib/prefixer.js
generated
vendored
Normal file
188
build/node_modules/autoprefixer/lib/prefixer.js
generated
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
'use strict';
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
var Browsers = require('./browsers');
|
||||
var utils = require('./utils');
|
||||
|
||||
var vendor = require('postcss/lib/vendor');
|
||||
|
||||
/**
|
||||
* Recursivly clone objects
|
||||
*/
|
||||
function _clone(obj, parent) {
|
||||
var cloned = new obj.constructor();
|
||||
|
||||
for (var _iterator = Object.keys(obj || {}), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var i = _ref;
|
||||
|
||||
var value = obj[i];
|
||||
if (i === 'parent' && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
|
||||
if (parent) {
|
||||
cloned[i] = parent;
|
||||
}
|
||||
} else if (i === 'source' || i === null) {
|
||||
cloned[i] = value;
|
||||
} else if (value instanceof Array) {
|
||||
cloned[i] = value.map(function (x) {
|
||||
return _clone(x, cloned);
|
||||
});
|
||||
} else if (i !== '_autoprefixerPrefix' && i !== '_autoprefixerValues') {
|
||||
if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value !== null) {
|
||||
value = _clone(value, cloned);
|
||||
}
|
||||
cloned[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
return cloned;
|
||||
}
|
||||
|
||||
var Prefixer = function () {
|
||||
|
||||
/**
|
||||
* Add hack to selected names
|
||||
*/
|
||||
Prefixer.hack = function hack(klass) {
|
||||
var _this = this;
|
||||
|
||||
if (!this.hacks) {
|
||||
this.hacks = {};
|
||||
}
|
||||
return klass.names.map(function (name) {
|
||||
_this.hacks[name] = klass;
|
||||
return _this.hacks[name];
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Load hacks for some names
|
||||
*/
|
||||
|
||||
|
||||
Prefixer.load = function load(name, prefixes, all) {
|
||||
var Klass = this.hacks && this.hacks[name];
|
||||
if (Klass) {
|
||||
return new Klass(name, prefixes, all);
|
||||
} else {
|
||||
return new this(name, prefixes, all);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Clone node and clean autprefixer custom caches
|
||||
*/
|
||||
|
||||
|
||||
Prefixer.clone = function clone(node, overrides) {
|
||||
var cloned = _clone(node);
|
||||
for (var name in overrides) {
|
||||
cloned[name] = overrides[name];
|
||||
}
|
||||
return cloned;
|
||||
};
|
||||
|
||||
function Prefixer(name, prefixes, all) {
|
||||
_classCallCheck(this, Prefixer);
|
||||
|
||||
this.name = name;
|
||||
this.prefixes = prefixes;
|
||||
this.all = all;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find prefix in node parents
|
||||
*/
|
||||
|
||||
|
||||
Prefixer.prototype.parentPrefix = function parentPrefix(node) {
|
||||
var prefix = void 0;
|
||||
|
||||
if (typeof node._autoprefixerPrefix !== 'undefined') {
|
||||
prefix = node._autoprefixerPrefix;
|
||||
} else if (node.type === 'decl' && node.prop[0] === '-') {
|
||||
prefix = vendor.prefix(node.prop);
|
||||
} else if (node.type === 'root') {
|
||||
prefix = false;
|
||||
} else if (node.type === 'rule' && node.selector.indexOf(':-') !== -1 && /:(-\w+-)/.test(node.selector)) {
|
||||
prefix = node.selector.match(/:(-\w+-)/)[1];
|
||||
} else if (node.type === 'atrule' && node.name[0] === '-') {
|
||||
prefix = vendor.prefix(node.name);
|
||||
} else {
|
||||
prefix = this.parentPrefix(node.parent);
|
||||
}
|
||||
|
||||
if (Browsers.prefixes().indexOf(prefix) === -1) {
|
||||
prefix = false;
|
||||
}
|
||||
|
||||
node._autoprefixerPrefix = prefix;
|
||||
|
||||
return node._autoprefixerPrefix;
|
||||
};
|
||||
|
||||
/**
|
||||
* Clone node with prefixes
|
||||
*/
|
||||
|
||||
|
||||
Prefixer.prototype.process = function process(node, result) {
|
||||
if (!this.check(node)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var parent = this.parentPrefix(node);
|
||||
|
||||
var prefixes = this.prefixes.filter(function (prefix) {
|
||||
return !parent || parent === utils.removeNote(prefix);
|
||||
});
|
||||
|
||||
var added = [];
|
||||
for (var _iterator2 = prefixes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var prefix = _ref2;
|
||||
|
||||
if (this.add(node, prefix, added.concat([prefix]), result)) {
|
||||
added.push(prefix);
|
||||
}
|
||||
}
|
||||
|
||||
return added;
|
||||
};
|
||||
|
||||
/**
|
||||
* Shortcut for Prefixer.clone
|
||||
*/
|
||||
|
||||
|
||||
Prefixer.prototype.clone = function clone(node, overrides) {
|
||||
return Prefixer.clone(node, overrides);
|
||||
};
|
||||
|
||||
return Prefixer;
|
||||
}();
|
||||
|
||||
module.exports = Prefixer;
|
||||
510
build/node_modules/autoprefixer/lib/prefixes.js
generated
vendored
Normal file
510
build/node_modules/autoprefixer/lib/prefixes.js
generated
vendored
Normal file
@@ -0,0 +1,510 @@
|
||||
'use strict';
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
var Declaration = require('./declaration');
|
||||
var Resolution = require('./resolution');
|
||||
var Transition = require('./transition');
|
||||
var Processor = require('./processor');
|
||||
var Supports = require('./supports');
|
||||
var Browsers = require('./browsers');
|
||||
var Selector = require('./selector');
|
||||
var AtRule = require('./at-rule');
|
||||
var Value = require('./value');
|
||||
var utils = require('./utils');
|
||||
|
||||
var 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/animation'));
|
||||
Declaration.hack(require('./hacks/flex-flow'));
|
||||
Declaration.hack(require('./hacks/flex-grow'));
|
||||
Declaration.hack(require('./hacks/flex-wrap'));
|
||||
Declaration.hack(require('./hacks/grid-area'));
|
||||
Declaration.hack(require('./hacks/grid-start'));
|
||||
Declaration.hack(require('./hacks/align-self'));
|
||||
Declaration.hack(require('./hacks/appearance'));
|
||||
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/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/text-decoration'));
|
||||
Declaration.hack(require('./hacks/justify-content'));
|
||||
Declaration.hack(require('./hacks/background-size'));
|
||||
Declaration.hack(require('./hacks/grid-row-column'));
|
||||
Declaration.hack(require('./hacks/grid-rows-columns'));
|
||||
Declaration.hack(require('./hacks/grid-column-align'));
|
||||
Declaration.hack(require('./hacks/grid-template-areas'));
|
||||
Declaration.hack(require('./hacks/text-emphasis-position'));
|
||||
|
||||
Value.hack(require('./hacks/gradient'));
|
||||
Value.hack(require('./hacks/intrinsic'));
|
||||
Value.hack(require('./hacks/pixelated'));
|
||||
Value.hack(require('./hacks/image-set'));
|
||||
Value.hack(require('./hacks/cross-fade'));
|
||||
Value.hack(require('./hacks/display-flex'));
|
||||
Value.hack(require('./hacks/display-grid'));
|
||||
Value.hack(require('./hacks/filter-value'));
|
||||
|
||||
var declsCache = {};
|
||||
|
||||
var Prefixes = function () {
|
||||
function Prefixes(data, browsers) {
|
||||
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||||
|
||||
_classCallCheck(this, Prefixes);
|
||||
|
||||
this.data = data;
|
||||
this.browsers = browsers;
|
||||
this.options = options;
|
||||
|
||||
var _preprocess = this.preprocess(this.select(this.data));
|
||||
|
||||
this.add = _preprocess[0];
|
||||
this.remove = _preprocess[1];
|
||||
|
||||
this.transition = new Transition(this);
|
||||
this.processor = new Processor(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return clone instance to remove all prefixes
|
||||
*/
|
||||
|
||||
|
||||
Prefixes.prototype.cleaner = function cleaner() {
|
||||
if (this.cleanerCache) {
|
||||
return this.cleanerCache;
|
||||
}
|
||||
|
||||
if (this.browsers.selected.length) {
|
||||
var empty = new Browsers(this.browsers.data, []);
|
||||
this.cleanerCache = new Prefixes(this.data, empty, this.options);
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
|
||||
return this.cleanerCache;
|
||||
};
|
||||
|
||||
/**
|
||||
* Select prefixes from data, which is necessary for selected browsers
|
||||
*/
|
||||
|
||||
|
||||
Prefixes.prototype.select = function select(list) {
|
||||
var _this = this;
|
||||
|
||||
var selected = { add: {}, remove: {} };
|
||||
|
||||
var _loop = function _loop(name) {
|
||||
var data = list[name];
|
||||
var add = data.browsers.map(function (i) {
|
||||
var params = i.split(' ');
|
||||
return {
|
||||
browser: params[0] + ' ' + params[1],
|
||||
note: params[2]
|
||||
};
|
||||
});
|
||||
|
||||
var notes = add.filter(function (i) {
|
||||
return i.note;
|
||||
}).map(function (i) {
|
||||
return _this.browsers.prefix(i.browser) + ' ' + i.note;
|
||||
});
|
||||
notes = utils.uniq(notes);
|
||||
|
||||
add = add.filter(function (i) {
|
||||
return _this.browsers.isSelected(i.browser);
|
||||
}).map(function (i) {
|
||||
var prefix = _this.browsers.prefix(i.browser);
|
||||
if (i.note) {
|
||||
return prefix + ' ' + i.note;
|
||||
} else {
|
||||
return prefix;
|
||||
}
|
||||
});
|
||||
add = _this.sort(utils.uniq(add));
|
||||
|
||||
if (_this.options.flexbox === 'no-2009') {
|
||||
add = add.filter(function (i) {
|
||||
return i.indexOf('2009') === -1;
|
||||
});
|
||||
}
|
||||
|
||||
var all = data.browsers.map(function (i) {
|
||||
return _this.browsers.prefix(i);
|
||||
});
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
||||
for (var name in list) {
|
||||
_loop(name);
|
||||
}
|
||||
|
||||
return selected;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sort vendor prefixes
|
||||
*/
|
||||
|
||||
|
||||
Prefixes.prototype.sort = function sort(prefixes) {
|
||||
return prefixes.sort(function (a, b) {
|
||||
var aLength = utils.removeNote(a).length;
|
||||
var bLength = utils.removeNote(b).length;
|
||||
|
||||
if (aLength === bLength) {
|
||||
return b.length - a.length;
|
||||
} else {
|
||||
return bLength - aLength;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Cache prefixes data to fast CSS processing
|
||||
*/
|
||||
|
||||
|
||||
Prefixes.prototype.preprocess = function preprocess(selected) {
|
||||
var add = {
|
||||
'selectors': [],
|
||||
'@supports': new Supports(Prefixes, this)
|
||||
};
|
||||
for (var name in selected.add) {
|
||||
var prefixes = selected.add[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 {
|
||||
var props = this.data[name].props;
|
||||
|
||||
if (props) {
|
||||
var value = Value.load(name, prefixes, this);
|
||||
for (var _iterator = props, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var prop = _ref;
|
||||
|
||||
if (!add[prop]) {
|
||||
add[prop] = { values: [] };
|
||||
}
|
||||
add[prop].values.push(value);
|
||||
}
|
||||
} else {
|
||||
var values = add[name] && add[name].values || [];
|
||||
add[name] = Declaration.load(name, prefixes, this);
|
||||
add[name].values = values;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var remove = { selectors: [] };
|
||||
for (var _name in selected.remove) {
|
||||
var _prefixes = selected.remove[_name];
|
||||
if (this.data[_name].selector) {
|
||||
var selector = Selector.load(_name, _prefixes);
|
||||
for (var _iterator2 = _prefixes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var prefix = _ref2;
|
||||
|
||||
remove.selectors.push(selector.old(prefix));
|
||||
}
|
||||
} else if (_name === '@keyframes' || _name === '@viewport') {
|
||||
for (var _iterator3 = _prefixes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
|
||||
var _ref3;
|
||||
|
||||
if (_isArray3) {
|
||||
if (_i3 >= _iterator3.length) break;
|
||||
_ref3 = _iterator3[_i3++];
|
||||
} else {
|
||||
_i3 = _iterator3.next();
|
||||
if (_i3.done) break;
|
||||
_ref3 = _i3.value;
|
||||
}
|
||||
|
||||
var _prefix = _ref3;
|
||||
|
||||
var prefixed = '@' + _prefix + _name.slice(1);
|
||||
remove[prefixed] = { remove: true };
|
||||
}
|
||||
} else if (_name === '@resolution') {
|
||||
remove[_name] = new Resolution(_name, _prefixes, this);
|
||||
} else {
|
||||
var _props = this.data[_name].props;
|
||||
if (_props) {
|
||||
var _value = Value.load(_name, [], this);
|
||||
for (var _iterator4 = _prefixes, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
|
||||
var _ref4;
|
||||
|
||||
if (_isArray4) {
|
||||
if (_i4 >= _iterator4.length) break;
|
||||
_ref4 = _iterator4[_i4++];
|
||||
} else {
|
||||
_i4 = _iterator4.next();
|
||||
if (_i4.done) break;
|
||||
_ref4 = _i4.value;
|
||||
}
|
||||
|
||||
var _prefix2 = _ref4;
|
||||
|
||||
var old = _value.old(_prefix2);
|
||||
if (old) {
|
||||
for (var _iterator5 = _props, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
|
||||
var _ref5;
|
||||
|
||||
if (_isArray5) {
|
||||
if (_i5 >= _iterator5.length) break;
|
||||
_ref5 = _iterator5[_i5++];
|
||||
} else {
|
||||
_i5 = _iterator5.next();
|
||||
if (_i5.done) break;
|
||||
_ref5 = _i5.value;
|
||||
}
|
||||
|
||||
var _prop = _ref5;
|
||||
|
||||
if (!remove[_prop]) {
|
||||
remove[_prop] = {};
|
||||
}
|
||||
if (!remove[_prop].values) {
|
||||
remove[_prop].values = [];
|
||||
}
|
||||
remove[_prop].values.push(old);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (var _iterator6 = _prefixes, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
|
||||
var _ref6;
|
||||
|
||||
if (_isArray6) {
|
||||
if (_i6 >= _iterator6.length) break;
|
||||
_ref6 = _iterator6[_i6++];
|
||||
} else {
|
||||
_i6 = _iterator6.next();
|
||||
if (_i6.done) break;
|
||||
_ref6 = _i6.value;
|
||||
}
|
||||
|
||||
var _prefix3 = _ref6;
|
||||
|
||||
var olds = this.decl(_name).old(_name, _prefix3);
|
||||
if (_name === 'align-self') {
|
||||
var a = add[_name] && add[_name].prefixes;
|
||||
if (a) {
|
||||
if (_prefix3 === '-webkit- 2009' && a.indexOf('-webkit-') !== -1) {
|
||||
continue;
|
||||
} else if (_prefix3 === '-webkit-' && a.indexOf('-webkit- 2009') !== -1) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var _iterator7 = olds, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) {
|
||||
var _ref7;
|
||||
|
||||
if (_isArray7) {
|
||||
if (_i7 >= _iterator7.length) break;
|
||||
_ref7 = _iterator7[_i7++];
|
||||
} else {
|
||||
_i7 = _iterator7.next();
|
||||
if (_i7.done) break;
|
||||
_ref7 = _i7.value;
|
||||
}
|
||||
|
||||
var _prefixed = _ref7;
|
||||
|
||||
if (!remove[_prefixed]) {
|
||||
remove[_prefixed] = {};
|
||||
}
|
||||
remove[_prefixed].remove = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [add, remove];
|
||||
};
|
||||
|
||||
/**
|
||||
* Declaration loader with caching
|
||||
*/
|
||||
|
||||
|
||||
Prefixes.prototype.decl = function decl(prop) {
|
||||
var decl = declsCache[prop];
|
||||
|
||||
if (decl) {
|
||||
return decl;
|
||||
} else {
|
||||
declsCache[prop] = Declaration.load(prop);
|
||||
return declsCache[prop];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Return unprefixed version of property
|
||||
*/
|
||||
|
||||
|
||||
Prefixes.prototype.unprefixed = function unprefixed(prop) {
|
||||
var value = this.normalize(vendor.unprefixed(prop));
|
||||
if (value === 'flex-direction') {
|
||||
value = 'flex-flow';
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Normalize prefix for remover
|
||||
*/
|
||||
|
||||
|
||||
Prefixes.prototype.normalize = function normalize(prop) {
|
||||
return this.decl(prop).normalize(prop);
|
||||
};
|
||||
|
||||
/**
|
||||
* Return prefixed version of property
|
||||
*/
|
||||
|
||||
|
||||
Prefixes.prototype.prefixed = function prefixed(prop, prefix) {
|
||||
prop = vendor.unprefixed(prop);
|
||||
return this.decl(prop).prefixed(prop, prefix);
|
||||
};
|
||||
|
||||
/**
|
||||
* Return values, which must be prefixed in selected property
|
||||
*/
|
||||
|
||||
|
||||
Prefixes.prototype.values = function values(type, prop) {
|
||||
var data = this[type];
|
||||
|
||||
var global = data['*'] && data['*'].values;
|
||||
var values = data[prop] && data[prop].values;
|
||||
|
||||
if (global && values) {
|
||||
return utils.uniq(global.concat(values));
|
||||
} else {
|
||||
return global || values || [];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Group declaration by unprefixed property to check them
|
||||
*/
|
||||
|
||||
|
||||
Prefixes.prototype.group = function group(decl) {
|
||||
var _this2 = this;
|
||||
|
||||
var rule = decl.parent;
|
||||
var index = rule.index(decl);
|
||||
var length = rule.nodes.length;
|
||||
|
||||
var unprefixed = this.unprefixed(decl.prop);
|
||||
|
||||
var checker = function checker(step, callback) {
|
||||
index += step;
|
||||
while (index >= 0 && index < length) {
|
||||
var other = rule.nodes[index];
|
||||
if (other.type === 'decl') {
|
||||
|
||||
if (step === -1 && other.prop === unprefixed) {
|
||||
if (!Browsers.withPrefix(other.value)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (_this2.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;
|
||||
};
|
||||
|
||||
return {
|
||||
up: function up(callback) {
|
||||
return checker(-1, callback);
|
||||
},
|
||||
down: function down(callback) {
|
||||
return checker(+1, callback);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
return Prefixes;
|
||||
}();
|
||||
|
||||
module.exports = Prefixes;
|
||||
438
build/node_modules/autoprefixer/lib/processor.js
generated
vendored
Normal file
438
build/node_modules/autoprefixer/lib/processor.js
generated
vendored
Normal file
@@ -0,0 +1,438 @@
|
||||
'use strict';
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
var Value = require('./value');
|
||||
|
||||
var OLD_LINEAR = /(^|[^-])linear-gradient\(\s*(top|left|right|bottom)/i;
|
||||
var OLD_RADIAL = /(^|[^-])radial-gradient\(\s*\d+(\w*|%)\s+\d+(\w*|%)\s*,/i;
|
||||
|
||||
var 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'];
|
||||
|
||||
var Processor = function () {
|
||||
function Processor(prefixes) {
|
||||
_classCallCheck(this, Processor);
|
||||
|
||||
this.prefixes = prefixes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add necessary prefixes
|
||||
*/
|
||||
|
||||
|
||||
Processor.prototype.add = function add(css, result) {
|
||||
var _this = this;
|
||||
|
||||
// At-rules
|
||||
var resolution = this.prefixes.add['@resolution'];
|
||||
var keyframes = this.prefixes.add['@keyframes'];
|
||||
var viewport = this.prefixes.add['@viewport'];
|
||||
var supports = this.prefixes.add['@supports'];
|
||||
|
||||
css.walkAtRules(function (rule) {
|
||||
if (rule.name === 'keyframes') {
|
||||
if (!_this.disabled(rule, result)) {
|
||||
return keyframes && keyframes.process(rule);
|
||||
}
|
||||
} else if (rule.name === 'viewport') {
|
||||
if (!_this.disabled(rule, result)) {
|
||||
return viewport && viewport.process(rule);
|
||||
}
|
||||
} else if (rule.name === 'supports') {
|
||||
if (_this.prefixes.options.supports !== false && !_this.disabled(rule, result)) {
|
||||
return supports.process(rule);
|
||||
}
|
||||
} else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) {
|
||||
if (!_this.disabled(rule, result)) {
|
||||
return resolution && resolution.process(rule);
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
});
|
||||
|
||||
// Selectors
|
||||
css.walkRules(function (rule) {
|
||||
if (_this.disabled(rule, result)) return undefined;
|
||||
|
||||
return _this.prefixes.add.selectors.map(function (selector) {
|
||||
return selector.process(rule, result);
|
||||
});
|
||||
});
|
||||
|
||||
css.walkDecls(function (decl) {
|
||||
if (_this.disabledDecl(decl, result)) return undefined;
|
||||
|
||||
if (decl.prop === 'display' && decl.value === 'box') {
|
||||
result.warn('You should write display: flex by final spec ' + 'instead of display: box', { node: decl });
|
||||
return undefined;
|
||||
}
|
||||
if (decl.value.indexOf('linear-gradient') !== -1) {
|
||||
if (OLD_LINEAR.test(decl.value)) {
|
||||
result.warn('Gradient has outdated direction syntax. ' + 'New syntax is like `to left` instead of `right`.', { node: decl });
|
||||
}
|
||||
}
|
||||
if (decl.value.indexOf('radial-gradient') !== -1) {
|
||||
if (OLD_RADIAL.test(decl.value)) {
|
||||
result.warn('Gradient has outdated direction syntax. ' + 'New syntax is like `closest-side at 0 0` ' + 'instead of `0 0, closest-side`.', { node: decl });
|
||||
} else if (/[^-]cover/.test(decl.value)) {
|
||||
result.warn('Gradient has outdated direction syntax. ' + 'Replace `cover` to `farthest-corner`.', { node: decl });
|
||||
} else if (/[^-]contain/.test(decl.value)) {
|
||||
result.warn('Gradient has outdated direction syntax. ' + 'Replace `contain` to `closest-side`.', { 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 });
|
||||
}
|
||||
}
|
||||
|
||||
var prefixer = void 0;
|
||||
|
||||
if (decl.prop === 'transition' || decl.prop === 'transition-property') {
|
||||
// Transition
|
||||
return _this.prefixes.transition.add(decl, result);
|
||||
} else if (decl.prop === 'align-self') {
|
||||
// align-self flexbox or grid
|
||||
var 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, result);
|
||||
}
|
||||
}
|
||||
} else if (decl.prop === 'justify-self') {
|
||||
// justify-self flexbox or grid
|
||||
var _display = _this.displayType(decl);
|
||||
if (_display !== 'flex' && _this.prefixes.options.grid !== false) {
|
||||
prefixer = _this.prefixes.add['grid-column-align'];
|
||||
if (prefixer && prefixer.prefixes) {
|
||||
return prefixer.process(decl, result);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Properties
|
||||
prefixer = _this.prefixes.add[decl.prop];
|
||||
if (prefixer && prefixer.prefixes) {
|
||||
return prefixer.process(decl, result);
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
});
|
||||
|
||||
// Values
|
||||
return css.walkDecls(function (decl) {
|
||||
if (_this.disabledValue(decl, result)) return;
|
||||
|
||||
var unprefixed = _this.prefixes.unprefixed(decl.prop);
|
||||
for (var _iterator = _this.prefixes.values('add', unprefixed), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var value = _ref;
|
||||
|
||||
value.process(decl, result);
|
||||
}
|
||||
Value.save(_this.prefixes, decl);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove unnecessary pefixes
|
||||
*/
|
||||
|
||||
|
||||
Processor.prototype.remove = function remove(css, result) {
|
||||
var _this2 = this;
|
||||
|
||||
// At-rules
|
||||
var resolution = this.prefixes.remove['@resolution'];
|
||||
|
||||
css.walkAtRules(function (rule, i) {
|
||||
if (_this2.prefixes.remove['@' + rule.name]) {
|
||||
if (!_this2.disabled(rule, result)) {
|
||||
rule.parent.removeChild(i);
|
||||
}
|
||||
} else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1 && resolution) {
|
||||
resolution.clean(rule);
|
||||
}
|
||||
});
|
||||
|
||||
// Selectors
|
||||
|
||||
var _loop = function _loop(checker) {
|
||||
css.walkRules(function (rule, i) {
|
||||
if (checker.check(rule)) {
|
||||
if (!_this2.disabled(rule, result)) {
|
||||
rule.parent.removeChild(i);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
for (var _iterator2 = this.prefixes.remove.selectors, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var checker = _ref2;
|
||||
|
||||
_loop(checker);
|
||||
}
|
||||
|
||||
return css.walkDecls(function (decl, i) {
|
||||
if (_this2.disabled(decl, result)) return;
|
||||
|
||||
var rule = decl.parent;
|
||||
var unprefixed = _this2.prefixes.unprefixed(decl.prop);
|
||||
|
||||
// Transition
|
||||
if (decl.prop === 'transition' || decl.prop === 'transition-property') {
|
||||
_this2.prefixes.transition.remove(decl);
|
||||
}
|
||||
|
||||
// Properties
|
||||
if (_this2.prefixes.remove[decl.prop] && _this2.prefixes.remove[decl.prop].remove) {
|
||||
var notHack = _this2.prefixes.group(decl).down(function (other) {
|
||||
return _this2.prefixes.normalize(other.prop) === unprefixed;
|
||||
});
|
||||
|
||||
if (unprefixed === 'flex-flow') {
|
||||
notHack = true;
|
||||
}
|
||||
|
||||
if (notHack && !_this2.withHackValue(decl)) {
|
||||
if (decl.raw('before').indexOf('\n') > -1) {
|
||||
_this2.reduceSpaces(decl);
|
||||
}
|
||||
rule.removeChild(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Values
|
||||
for (var _iterator3 = _this2.prefixes.values('remove', unprefixed), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
|
||||
var _ref3;
|
||||
|
||||
if (_isArray3) {
|
||||
if (_i3 >= _iterator3.length) break;
|
||||
_ref3 = _iterator3[_i3++];
|
||||
} else {
|
||||
_i3 = _iterator3.next();
|
||||
if (_i3.done) break;
|
||||
_ref3 = _i3.value;
|
||||
}
|
||||
|
||||
var checker = _ref3;
|
||||
|
||||
if (!checker.check(decl.value)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
unprefixed = checker.unprefixed;
|
||||
var _notHack = _this2.prefixes.group(decl).down(function (other) {
|
||||
return other.value.indexOf(unprefixed) !== -1;
|
||||
});
|
||||
|
||||
if (_notHack) {
|
||||
rule.removeChild(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Some rare old values, which is not in standard
|
||||
*/
|
||||
|
||||
|
||||
Processor.prototype.withHackValue = function withHackValue(decl) {
|
||||
return decl.prop === '-webkit-background-clip' && decl.value === 'text';
|
||||
};
|
||||
|
||||
/**
|
||||
* Check for grid/flexbox options.
|
||||
*/
|
||||
|
||||
|
||||
Processor.prototype.disabledValue = function disabledValue(node, result) {
|
||||
if (this.prefixes.options.grid === false && node.type === 'decl') {
|
||||
if (node.prop === 'display' && node.value.indexOf('grid') !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (this.prefixes.options.flexbox === false && node.type === 'decl') {
|
||||
if (node.prop === 'display' && node.value.indexOf('flex') !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return this.disabled(node, result);
|
||||
};
|
||||
|
||||
/**
|
||||
* Check for grid/flexbox options.
|
||||
*/
|
||||
|
||||
|
||||
Processor.prototype.disabledDecl = function disabledDecl(node, result) {
|
||||
if (this.prefixes.options.grid === false && node.type === 'decl') {
|
||||
if (node.prop.indexOf('grid') !== -1 || node.prop === 'justify-items') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (this.prefixes.options.flexbox === false && node.type === 'decl') {
|
||||
var other = ['order', 'justify-content', 'align-items', 'align-content'];
|
||||
if (node.prop.indexOf('flex') !== -1 || other.indexOf(node.prop) !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return this.disabled(node, result);
|
||||
};
|
||||
|
||||
/**
|
||||
* Check for control comment and global options
|
||||
*/
|
||||
|
||||
|
||||
Processor.prototype.disabled = function disabled(node, result) {
|
||||
if (!node) return false;
|
||||
if (node._autoprefixerDisabled !== undefined) {
|
||||
return node._autoprefixerDisabled;
|
||||
}
|
||||
|
||||
if (node.nodes) {
|
||||
var status = undefined;
|
||||
node.each(function (i) {
|
||||
if (i.type !== 'comment') return;
|
||||
if (/(!\s*)?autoprefixer:\s*(off|on)/i.test(i.text)) {
|
||||
if (typeof status !== 'undefined') {
|
||||
result.warn('Second Autoprefixer control comment ' + 'was ignored. Autoprefixer applies control ' + 'comment to whole block, not to next rules.', { node: i });
|
||||
} else {
|
||||
status = /on/i.test(i.text);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var value = false;
|
||||
if (status !== undefined) {
|
||||
value = !status;
|
||||
} else if (node.parent) {
|
||||
value = this.disabled(node.parent, result);
|
||||
}
|
||||
|
||||
node._autoprefixerDisabled = value;
|
||||
return node._autoprefixerDisabled;
|
||||
} else {
|
||||
node._autoprefixerDisabled = this.disabled(node.parent, result);
|
||||
return node._autoprefixerDisabled;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Normalize spaces in cascade declaration group
|
||||
*/
|
||||
|
||||
|
||||
Processor.prototype.reduceSpaces = function reduceSpaces(decl) {
|
||||
var stop = false;
|
||||
this.prefixes.group(decl).up(function () {
|
||||
stop = true;
|
||||
return true;
|
||||
});
|
||||
if (stop) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parts = decl.raw('before').split('\n');
|
||||
var prevMin = parts[parts.length - 1].length;
|
||||
var diff = false;
|
||||
|
||||
this.prefixes.group(decl).down(function (other) {
|
||||
parts = other.raw('before').split('\n');
|
||||
var last = parts.length - 1;
|
||||
|
||||
if (parts[last].length > prevMin) {
|
||||
if (diff === false) {
|
||||
diff = parts[last].length - prevMin;
|
||||
}
|
||||
|
||||
parts[last] = parts[last].slice(0, -diff);
|
||||
other.raws.before = parts.join('\n');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Is it flebox or grid rule
|
||||
*/
|
||||
|
||||
|
||||
Processor.prototype.displayType = function displayType(decl) {
|
||||
for (var _iterator4 = decl.parent.nodes, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
|
||||
var _ref4;
|
||||
|
||||
if (_isArray4) {
|
||||
if (_i4 >= _iterator4.length) break;
|
||||
_ref4 = _iterator4[_i4++];
|
||||
} else {
|
||||
_i4 = _iterator4.next();
|
||||
if (_i4.done) break;
|
||||
_ref4 = _i4.value;
|
||||
}
|
||||
|
||||
var i = _ref4;
|
||||
|
||||
if (i.prop !== 'display') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i.value.indexOf('flex') !== -1) {
|
||||
return 'flex';
|
||||
}
|
||||
|
||||
if (i.value.indexOf('grid') !== -1) {
|
||||
return 'grid';
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
return Processor;
|
||||
}();
|
||||
|
||||
module.exports = Processor;
|
||||
154
build/node_modules/autoprefixer/lib/resolution.js
generated
vendored
Normal file
154
build/node_modules/autoprefixer/lib/resolution.js
generated
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Prefixer = require('./prefixer');
|
||||
var utils = require('./utils');
|
||||
|
||||
var n2f = require('num2fraction');
|
||||
|
||||
var regexp = /(min|max)-resolution\s*:\s*\d*\.?\d+(dppx|dpi)/gi;
|
||||
var split = /(min|max)-resolution(\s*:\s*)(\d*\.?\d+)(dppx|dpi)/i;
|
||||
|
||||
var Resolution = function (_Prefixer) {
|
||||
_inherits(Resolution, _Prefixer);
|
||||
|
||||
function Resolution() {
|
||||
_classCallCheck(this, Resolution);
|
||||
|
||||
return _possibleConstructorReturn(this, _Prefixer.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return prefixed query name
|
||||
*/
|
||||
Resolution.prototype.prefixName = function prefixName(prefix, name) {
|
||||
var newName = prefix === '-moz-' ? name + '--moz-device-pixel-ratio' : prefix + name + '-device-pixel-ratio';
|
||||
return newName;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return prefixed query
|
||||
*/
|
||||
|
||||
|
||||
Resolution.prototype.prefixQuery = function prefixQuery(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;
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove prefixed queries
|
||||
*/
|
||||
|
||||
|
||||
Resolution.prototype.clean = function clean(rule) {
|
||||
var _this2 = this;
|
||||
|
||||
if (!this.bad) {
|
||||
this.bad = [];
|
||||
for (var _iterator = this.prefixes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var prefix = _ref;
|
||||
|
||||
this.bad.push(this.prefixName(prefix, 'min'));
|
||||
this.bad.push(this.prefixName(prefix, 'max'));
|
||||
}
|
||||
}
|
||||
|
||||
rule.params = utils.editList(rule.params, function (queries) {
|
||||
return queries.filter(function (query) {
|
||||
return _this2.bad.every(function (i) {
|
||||
return query.indexOf(i) === -1;
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Add prefixed queries
|
||||
*/
|
||||
|
||||
|
||||
Resolution.prototype.process = function process(rule) {
|
||||
var _this3 = this;
|
||||
|
||||
var parent = this.parentPrefix(rule);
|
||||
var prefixes = parent ? [parent] : this.prefixes;
|
||||
|
||||
rule.params = utils.editList(rule.params, function (origin, prefixed) {
|
||||
for (var _iterator2 = origin, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var query = _ref2;
|
||||
|
||||
if (query.indexOf('min-resolution') === -1 && query.indexOf('max-resolution') === -1) {
|
||||
prefixed.push(query);
|
||||
continue;
|
||||
}
|
||||
|
||||
var _loop = function _loop(prefix) {
|
||||
var processed = query.replace(regexp, function (str) {
|
||||
var parts = str.match(split);
|
||||
return _this3.prefixQuery(prefix, parts[1], parts[2], parts[3], parts[4]);
|
||||
});
|
||||
prefixed.push(processed);
|
||||
};
|
||||
|
||||
for (var _iterator3 = prefixes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
|
||||
var _ref3;
|
||||
|
||||
if (_isArray3) {
|
||||
if (_i3 >= _iterator3.length) break;
|
||||
_ref3 = _iterator3[_i3++];
|
||||
} else {
|
||||
_i3 = _iterator3.next();
|
||||
if (_i3.done) break;
|
||||
_ref3 = _i3.value;
|
||||
}
|
||||
|
||||
var prefix = _ref3;
|
||||
|
||||
_loop(prefix);
|
||||
}
|
||||
prefixed.push(query);
|
||||
}
|
||||
|
||||
return utils.uniq(prefixed);
|
||||
});
|
||||
};
|
||||
|
||||
return Resolution;
|
||||
}(Prefixer);
|
||||
|
||||
module.exports = Resolution;
|
||||
180
build/node_modules/autoprefixer/lib/selector.js
generated
vendored
Normal file
180
build/node_modules/autoprefixer/lib/selector.js
generated
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var OldSelector = require('./old-selector');
|
||||
var Prefixer = require('./prefixer');
|
||||
var Browsers = require('./browsers');
|
||||
var utils = require('./utils');
|
||||
|
||||
var Selector = function (_Prefixer) {
|
||||
_inherits(Selector, _Prefixer);
|
||||
|
||||
function Selector(name, prefixes, all) {
|
||||
_classCallCheck(this, Selector);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, _Prefixer.call(this, name, prefixes, all));
|
||||
|
||||
_this.regexpCache = {};
|
||||
return _this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is rule selectors need to be prefixed
|
||||
*/
|
||||
|
||||
|
||||
Selector.prototype.check = function check(rule) {
|
||||
if (rule.selector.indexOf(this.name) !== -1) {
|
||||
return !!rule.selector.match(this.regexp());
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return prefixed version of selector
|
||||
*/
|
||||
|
||||
|
||||
Selector.prototype.prefixed = function prefixed(prefix) {
|
||||
return this.name.replace(/^([^\w]*)/, '$1' + prefix);
|
||||
};
|
||||
|
||||
/**
|
||||
* Lazy loadRegExp for name
|
||||
*/
|
||||
|
||||
|
||||
Selector.prototype.regexp = function regexp(prefix) {
|
||||
if (this.regexpCache[prefix]) {
|
||||
return this.regexpCache[prefix];
|
||||
}
|
||||
|
||||
var name = prefix ? this.prefixed(prefix) : this.name;
|
||||
this.regexpCache[prefix] = new RegExp('(^|[^:"\'=])' + utils.escapeRegexp(name), 'gi');
|
||||
return this.regexpCache[prefix];
|
||||
};
|
||||
|
||||
/**
|
||||
* All possible prefixes
|
||||
*/
|
||||
|
||||
|
||||
Selector.prototype.possible = function possible() {
|
||||
return Browsers.prefixes();
|
||||
};
|
||||
|
||||
/**
|
||||
* Return all possible selector prefixes
|
||||
*/
|
||||
|
||||
|
||||
Selector.prototype.prefixeds = function prefixeds(rule) {
|
||||
if (rule._autoprefixerPrefixeds) {
|
||||
return rule._autoprefixerPrefixeds;
|
||||
}
|
||||
|
||||
var prefixeds = {};
|
||||
for (var _iterator = this.possible(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var prefix = _ref;
|
||||
|
||||
prefixeds[prefix] = this.replace(rule.selector, prefix);
|
||||
}
|
||||
|
||||
rule._autoprefixerPrefixeds = prefixeds;
|
||||
return rule._autoprefixerPrefixeds;
|
||||
};
|
||||
|
||||
/**
|
||||
* Is rule already prefixed before
|
||||
*/
|
||||
|
||||
|
||||
Selector.prototype.already = function already(rule, prefixeds, prefix) {
|
||||
var index = rule.parent.index(rule) - 1;
|
||||
|
||||
while (index >= 0) {
|
||||
var before = rule.parent.nodes[index];
|
||||
|
||||
if (before.type !== 'rule') {
|
||||
return false;
|
||||
}
|
||||
|
||||
var some = false;
|
||||
for (var key in prefixeds) {
|
||||
var prefixed = prefixeds[key];
|
||||
if (before.selector === prefixed) {
|
||||
if (prefix === key) {
|
||||
return true;
|
||||
} else {
|
||||
some = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!some) {
|
||||
return false;
|
||||
}
|
||||
|
||||
index -= 1;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Replace selectors by prefixed one
|
||||
*/
|
||||
|
||||
|
||||
Selector.prototype.replace = function replace(selector, prefix) {
|
||||
return selector.replace(this.regexp(), '$1' + this.prefixed(prefix));
|
||||
};
|
||||
|
||||
/**
|
||||
* Clone and add prefixes for at-rule
|
||||
*/
|
||||
|
||||
|
||||
Selector.prototype.add = function add(rule, prefix) {
|
||||
var prefixeds = this.prefixeds(rule);
|
||||
|
||||
if (this.already(rule, prefixeds, prefix)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var cloned = this.clone(rule, { selector: prefixeds[prefix] });
|
||||
rule.parent.insertBefore(rule, cloned);
|
||||
};
|
||||
|
||||
/**
|
||||
* Return function to fast find prefixed selector
|
||||
*/
|
||||
|
||||
|
||||
Selector.prototype.old = function old(prefix) {
|
||||
return new OldSelector(this, prefix);
|
||||
};
|
||||
|
||||
return Selector;
|
||||
}(Prefixer);
|
||||
|
||||
module.exports = Selector;
|
||||
380
build/node_modules/autoprefixer/lib/supports.js
generated
vendored
Normal file
380
build/node_modules/autoprefixer/lib/supports.js
generated
vendored
Normal file
@@ -0,0 +1,380 @@
|
||||
'use strict';
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
var Browsers = require('./browsers');
|
||||
var brackets = require('./brackets');
|
||||
var Value = require('./value');
|
||||
var utils = require('./utils');
|
||||
|
||||
var postcss = require('postcss');
|
||||
|
||||
var supported = [];
|
||||
var data = require('caniuse-lite').feature(require('caniuse-lite/data/features/css-featurequeries.js'));
|
||||
for (var browser in data.stats) {
|
||||
var versions = data.stats[browser];
|
||||
for (var version in versions) {
|
||||
var support = versions[version];
|
||||
if (/y/.test(support)) {
|
||||
supported.push(browser + ' ' + version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var Supports = function () {
|
||||
function Supports(Prefixes, all) {
|
||||
_classCallCheck(this, Supports);
|
||||
|
||||
this.Prefixes = Prefixes;
|
||||
this.all = all;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return prefixer only with @supports supported browsers
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.prefixer = function prefixer() {
|
||||
if (this.prefixerCache) {
|
||||
return this.prefixerCache;
|
||||
}
|
||||
|
||||
var filtered = this.all.browsers.selected.filter(function (i) {
|
||||
return supported.indexOf(i) !== -1;
|
||||
});
|
||||
|
||||
var browsers = new Browsers(this.all.browsers.data, filtered, this.all.options);
|
||||
this.prefixerCache = new this.Prefixes(this.all.data, browsers, this.all.options);
|
||||
return this.prefixerCache;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse string into declaration property and value
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.parse = function parse(str) {
|
||||
var _str$split = str.split(':'),
|
||||
prop = _str$split[0],
|
||||
value = _str$split[1];
|
||||
|
||||
if (!value) value = '';
|
||||
return [prop.trim(), value.trim()];
|
||||
};
|
||||
|
||||
/**
|
||||
* Create virtual rule to process it by prefixer
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.virtual = function virtual(str) {
|
||||
var _parse = this.parse(str),
|
||||
prop = _parse[0],
|
||||
value = _parse[1];
|
||||
|
||||
var rule = postcss.parse('a{}').first;
|
||||
rule.append({ prop: prop, value: value, raws: { before: '' } });
|
||||
return rule;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return array of Declaration with all necessary prefixes
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.prefixed = function prefixed(str) {
|
||||
var rule = this.virtual(str);
|
||||
if (this.disabled(rule.first)) {
|
||||
return rule.nodes;
|
||||
}
|
||||
|
||||
var prefixer = this.prefixer().add[rule.first.prop];
|
||||
prefixer && prefixer.process && prefixer.process(rule.first);
|
||||
|
||||
for (var _iterator = rule.nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var decl = _ref;
|
||||
|
||||
for (var _iterator2 = this.prefixer().values('add', rule.first.prop), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var value = _ref2;
|
||||
|
||||
value.process(decl);
|
||||
}
|
||||
Value.save(this.all, decl);
|
||||
}
|
||||
|
||||
return rule.nodes;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return true if brackets node is "not" word
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.isNot = function isNot(node) {
|
||||
return typeof node === 'string' && /not\s*/i.test(node);
|
||||
};
|
||||
|
||||
/**
|
||||
* Return true if brackets node is "or" word
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.isOr = function isOr(node) {
|
||||
return typeof node === 'string' && /\s*or\s*/i.test(node);
|
||||
};
|
||||
|
||||
/**
|
||||
* Return true if brackets node is (prop: value)
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.isProp = function isProp(node) {
|
||||
return (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && node.length === 1 && typeof node[0] === 'string';
|
||||
};
|
||||
|
||||
/**
|
||||
* Return true if prefixed property has no unprefixed
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.isHack = function isHack(all, unprefixed) {
|
||||
var check = new RegExp('(\\(|\\s)' + utils.escapeRegexp(unprefixed) + ':');
|
||||
return !check.test(all);
|
||||
};
|
||||
|
||||
/**
|
||||
* Return true if we need to remove node
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.toRemove = function toRemove(str, all) {
|
||||
var _parse2 = this.parse(str),
|
||||
prop = _parse2[0],
|
||||
value = _parse2[1];
|
||||
|
||||
var unprefixed = this.all.unprefixed(prop);
|
||||
|
||||
var cleaner = this.all.cleaner();
|
||||
|
||||
if (cleaner.remove[prop] && cleaner.remove[prop].remove && !this.isHack(all, unprefixed)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (var _iterator3 = cleaner.values('remove', unprefixed), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
|
||||
var _ref3;
|
||||
|
||||
if (_isArray3) {
|
||||
if (_i3 >= _iterator3.length) break;
|
||||
_ref3 = _iterator3[_i3++];
|
||||
} else {
|
||||
_i3 = _iterator3.next();
|
||||
if (_i3.done) break;
|
||||
_ref3 = _i3.value;
|
||||
}
|
||||
|
||||
var checker = _ref3;
|
||||
|
||||
if (checker.check(value)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove all unnecessary prefixes
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.remove = function remove(nodes, all) {
|
||||
var 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);
|
||||
continue;
|
||||
}
|
||||
|
||||
i += 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (_typeof(nodes[i]) === 'object') {
|
||||
nodes[i] = this.remove(nodes[i], all);
|
||||
}
|
||||
|
||||
i += 1;
|
||||
}
|
||||
return nodes;
|
||||
};
|
||||
|
||||
/**
|
||||
* Clean brackets with one child
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.cleanBrackets = function cleanBrackets(nodes) {
|
||||
var _this = this;
|
||||
|
||||
return nodes.map(function (i) {
|
||||
if ((typeof i === 'undefined' ? 'undefined' : _typeof(i)) !== 'object') {
|
||||
return i;
|
||||
}
|
||||
|
||||
if (i.length === 1 && _typeof(i[0]) === 'object') {
|
||||
return _this.cleanBrackets(i[0]);
|
||||
}
|
||||
|
||||
return _this.cleanBrackets(i);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Add " or " between properties and convert it to brackets format
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.convert = function convert(progress) {
|
||||
var result = [''];
|
||||
for (var _iterator4 = progress, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
|
||||
var _ref4;
|
||||
|
||||
if (_isArray4) {
|
||||
if (_i4 >= _iterator4.length) break;
|
||||
_ref4 = _iterator4[_i4++];
|
||||
} else {
|
||||
_i4 = _iterator4.next();
|
||||
if (_i4.done) break;
|
||||
_ref4 = _i4.value;
|
||||
}
|
||||
|
||||
var i = _ref4;
|
||||
|
||||
result.push([i.prop + ': ' + i.value]);
|
||||
result.push(' or ');
|
||||
}
|
||||
result[result.length - 1] = '';
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Compress value functions into a string nodes
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.normalize = function normalize(nodes) {
|
||||
var _this2 = this;
|
||||
|
||||
if ((typeof nodes === 'undefined' ? 'undefined' : _typeof(nodes)) !== 'object') {
|
||||
return nodes;
|
||||
}
|
||||
|
||||
nodes = nodes.filter(function (i) {
|
||||
return i !== '';
|
||||
});
|
||||
if (typeof nodes[0] === 'string' && nodes[0].indexOf(':') !== -1) {
|
||||
return [brackets.stringify(nodes)];
|
||||
}
|
||||
|
||||
return nodes.map(function (i) {
|
||||
return _this2.normalize(i);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Add prefixes
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.add = function add(nodes, all) {
|
||||
var _this3 = this;
|
||||
|
||||
return nodes.map(function (i) {
|
||||
if (_this3.isProp(i)) {
|
||||
var prefixed = _this3.prefixed(i[0]);
|
||||
if (prefixed.length > 1) {
|
||||
return _this3.convert(prefixed);
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
if ((typeof i === 'undefined' ? 'undefined' : _typeof(i)) === 'object') {
|
||||
return _this3.add(i, all);
|
||||
}
|
||||
|
||||
return i;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Add prefixed declaration
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.process = function process(rule) {
|
||||
var 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);
|
||||
rule.params = brackets.stringify(ast);
|
||||
};
|
||||
|
||||
/**
|
||||
* Check global options
|
||||
*/
|
||||
|
||||
|
||||
Supports.prototype.disabled = function disabled(node) {
|
||||
if (!this.all.options.grid) {
|
||||
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;
|
||||
}
|
||||
var 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;
|
||||
446
build/node_modules/autoprefixer/lib/transition.js
generated
vendored
Normal file
446
build/node_modules/autoprefixer/lib/transition.js
generated
vendored
Normal file
@@ -0,0 +1,446 @@
|
||||
'use strict';
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
var parser = require('postcss-value-parser');
|
||||
var vendor = require('postcss/lib/vendor');
|
||||
var list = require('postcss/lib/list');
|
||||
|
||||
var Transition = function () {
|
||||
function Transition(prefixes) {
|
||||
_classCallCheck(this, Transition);
|
||||
|
||||
Object.defineProperty(this, 'props', {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: ['transition', 'transition-property']
|
||||
});
|
||||
|
||||
this.prefixes = prefixes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process transition and add prefies for all necessary properties
|
||||
*/
|
||||
|
||||
|
||||
Transition.prototype.add = function add(decl, result) {
|
||||
var _this = this;
|
||||
|
||||
var prefix = void 0,
|
||||
prop = void 0;
|
||||
var declPrefixes = this.prefixes.add[decl.prop] && this.prefixes.add[decl.prop].prefixes || [];
|
||||
|
||||
var params = this.parse(decl.value);
|
||||
var names = params.map(function (i) {
|
||||
return _this.findProp(i);
|
||||
});
|
||||
var added = [];
|
||||
|
||||
if (names.some(function (i) {
|
||||
return i[0] === '-';
|
||||
})) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var _iterator = params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var param = _ref;
|
||||
|
||||
prop = this.findProp(param);
|
||||
if (prop[0] === '-') continue;
|
||||
|
||||
var prefixer = this.prefixes.add[prop];
|
||||
if (!prefixer || !prefixer.prefixes) continue;
|
||||
|
||||
for (var _iterator3 = prefixer.prefixes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
|
||||
if (_isArray3) {
|
||||
if (_i3 >= _iterator3.length) break;
|
||||
prefix = _iterator3[_i3++];
|
||||
} else {
|
||||
_i3 = _iterator3.next();
|
||||
if (_i3.done) break;
|
||||
prefix = _i3.value;
|
||||
}
|
||||
|
||||
var 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);
|
||||
var value = this.stringify(params);
|
||||
|
||||
var 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) {
|
||||
var operaClean = this.stringify(this.cleanFromUnprefixed(params, '-o-'));
|
||||
this.cloneBefore(decl, '-o-' + decl.prop, operaClean);
|
||||
}
|
||||
|
||||
for (var _iterator2 = declPrefixes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
prefix = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
prefix = _i2.value;
|
||||
}
|
||||
|
||||
if (prefix !== '-webkit-' && prefix !== '-o-') {
|
||||
var 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();
|
||||
decl.value = value;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Find property name
|
||||
*/
|
||||
|
||||
|
||||
Transition.prototype.findProp = function findProp(param) {
|
||||
var prop = param[0].value;
|
||||
if (/^\d/.test(prop)) {
|
||||
for (var i = 0; i < param.length; i++) {
|
||||
var token = param[i];
|
||||
if (i !== 0 && token.type === 'word') {
|
||||
return token.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return prop;
|
||||
};
|
||||
|
||||
/**
|
||||
* Does we aready have this declaration
|
||||
*/
|
||||
|
||||
|
||||
Transition.prototype.already = function already(decl, prop, value) {
|
||||
return decl.parent.some(function (i) {
|
||||
return i.prop === prop && i.value === value;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Add declaration if it is not exist
|
||||
*/
|
||||
|
||||
|
||||
Transition.prototype.cloneBefore = function cloneBefore(decl, prop, value) {
|
||||
if (!this.already(decl, prop, value)) {
|
||||
decl.cloneBefore({ prop: prop, value: value });
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Show transition-property warning
|
||||
*/
|
||||
|
||||
|
||||
Transition.prototype.checkForWarning = function checkForWarning(result, decl) {
|
||||
if (decl.prop !== 'transition-property') {
|
||||
return;
|
||||
}
|
||||
|
||||
decl.parent.each(function (i) {
|
||||
if (i.type !== 'decl') {
|
||||
return undefined;
|
||||
}
|
||||
if (i.prop.indexOf('transition-') !== 0) {
|
||||
return undefined;
|
||||
}
|
||||
if (i.prop === 'transition-property') {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
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;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Process transition and remove all unnecessary properties
|
||||
*/
|
||||
|
||||
|
||||
Transition.prototype.remove = function remove(decl) {
|
||||
var _this2 = this;
|
||||
|
||||
var params = this.parse(decl.value);
|
||||
params = params.filter(function (i) {
|
||||
var prop = _this2.prefixes.remove[_this2.findProp(i)];
|
||||
return !prop || !prop.remove;
|
||||
});
|
||||
var value = this.stringify(params);
|
||||
|
||||
if (decl.value === value) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (params.length === 0) {
|
||||
decl.remove();
|
||||
return;
|
||||
}
|
||||
|
||||
var double = decl.parent.some(function (i) {
|
||||
return i.prop === decl.prop && i.value === value;
|
||||
});
|
||||
var smaller = decl.parent.some(function (i) {
|
||||
return i !== decl && i.prop === decl.prop && i.value.length > value.length;
|
||||
});
|
||||
|
||||
if (double || smaller) {
|
||||
decl.remove();
|
||||
return;
|
||||
}
|
||||
|
||||
decl.value = value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse properties list to array
|
||||
*/
|
||||
|
||||
|
||||
Transition.prototype.parse = function parse(value) {
|
||||
var ast = parser(value);
|
||||
var result = [];
|
||||
var param = [];
|
||||
for (var _iterator4 = ast.nodes, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray4) {
|
||||
if (_i4 >= _iterator4.length) break;
|
||||
_ref2 = _iterator4[_i4++];
|
||||
} else {
|
||||
_i4 = _iterator4.next();
|
||||
if (_i4.done) break;
|
||||
_ref2 = _i4.value;
|
||||
}
|
||||
|
||||
var node = _ref2;
|
||||
|
||||
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;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Return properties string from array
|
||||
*/
|
||||
|
||||
|
||||
Transition.prototype.stringify = function stringify(params) {
|
||||
if (params.length === 0) {
|
||||
return '';
|
||||
}
|
||||
var nodes = [];
|
||||
for (var _iterator5 = params, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
|
||||
var _ref3;
|
||||
|
||||
if (_isArray5) {
|
||||
if (_i5 >= _iterator5.length) break;
|
||||
_ref3 = _iterator5[_i5++];
|
||||
} else {
|
||||
_i5 = _iterator5.next();
|
||||
if (_i5.done) break;
|
||||
_ref3 = _i5.value;
|
||||
}
|
||||
|
||||
var param = _ref3;
|
||||
|
||||
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, +-2 + 1 || undefined);
|
||||
}
|
||||
return parser.stringify({ nodes: nodes });
|
||||
};
|
||||
|
||||
/**
|
||||
* Return new param array with different name
|
||||
*/
|
||||
|
||||
|
||||
Transition.prototype.clone = function clone(origin, name, param) {
|
||||
var result = [];
|
||||
var changed = false;
|
||||
for (var _iterator6 = param, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
|
||||
var _ref4;
|
||||
|
||||
if (_isArray6) {
|
||||
if (_i6 >= _iterator6.length) break;
|
||||
_ref4 = _iterator6[_i6++];
|
||||
} else {
|
||||
_i6 = _iterator6.next();
|
||||
if (_i6.done) break;
|
||||
_ref4 = _i6.value;
|
||||
}
|
||||
|
||||
var i = _ref4;
|
||||
|
||||
if (!changed && i.type === 'word' && i.value === origin) {
|
||||
result.push({ type: 'word', value: name });
|
||||
changed = true;
|
||||
} else {
|
||||
result.push(i);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Find or create seperator
|
||||
*/
|
||||
|
||||
|
||||
Transition.prototype.div = function div(params) {
|
||||
for (var _iterator7 = params, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) {
|
||||
var _ref5;
|
||||
|
||||
if (_isArray7) {
|
||||
if (_i7 >= _iterator7.length) break;
|
||||
_ref5 = _iterator7[_i7++];
|
||||
} else {
|
||||
_i7 = _iterator7.next();
|
||||
if (_i7.done) break;
|
||||
_ref5 = _i7.value;
|
||||
}
|
||||
|
||||
var param = _ref5;
|
||||
|
||||
for (var _iterator8 = param, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) {
|
||||
var _ref6;
|
||||
|
||||
if (_isArray8) {
|
||||
if (_i8 >= _iterator8.length) break;
|
||||
_ref6 = _iterator8[_i8++];
|
||||
} else {
|
||||
_i8 = _iterator8.next();
|
||||
if (_i8.done) break;
|
||||
_ref6 = _i8.value;
|
||||
}
|
||||
|
||||
var node = _ref6;
|
||||
|
||||
if (node.type === 'div' && node.value === ',') {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
}
|
||||
return { type: 'div', value: ',', after: ' ' };
|
||||
};
|
||||
|
||||
Transition.prototype.cleanOtherPrefixes = function cleanOtherPrefixes(params, prefix) {
|
||||
var _this3 = this;
|
||||
|
||||
return params.filter(function (param) {
|
||||
var current = vendor.prefix(_this3.findProp(param));
|
||||
return current === '' || current === prefix;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove all non-webkit prefixes and unprefixed params if we have prefixed
|
||||
*/
|
||||
|
||||
|
||||
Transition.prototype.cleanFromUnprefixed = function cleanFromUnprefixed(params, prefix) {
|
||||
var _this4 = this;
|
||||
|
||||
var remove = params.map(function (i) {
|
||||
return _this4.findProp(i);
|
||||
}).filter(function (i) {
|
||||
return i.slice(0, prefix.length) === prefix;
|
||||
}).map(function (i) {
|
||||
return _this4.prefixes.unprefixed(i);
|
||||
});
|
||||
|
||||
var result = [];
|
||||
for (var _iterator9 = params, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) {
|
||||
var _ref7;
|
||||
|
||||
if (_isArray9) {
|
||||
if (_i9 >= _iterator9.length) break;
|
||||
_ref7 = _iterator9[_i9++];
|
||||
} else {
|
||||
_i9 = _iterator9.next();
|
||||
if (_i9.done) break;
|
||||
_ref7 = _i9.value;
|
||||
}
|
||||
|
||||
var param = _ref7;
|
||||
|
||||
var prop = this.findProp(param);
|
||||
var p = vendor.prefix(prop);
|
||||
if (remove.indexOf(prop) === -1 && (p === prefix || p === '')) {
|
||||
result.push(param);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check property for disabled by option
|
||||
*/
|
||||
|
||||
|
||||
Transition.prototype.disabled = function disabled(prop, prefix) {
|
||||
var 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;
|
||||
}
|
||||
|
||||
if (this.prefixes.options.flexbox === 'no-2009') {
|
||||
return prefix.indexOf('2009') !== -1;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
return Transition;
|
||||
}();
|
||||
|
||||
module.exports = Transition;
|
||||
93
build/node_modules/autoprefixer/lib/utils.js
generated
vendored
Normal file
93
build/node_modules/autoprefixer/lib/utils.js
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
'use strict';
|
||||
|
||||
var list = require('postcss/lib/list');
|
||||
|
||||
module.exports = {
|
||||
|
||||
/**
|
||||
* Throw special error, to tell beniary,
|
||||
* that this error is from Autoprefixer.
|
||||
*/
|
||||
error: function error(text) {
|
||||
var err = new Error(text);
|
||||
err.autoprefixer = true;
|
||||
throw err;
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Return array, that doesn’t contain duplicates.
|
||||
*/
|
||||
uniq: function uniq(array) {
|
||||
var filtered = [];
|
||||
for (var _iterator = array, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var i = _ref;
|
||||
|
||||
if (filtered.indexOf(i) === -1) {
|
||||
filtered.push(i);
|
||||
}
|
||||
}
|
||||
return filtered;
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Return "-webkit-" on "-webkit- old"
|
||||
*/
|
||||
removeNote: function removeNote(string) {
|
||||
if (string.indexOf(' ') === -1) {
|
||||
return string;
|
||||
}
|
||||
|
||||
return string.split(' ')[0];
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Escape RegExp symbols
|
||||
*/
|
||||
escapeRegexp: function escapeRegexp(string) {
|
||||
return string.replace(/[.?*+\^\$\[\]\\(){}|\-]/g, '\\$&');
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Return regexp to check, that CSS string contain word
|
||||
*/
|
||||
regexp: function regexp(word) {
|
||||
var escape = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
||||
|
||||
if (escape) {
|
||||
word = this.escapeRegexp(word);
|
||||
}
|
||||
return new RegExp('(^|[\\s,(])(' + word + '($|[\\s(,]))', 'gi');
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Change comma list
|
||||
*/
|
||||
editList: function editList(value, callback) {
|
||||
var origin = list.comma(value);
|
||||
var changed = callback(origin, []);
|
||||
|
||||
if (origin === changed) {
|
||||
return value;
|
||||
}
|
||||
|
||||
var join = value.match(/,\s*/);
|
||||
join = join ? join[0] : ', ';
|
||||
return changed.join(join);
|
||||
}
|
||||
};
|
||||
163
build/node_modules/autoprefixer/lib/value.js
generated
vendored
Normal file
163
build/node_modules/autoprefixer/lib/value.js
generated
vendored
Normal file
@@ -0,0 +1,163 @@
|
||||
'use strict';
|
||||
|
||||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
||||
|
||||
var Prefixer = require('./prefixer');
|
||||
var OldValue = require('./old-value');
|
||||
var utils = require('./utils');
|
||||
|
||||
var vendor = require('postcss/lib/vendor');
|
||||
|
||||
var Value = function (_Prefixer) {
|
||||
_inherits(Value, _Prefixer);
|
||||
|
||||
function Value() {
|
||||
_classCallCheck(this, Value);
|
||||
|
||||
return _possibleConstructorReturn(this, _Prefixer.apply(this, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone decl for each prefixed values
|
||||
*/
|
||||
Value.save = function save(prefixes, decl) {
|
||||
var _this2 = this;
|
||||
|
||||
var prop = decl.prop;
|
||||
var result = [];
|
||||
|
||||
var _loop = function _loop(prefix) {
|
||||
var value = decl._autoprefixerValues[prefix];
|
||||
|
||||
if (value === decl.value) {
|
||||
return 'continue';
|
||||
}
|
||||
|
||||
var item = void 0;
|
||||
var propPrefix = vendor.prefix(prop);
|
||||
|
||||
if (propPrefix === '-pie-') {
|
||||
return 'continue';
|
||||
}
|
||||
|
||||
if (propPrefix === prefix) {
|
||||
item = decl.value = value;
|
||||
result.push(item);
|
||||
return 'continue';
|
||||
}
|
||||
|
||||
var prefixed = prefixes.prefixed(prop, prefix);
|
||||
var rule = decl.parent;
|
||||
|
||||
if (!rule.every(function (i) {
|
||||
return i.prop !== prefixed;
|
||||
})) {
|
||||
result.push(item);
|
||||
return 'continue';
|
||||
}
|
||||
|
||||
var trimmed = value.replace(/\s+/, ' ');
|
||||
var already = rule.some(function (i) {
|
||||
return i.prop === decl.prop && i.value.replace(/\s+/, ' ') === trimmed;
|
||||
});
|
||||
|
||||
if (already) {
|
||||
result.push(item);
|
||||
return 'continue';
|
||||
}
|
||||
|
||||
var cloned = _this2.clone(decl, { value: value });
|
||||
item = decl.parent.insertBefore(decl, cloned);
|
||||
|
||||
result.push(item);
|
||||
};
|
||||
|
||||
for (var prefix in decl._autoprefixerValues) {
|
||||
var _ret = _loop(prefix);
|
||||
|
||||
if (_ret === 'continue') continue;
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Is declaration need to be prefixed
|
||||
*/
|
||||
|
||||
|
||||
Value.prototype.check = function check(decl) {
|
||||
var value = decl.value;
|
||||
if (value.indexOf(this.name) === -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !!value.match(this.regexp());
|
||||
};
|
||||
|
||||
/**
|
||||
* Lazy regexp loading
|
||||
*/
|
||||
|
||||
|
||||
Value.prototype.regexp = function regexp() {
|
||||
return this.regexpCache || (this.regexpCache = utils.regexp(this.name));
|
||||
};
|
||||
|
||||
/**
|
||||
* Add prefix to values in string
|
||||
*/
|
||||
|
||||
|
||||
Value.prototype.replace = function replace(string, prefix) {
|
||||
return string.replace(this.regexp(), '$1' + prefix + '$2');
|
||||
};
|
||||
|
||||
/**
|
||||
* Get value with comments if it was not changed
|
||||
*/
|
||||
|
||||
|
||||
Value.prototype.value = function value(decl) {
|
||||
if (decl.raws.value && decl.raws.value.value === decl.value) {
|
||||
return decl.raws.value.raw;
|
||||
} else {
|
||||
return decl.value;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Save values with next prefixed token
|
||||
*/
|
||||
|
||||
|
||||
Value.prototype.add = function add(decl, prefix) {
|
||||
if (!decl._autoprefixerValues) {
|
||||
decl._autoprefixerValues = {};
|
||||
}
|
||||
var value = decl._autoprefixerValues[prefix] || this.value(decl);
|
||||
value = this.replace(value, prefix);
|
||||
if (value) {
|
||||
decl._autoprefixerValues[prefix] = value;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Return function to fast find prefixed value
|
||||
*/
|
||||
|
||||
|
||||
Value.prototype.old = function old(prefix) {
|
||||
return new OldValue(this.name, prefix + this.name);
|
||||
};
|
||||
|
||||
return Value;
|
||||
}(Prefixer);
|
||||
|
||||
module.exports = Value;
|
||||
527
build/node_modules/autoprefixer/node_modules/postcss/CHANGELOG.md
generated
vendored
Normal file
527
build/node_modules/autoprefixer/node_modules/postcss/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,527 @@
|
||||
# Change Log
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 6.0.15
|
||||
* Add warning about missed `from` option on `process().then()` call.
|
||||
* Add IE 10 support.
|
||||
|
||||
## 6.0.14
|
||||
* Fix TypeScript definitions (by Jed Mao).
|
||||
|
||||
## 6.0.13
|
||||
* Fix TypeScript definitions for case of multiple PostCSS versions
|
||||
in `node_modules` (by Chris Eppstein).
|
||||
* Use `source-map` 0.6.
|
||||
|
||||
## 6.0.12
|
||||
* Don’t copy `*` hack to declaration indent.
|
||||
|
||||
## 6.0.11
|
||||
* Add upper case `!IMPORTANT` support.
|
||||
|
||||
## 6.0.10
|
||||
* Reduce PostCSS size in webpack bundle.
|
||||
|
||||
## 6.0.9
|
||||
* Improve error message for plugin with old PostCSS (by Igor Adamenko).
|
||||
|
||||
## 6.0.8
|
||||
* Fix Node.js 4.2.2 support.
|
||||
|
||||
## 6.0.7
|
||||
* Fix base64 decoding for old Node.js and browser.
|
||||
|
||||
## 6.0.6
|
||||
* Fix `end` position in at-rule without semicolon (by Oleh Kuchuk).
|
||||
|
||||
## 6.0.5
|
||||
* Move Babel config from `package.json` for `node_modules` compiling cases.
|
||||
|
||||
## 6.0.4
|
||||
* Fix parsing `;;` after rules.
|
||||
* Use Chalk 2.0.
|
||||
|
||||
## 6.0.3
|
||||
* Fix escape sequences parsing (by Oleh Kuchuk).
|
||||
* Added ability to force disable colors with an environment variable.
|
||||
* Improved color detection of some terminal apps.
|
||||
|
||||
## 6.0.2
|
||||
* Keep `raws.before` on moving `Root` children to new `Root`.
|
||||
|
||||
## 6.0.1
|
||||
* Fix parser extensibility to use it in Safe Parser.
|
||||
|
||||
## 6.0 “Marquis Orias”
|
||||
* Remove node.js 0.12 support.
|
||||
* Remove deprecated method from PostCSS 4.
|
||||
* Insert methods remove child from previous parent, instead of closing.
|
||||
* Insert methods and cloning doesn’t clean `raws` anymore.
|
||||
* Methods `moveTo`, `moveAfter`, `moveBefore` were deprecated.
|
||||
* Options was changed in `Plugin#process(css, processOptions, pluginOptions)`.
|
||||
* Add stream parser to reduce memory usage (by Oleh Kuchuk).
|
||||
* Add `before()`/`after()` shortcuts for `node.parent.insertBefore(node, x)`.
|
||||
* Add `Rule#raws.ownSemicolon` for semicolon after templates for `@apply`.
|
||||
* Use `babel-preset-env` to compile npm package.
|
||||
* Remove `js-base64` from dependencies (by Roman Dvornov).
|
||||
* Fix error message on single `:` in CSS.
|
||||
* Move tests to Jest.
|
||||
* Clean up test (by Gabriel Kalani).
|
||||
|
||||
## 5.2.18
|
||||
* Fix TypeScript definitions for case of multiple PostCSS versions
|
||||
in `node_modules` (by Chris Eppstein).
|
||||
|
||||
## 5.2.17
|
||||
* Add `postcss-sass` suggestion to syntax error on `.sass` input.
|
||||
|
||||
## 5.2.16
|
||||
* Better error on wrong argument in node constructor.
|
||||
|
||||
## 5.2.15
|
||||
* Fix TypeScript definitions (by bumbleblym).
|
||||
|
||||
## 5.2.14
|
||||
* Fix browser bundle building in webpack (by janschoenherr).
|
||||
|
||||
## 5.2.13
|
||||
* Do not add comment to important raws.
|
||||
* Fix JSDoc (by Dmitry Semigradsky).
|
||||
|
||||
## 5.2.12
|
||||
* Fix typo in deprecation message (by Garet McKinley).
|
||||
|
||||
## 5.2.11
|
||||
* Fix TypeScript definitions (by Jed Mao).
|
||||
|
||||
## 5.2.10
|
||||
* Fix TypeScript definitions (by Jed Mao).
|
||||
|
||||
## 5.2.9
|
||||
* Update TypeScript definitions (by Jed Mao).
|
||||
|
||||
## 5.2.8
|
||||
* Fix error message (by Ben Briggs).
|
||||
|
||||
## 5.2.7
|
||||
* Better error message on syntax object in plugins list.
|
||||
|
||||
## 5.2.6
|
||||
* Fix `postcss.vendor` for values with spaces (by 刘祺).
|
||||
|
||||
## 5.2.5
|
||||
* Better error message on unclosed string (by Ben Briggs).
|
||||
|
||||
## 5.2.4
|
||||
* Improve terminal CSS syntax highlight (by Simon Lydell).
|
||||
|
||||
## 5.2.3
|
||||
* Better color highlight in syntax error code frame.
|
||||
* Fix color highlight support in old systems.
|
||||
|
||||
## 5.2.2
|
||||
* Update `Processor#version`.
|
||||
|
||||
## 5.2.1
|
||||
* Fix source map path for CSS without `from` option (by Michele Locati).
|
||||
|
||||
## 5.2 “Duke Vapula”
|
||||
* Add syntax highlight to code frame in syntax error (by Andrey Popp).
|
||||
* Use Babel code frame style and size in syntax error.
|
||||
* Add `[` and `]` tokens to parse `[attr=;] {}` correctly.
|
||||
* Add `ignoreErrors` options to tokenizer (by Andrey Popp).
|
||||
* Fix error position on tab indent (by Simon Lydell).
|
||||
|
||||
## 5.1.2
|
||||
* Suggests SCSS/Less parsers on parse errors depends on file extension.
|
||||
|
||||
## 5.1.1
|
||||
* Fix TypeScript definitions (by Efremov Alexey).
|
||||
|
||||
## 5.1 “King and President Zagan”
|
||||
* Add URI in source map support (by Mark Finger).
|
||||
* Add `map.from` option (by Mark Finger).
|
||||
* Add `<no source>` mappings for nodes without source (by Bogdan Chadkin).
|
||||
* Add function value support to `map.prev` option (by Chris Montoro).
|
||||
* Add declaration value type check in shortcut creating (by 刘祺).
|
||||
* `Result#warn` now returns new created warning.
|
||||
* Don’t call plugin creator in `postcss.plugin` call.
|
||||
* Add source maps to PostCSS ES5 build.
|
||||
* Add JSDoc to PostCSS classes.
|
||||
* Clean npm package from unnecessary docs.
|
||||
|
||||
## 5.0.21
|
||||
* Fix support with input source mao with `utf8` encoding name.
|
||||
|
||||
## 5.0.20
|
||||
* Fix between raw value parsing (by David Clark).
|
||||
* Update TypeScript definitions (by Jed Mao).
|
||||
* Clean fake node.source after `append(string)`.
|
||||
|
||||
## 5.0.19
|
||||
* Fix indent-based syntaxes support.
|
||||
|
||||
## 5.0.18
|
||||
* Parse new lines according W3C CSS syntax specification.
|
||||
|
||||
## 5.0.17
|
||||
* Fix options argument in `Node#warn` (by Ben Briggs).
|
||||
* Fix TypeScript definitions (by Jed Mao).
|
||||
|
||||
## 5.0.16
|
||||
* Fix CSS syntax error position on unclosed quotes.
|
||||
|
||||
## 5.0.15
|
||||
* Fix `Node#clone()` on `null` value somewhere in node.
|
||||
|
||||
## 5.0.14
|
||||
* Allow to use PostCSS in webpack bundle without JSON loader.
|
||||
|
||||
## 5.0.13
|
||||
* Fix `index` and `word` options in `Warning#toString` (by Bogdan Chadkin).
|
||||
* Fix input source content loading in errors.
|
||||
* Fix map options on using `LazyResult` as input CSS.
|
||||
* 100% test coverage.
|
||||
* Use Babel 6.
|
||||
|
||||
## 5.0.12
|
||||
* Allow passing a previous map with no mappings (by Andreas Lind).
|
||||
|
||||
## 5.0.11
|
||||
* Increase plugins performance by 1.5 times.
|
||||
|
||||
## 5.0.10
|
||||
* Fix warning from nodes without source.
|
||||
|
||||
## 5.0.9
|
||||
* Fix source map type detection (by @asan).
|
||||
|
||||
## 5.0.8
|
||||
* Fixed a missed step in `5.0.7` that caused the module to be published as
|
||||
ES6 code.
|
||||
|
||||
## 5.0.7
|
||||
* PostCSS now requires that node 0.12 is installed via the engines property
|
||||
in package.json (by Howard Zuo).
|
||||
|
||||
## 5.0.6
|
||||
* Fix parsing nested at-rule without semicolon (by Matt Drake).
|
||||
* Trim `Declaration#value` (by Bogdan Chadkin).
|
||||
|
||||
## 5.0.5
|
||||
* Fix multi-tokens property parsing (by Matt Drake).
|
||||
|
||||
## 5.0.4
|
||||
* Fix start position in `Root#source`.
|
||||
* Fix source map annotation, when CSS uses `\r\n` (by Mohammad Younes).
|
||||
|
||||
## 5.0.3
|
||||
* Fix `url()` parsing.
|
||||
* Fix using `selectors` in `Rule` constructor.
|
||||
* Add start source to `Root` node.
|
||||
|
||||
## 5.0.2
|
||||
* Fix `remove(index)` to be compatible with 4.x plugin.
|
||||
|
||||
## 5.0.1
|
||||
* Fix PostCSS 4.x plugins compatibility.
|
||||
* Fix type definition loading (by Jed Mao).
|
||||
|
||||
## 5.0 “President Valac”
|
||||
* Remove `safe` option. Move Safe Parser to separate project.
|
||||
* `Node#toString` does not include `before` for root nodes.
|
||||
* Remove plugin returning `Root` API.
|
||||
* Remove Promise polyfill for node.js 0.10.
|
||||
* Deprecate `eachInside`, `eachDecl`, `eachRule`, `eachAtRule` and `eachComment`
|
||||
in favor of `walk`, `walkDecls`, `walkRules`, `walkAtRules` and `walkComments`
|
||||
(by Jed Mao).
|
||||
* Deprecate `Container#remove` and `Node#removeSelf`
|
||||
in favor of `Container#removeChild` and `Node#remove` (by Ben Briggs).
|
||||
* Deprecate `Node#replace` in favor of `replaceWith` (by Ben Briggs).
|
||||
* Deprecate raw properties in favor of `Node#raws` object.
|
||||
* Deprecate `Node#style` in favor of `raw`.
|
||||
* Deprecate `CssSyntaxError#generated` in favor of `input`.
|
||||
* Deprecate `Node#cleanStyles` in favor of `cleanRaws`.
|
||||
* Deprecate `Root#prevMap` in favor of `Root.source.input.map`.
|
||||
* Add `syntax`, `parser` and `stringifier` options for Custom Syntaxes.
|
||||
* Add stringifier option to `Node#toString`.
|
||||
* Add `Result#content` alias for non-CSS syntaxes.
|
||||
* Add `plugin.process(css)` shortcut to every plugin function (by Ben Briggs).
|
||||
* Add multiple nodes support to insert methods (by Jonathan Neal).
|
||||
* Add `Node#warn` shortcut (by Ben Briggs).
|
||||
* Add `word` and `index` options to errors and warnings (by David Clark).
|
||||
* Add `line`, `column` properties to `Warning`.
|
||||
* Use `supports-color` library to detect color support in error output.
|
||||
* Add type definitions for TypeScript plugin developers (by Jed Mao).
|
||||
* `Rule#selectors` setter detects separators.
|
||||
* Add `postcss.stringify` method.
|
||||
* Throw descriptive errors for incorrectly formatted plugins.
|
||||
* Add docs to npm release.
|
||||
* Fix `url()` parsing.
|
||||
* Fix Windows support (by Jed Mao).
|
||||
|
||||
## 4.1.16
|
||||
* Fix errors without stack trace.
|
||||
|
||||
## 4.1.15
|
||||
* Allow asynchronous plugins to change processor plugins list (by Ben Briggs).
|
||||
|
||||
## 4.1.14
|
||||
* Fix for plugins packs defined by `postcss.plugin`.
|
||||
|
||||
## 4.1.13
|
||||
* Fix input inlined source maps with UTF-8 encoding.
|
||||
|
||||
## 4.1.12
|
||||
* Update Promise polyfill.
|
||||
|
||||
## 4.1.11
|
||||
* Fix error message on wrong plugin format.
|
||||
|
||||
## 4.1.10
|
||||
* Fix Promise behavior on sync plugin errors.
|
||||
* Automatically fill `plugin` field in `CssSyntaxError`.
|
||||
* Fix warning message (by Ben Briggs).
|
||||
|
||||
## 4.1.9
|
||||
* Speed up `node.clone()`.
|
||||
|
||||
## 4.1.8
|
||||
* Accepts `Processor` instance in `postcss()` constructor too.
|
||||
|
||||
## 4.1.7
|
||||
* Speed up `postcss.list` (by Bogdan Chadkin).
|
||||
|
||||
## 4.1.6
|
||||
* Fix Promise behavior on parsing error.
|
||||
|
||||
## 4.1.5
|
||||
* Parse at-words in declaration values.
|
||||
|
||||
## 4.1.4
|
||||
* Fix Promise polyfill dependency (by Anton Yakushev and Matija Marohnić).
|
||||
|
||||
## 4.1.3
|
||||
* Add Promise polyfill for node.js 0.10 and IE.
|
||||
|
||||
## 4.1.2
|
||||
* List helpers can be accessed independently `var space = postcss.list.space`.
|
||||
|
||||
## 4.1.1
|
||||
* Show deprecated message only once.
|
||||
|
||||
## 4.1 “Marquis Andras”
|
||||
* Asynchronous plugin support.
|
||||
* Add warnings from plugins and `Result#messages`.
|
||||
* Add `postcss.plugin()` to create plugins with a standard API.
|
||||
* Insert nodes by CSS string.
|
||||
* Show version warning message on error from an outdated plugin.
|
||||
* Send `Result` instance to plugins as the second argument.
|
||||
* Add `CssSyntaxError#plugin`.
|
||||
* Add `CssSyntaxError#showSourceCode()`.
|
||||
* Add `postcss.list` and `postcss.vendor` aliases.
|
||||
* Add `Processor#version`.
|
||||
* Parse wrong closing bracket.
|
||||
* Parse `!important` statement with spaces and comments inside (by Ben Briggs).
|
||||
* Throw an error on declaration without `prop` or `value` (by Philip Peterson).
|
||||
* Fix source map mappings position.
|
||||
* Add indexed source map support.
|
||||
* Always set `error.generated`.
|
||||
* Clean all source map annotation comments.
|
||||
|
||||
## 4.0.6
|
||||
* Remove `babel` from released package dependencies (by Andres Suarez).
|
||||
|
||||
## 4.0.5
|
||||
* Fix error message on double colon in declaration.
|
||||
|
||||
## 4.0.4
|
||||
* Fix indent detection in some rare cases.
|
||||
|
||||
## 4.0.3
|
||||
* Faster API with 6to5 Loose mode.
|
||||
* Fix indexed source maps support.
|
||||
|
||||
## 4.0.2
|
||||
* Do not copy IE hacks to code style.
|
||||
|
||||
## 4.0.1
|
||||
* Add `source.input` to `Root` too.
|
||||
|
||||
## 4.0 “Duke Flauros”
|
||||
* Rename `Container#childs` to `nodes`.
|
||||
* Rename `PostCSS#processors` to `plugins`.
|
||||
* Add `Node#replaceValues()` method.
|
||||
* Add `Node#moveTo()`, `moveBefore()` and `moveAfter()` methods.
|
||||
* Add `Node#cloneBefore()` and `cloneAfter()` shortcuts.
|
||||
* Add `Node#next()`, `prev()` and `root()` shortcuts.
|
||||
* Add `Node#replaceWith()` method.
|
||||
* Add `Node#error()` method.
|
||||
* Add `Container#removeAll()` method.
|
||||
* Add filter argument to `eachDecl()` and `eachAtRule()`.
|
||||
* Add `Node#source.input` and move `source.file` or `source.id` to `input`.
|
||||
* Change code indent, when node was moved.
|
||||
* Better fix code style on `Rule`, `AtRule` and `Comment` nodes changes.
|
||||
* Allow to create rules and at-rules by hash shortcut in append methods.
|
||||
* Add class name to CSS syntax error output.
|
||||
|
||||
## 3.0.7
|
||||
* Fix IE filter parsing with multiple commands.
|
||||
* Safer way to consume PostCSS object as plugin (by Maxime Thirouin).
|
||||
|
||||
## 3.0.6
|
||||
* Fix missing semicolon when comment comes after last declaration.
|
||||
* Fix Safe Mode declaration parsing on unclosed blocks.
|
||||
|
||||
## 3.0.5
|
||||
* Fix parser to support difficult cases with backslash escape and brackets.
|
||||
* Add `CssSyntaxError#stack` (by Maxime Thirouin).
|
||||
|
||||
## 3.0.4
|
||||
* Fix Safe Mode on unknown word before declaration.
|
||||
|
||||
## 3.0.3
|
||||
* Increase tokenizer speed (by Roman Dvornov).
|
||||
|
||||
## 3.0.2
|
||||
* Fix empty comment parsing.
|
||||
* Fix `Root#normalize` in some inserts.
|
||||
|
||||
## 3.0.1
|
||||
* Fix Rhino JS runtime support.
|
||||
* Typo in deprecated warning (by Maxime Thirouin).
|
||||
|
||||
## 3.0 “Marquis Andrealphus”
|
||||
* New parser, which become the fastest ever CSS parser written in JavaScript.
|
||||
* Parser can now parse declarations and rules in one parent (like in `@page`)
|
||||
and nested declarations for plugins like `postcss-nested`.
|
||||
* Child nodes array is now in `childs` property, instead of `decls` and `rules`.
|
||||
* `map.inline` and `map.sourcesContent` options are now `true` by default.
|
||||
* Fix iterators (`each`, `insertAfter`) on children array changes.
|
||||
* Use previous source map to show origin source of CSS syntax error.
|
||||
* Use 6to5 ES6 compiler, instead of ES6 Transpiler.
|
||||
* Use code style for manually added rules from existing rules.
|
||||
* Use `from` option from previous source map `file` field.
|
||||
* Set `to` value to `from` if `to` option is missing.
|
||||
* Use better node source name when missing `from` option.
|
||||
* Show a syntax error when `;` is missed between declarations.
|
||||
* Allow to pass `PostCSS` instance or list of plugins to `use()` method.
|
||||
* Allow to pass `Result` instance to `process()` method.
|
||||
* 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`.
|
||||
* Parse nameless at-rules in Safe Mode.
|
||||
* Fix source map generation for nodes without source.
|
||||
* Fix next child `before` if `Root` first child got removed.
|
||||
|
||||
## 2.2.6
|
||||
* Fix map generation for nodes without source (by Josiah Savary).
|
||||
|
||||
## 2.2.5
|
||||
* Fix source map with BOM marker support (by Mohammad Younes).
|
||||
* Fix source map paths (by Mohammad Younes).
|
||||
|
||||
## 2.2.4
|
||||
* Fix `prepend()` on empty `Root`.
|
||||
|
||||
## 2.2.3
|
||||
* Allow to use object shortcut in `use()` with functions like `autoprefixer`.
|
||||
|
||||
## 2.2.2
|
||||
* Add shortcut to set processors in `use()` via object with `.postcss` property.
|
||||
|
||||
## 2.2.1
|
||||
* Send `opts` from `Processor#process(css, opts)` to processors.
|
||||
|
||||
## 2.2 “Marquis Cimeies”
|
||||
* Use GNU style syntax error messages.
|
||||
* Add `Node#replace` method.
|
||||
* Add `CssSyntaxError#reason` property.
|
||||
|
||||
## 2.1.2
|
||||
* Fix UTF-8 support in inline source map.
|
||||
* Fix source map `sourcesContent` if there is no `from` and `to` options.
|
||||
|
||||
## 2.1.1
|
||||
* Allow to miss `to` and `from` options for inline source maps.
|
||||
* Add `Node#source.id` if file name is unknown.
|
||||
* Better detect splitter between rules in CSS concatenation tools.
|
||||
* Automatically clone node in insert methods.
|
||||
|
||||
## 2.1 “King Amdusias”
|
||||
* Change Traceur ES6 compiler to ES6 Transpiler.
|
||||
* Show broken CSS line in syntax error.
|
||||
|
||||
## 2.0 “King Belial”
|
||||
* Project was rewritten from CoffeeScript to ES6.
|
||||
* Add Safe Mode to works with live input or with hacks from legacy code.
|
||||
* More safer parser to pass all hacks from Browserhacks.com.
|
||||
* Use real properties instead of magic getter/setter for raw properties.
|
||||
|
||||
## 1.0 “Marquis Decarabia”
|
||||
* Save previous source map for each node to support CSS concatenation
|
||||
with multiple previous maps.
|
||||
* Add `map.sourcesContent` option to add origin content to `sourcesContent`
|
||||
inside map.
|
||||
* Allow to set different place of output map in annotation comment.
|
||||
* Allow to use arrays and `Root` in `Container#append` and same methods.
|
||||
* Add `Root#prevMap` with information about previous map.
|
||||
* Allow to use latest PostCSS from GitHub by npm.
|
||||
* `Result` now is lazy and it will generate output CSS only if you use `css`
|
||||
or `map` property.
|
||||
* Use separated `map.prev` option to set previous map.
|
||||
* Rename `inlineMap` option to `map.inline`.
|
||||
* Rename `mapAnnotation` option to `map.annotation`.
|
||||
* `Result#map` now return `SourceMapGenerator` object, instead of string.
|
||||
* Run previous map autodetect only if input CSS contains annotation comment.
|
||||
* Add `map: 'inline'` shortcut for `map: { inline: true }` option.
|
||||
* `Node#source.file` now will contains absolute path.
|
||||
* Clean `Declaration#between` style on node clone.
|
||||
|
||||
## 0.3.5
|
||||
* Allow to use `Root` or `Result` as first argument in `process()`.
|
||||
* Save parsed AST to `Result#root`.
|
||||
|
||||
## 0.3.4
|
||||
* Better space symbol detect to read UTF-8 BOM correctly.
|
||||
|
||||
## 0.3.3
|
||||
* Remove source map hacks by using new Mozilla’s `source-map` (by Simon Lydell).
|
||||
|
||||
## 0.3.2
|
||||
* Add URI encoding support for inline source maps.
|
||||
|
||||
## 0.3.1
|
||||
* Fix relative paths from previous source map.
|
||||
* Safer space split in `Rule#selectors` (by Simon Lydell).
|
||||
|
||||
## 0.3 “Prince Seere”
|
||||
* Add `Comment` node for comments between declarations or rules.
|
||||
* Add source map annotation comment to output CSS.
|
||||
* Allow to inline source map to annotation comment by data:uri.
|
||||
* Fix source maps on Windows.
|
||||
* Fix source maps for subdirectory (by Dmitry Nikitenko and Simon Lydell).
|
||||
* Autodetect previous source map.
|
||||
* Add `first` and `last` shortcuts to container nodes.
|
||||
* Parse `!important` to separated property in `Declaration`.
|
||||
* Allow to break iteration by returning `false`.
|
||||
* Copy code style to new nodes.
|
||||
* Add `eachInside` method to recursively iterate all nodes.
|
||||
* Add `selectors` shortcut to get selectors array.
|
||||
* Add `toResult` method to `Rule` to simplify work with several input files.
|
||||
* Clean declaration’s `value`, rule’s `selector` and at-rule’s `params`
|
||||
by storing spaces in `between` property.
|
||||
|
||||
## 0.2 “Duke Dantalion”
|
||||
* Add source map support.
|
||||
* Add shortcuts to create nodes.
|
||||
* Method `process()` now returns object with `css` and `map` keys.
|
||||
* Origin CSS file option was renamed from `file` to `from`.
|
||||
* Rename `Node#remove()` method to `removeSelf()` to fix name conflict.
|
||||
* Node source was moved to `source` property with origin file
|
||||
and node end position.
|
||||
* You can set own CSS generate function.
|
||||
|
||||
## 0.1 “Count Andromalius”
|
||||
* Initial release.
|
||||
20
build/node_modules/autoprefixer/node_modules/postcss/LICENSE
generated
vendored
Normal file
20
build/node_modules/autoprefixer/node_modules/postcss/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.
|
||||
344
build/node_modules/autoprefixer/node_modules/postcss/README.cn.md
generated
vendored
Normal file
344
build/node_modules/autoprefixer/node_modules/postcss/README.cn.md
generated
vendored
Normal file
@@ -0,0 +1,344 @@
|
||||
# PostCSS [![Travis Build Status][travis-img]][travis] [![AppVeyor Build Status][appveyor-img]][appveyor] [![Gitter][chat-img]][chat]
|
||||
|
||||
<img align="right" width="95" height="95"
|
||||
alt="哲学家的石头 - PostCSS 的 logo"
|
||||
src="http://postcss.github.io/postcss/logo.svg">
|
||||
|
||||
[appveyor-img]: https://img.shields.io/appveyor/ci/ai/postcss.svg?label=windows
|
||||
[travis-img]: https://img.shields.io/travis/postcss/postcss.svg?label=unix
|
||||
[chat-img]: https://img.shields.io/badge/Gitter-Join_the_PostCSS_chat-brightgreen.svg
|
||||
[appveyor]: https://ci.appveyor.com/project/ai/postcss
|
||||
[travis]: https://travis-ci.org/postcss/postcss
|
||||
[chat]: https://gitter.im/postcss/postcss
|
||||
|
||||
PostCSS 是一个允许使用 JS 插件转换样式的工具。
|
||||
这些插件可以检查(lint)你的 CSS,支持 CSS Variables 和 Mixins,
|
||||
编译尚未被浏览器广泛支持的先进的 CSS 语法,内联图片,以及其它很多优秀的功能。
|
||||
|
||||
PostCSS 在工业界被广泛地应用,其中不乏很多有名的行业领导者,如:维基百科,Twitter,阿里巴巴,
|
||||
JetBrains。PostCSS 的 [Autoprefixer] 插件是最流行的 CSS 处理工具之一。
|
||||
|
||||
**Twitter 账号:** [@postcss](https://twitter.com/postcss)。<br>
|
||||
**支持 / 讨论:** [Gitter](https://gitter.im/postcss/postcss)。<br>
|
||||
|
||||
如果需要 PostCSS 商业支持(如咨询,提升公司的前端文化,
|
||||
PostCSS 插件),请联系 [Evil Martians](https://evilmartians.com/?utm_source=postcss)
|
||||
邮箱 <surrender@evilmartians.com>。
|
||||
|
||||
[Autoprefixer]: https://github.com/postcss/autoprefixer
|
||||
|
||||
<a href="https://evilmartians.com/?utm_source=postcss">
|
||||
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
|
||||
alt="由 Evil Martians 赞助" width="236" height="54">
|
||||
</a>
|
||||
|
||||
## 插件
|
||||
|
||||
截止到目前,PostCSS 有 200 多个插件。你可以在 [插件列表] 或 [搜索目录] 找到它们。
|
||||
下方的列表是我们最喜欢的插件 - 它们很好地演示了我们可以用 PostCSS 做些什么。
|
||||
|
||||
如果你有任何新的想法,[开发 PostCSS 插件] 非常简单易上手。
|
||||
|
||||
[搜索目录]: http://postcss.parts
|
||||
[插件列表]: https://github.com/postcss/postcss/blob/master/docs/plugins.md
|
||||
|
||||
### 解决全局 CSS 的问题
|
||||
|
||||
* [`postcss-use`] 允许你在 CSS 里明确地设置 PostCSS 插件,并且只在当前文件执行它们。
|
||||
* [`postcss-modules`] 和 [`react-css-modules`] 可以自动以组件为单位隔绝 CSS 选择器。
|
||||
* [`postcss-autoreset`] 是全局样式重置的又一个选择,它更适用于分离的组件。
|
||||
* [`postcss-initial`] 添加了 `all: initial` 的支持,重置了所有继承的样式。
|
||||
* [`cq-prolyfill`] 添加了容器查询的支持,允许添加响应于父元素宽度的样式.
|
||||
|
||||
### 提前使用先进的 CSS 特性
|
||||
|
||||
* [`autoprefixer`] 添加了 vendor 浏览器前缀,它使用 Can I Use 上面的数据。
|
||||
* [`postcss-cssnext`] 允许你使用未来的 CSS 特性(包括 `autoprefixer`)。
|
||||
* [`postcss-image-set-polyfill`] 为所有浏览器模拟了 [`image-set`] 函数逻辑。
|
||||
|
||||
### 更佳的 CSS 可读性
|
||||
|
||||
* [`precss`] 囊括了许多插件来支持类似 Sass 的特性,比如 CSS 变量,套嵌,mixins 等。
|
||||
* [`postcss-sorting`] 给规则的内容以及@规则排序。
|
||||
* [`postcss-utilities`] 囊括了最常用的简写方式和书写帮助。
|
||||
* [`short`] 添加并拓展了大量的缩写属性。
|
||||
|
||||
### 图片和字体
|
||||
|
||||
* [`postcss-assets`] 可以插入图片尺寸和内联文件。
|
||||
* [`postcss-sprites`] 能生成雪碧图。
|
||||
* [`font-magician`] 生成所有在 CSS 里需要的 `@font-face` 规则。
|
||||
* [`postcss-inline-svg`] 允许你内联 SVG 并定制它的样式。
|
||||
* [`postcss-write-svg`] 允许你在 CSS 里写简单的 SVG。
|
||||
|
||||
### 提示器(Linters)
|
||||
|
||||
* [`stylelint`] 是一个模块化的样式提示器。
|
||||
* [`stylefmt`] 是一个能根据 `stylelint` 规则自动优化 CSS 格式的工具。
|
||||
* [`doiuse`] 提示 CSS 的浏览器支持性,使用的数据来自于 Can I Use。
|
||||
* [`colorguard`] 帮助你保持一个始终如一的调色板。
|
||||
|
||||
### 其它
|
||||
|
||||
* [`postcss-rtl`] 在单个 CSS 文件里组合了两个方向(左到右,右到左)的样式。
|
||||
* [`cssnano`] 是一个模块化的 CSS 压缩器。
|
||||
* [`lost`] 是一个功能强大的 `calc()` 栅格系统。
|
||||
* [`rtlcss`] 镜像翻转 CSS 样式,适用于 right-to-left 的应用场景。
|
||||
|
||||
[`postcss-image-set-polyfill`]: https://github.com/SuperOl3g/postcss-image-set-polyfill
|
||||
[`postcss-inline-svg`]: https://github.com/TrySound/postcss-inline-svg
|
||||
[`react-css-modules`]: https://github.com/gajus/react-css-modules
|
||||
[`postcss-autoreset`]: https://github.com/maximkoretskiy/postcss-autoreset
|
||||
[`postcss-write-svg`]: https://github.com/jonathantneal/postcss-write-svg
|
||||
[`postcss-utilities`]: https://github.com/ismamz/postcss-utilities
|
||||
[`postcss-initial`]: https://github.com/maximkoretskiy/postcss-initial
|
||||
[`postcss-sprites`]: https://github.com/2createStudio/postcss-sprites
|
||||
[`postcss-modules`]: https://github.com/outpunk/postcss-modules
|
||||
[`postcss-sorting`]: https://github.com/hudochenkov/postcss-sorting
|
||||
[`postcss-cssnext`]: http://cssnext.io
|
||||
[`postcss-assets`]: https://github.com/assetsjs/postcss-assets
|
||||
[开发 PostCSS 插件]: https://github.com/postcss/postcss/blob/master/docs/writing-a-plugin.md
|
||||
[`font-magician`]: https://github.com/jonathantneal/postcss-font-magician
|
||||
[`autoprefixer`]: https://github.com/postcss/autoprefixer
|
||||
[`cq-prolyfill`]: https://github.com/ausi/cq-prolyfill
|
||||
[`postcss-rtl`]: https://github.com/vkalinichev/postcss-rtl
|
||||
[`postcss-use`]: https://github.com/postcss/postcss-use
|
||||
[`css-modules`]: https://github.com/css-modules/css-modules
|
||||
[`colorguard`]: https://github.com/SlexAxton/css-colorguard
|
||||
[`stylelint`]: https://github.com/stylelint/stylelint
|
||||
[`image-set`]: https://drafts.csswg.org/css-images-4/#image-set-notation
|
||||
[`stylefmt`]: https://github.com/morishitter/stylefmt
|
||||
[`cssnano`]: http://cssnano.co
|
||||
[`precss`]: https://github.com/jonathantneal/precss
|
||||
[`doiuse`]: https://github.com/anandthakker/doiuse
|
||||
[`rtlcss`]: https://github.com/MohammadYounes/rtlcss
|
||||
[`short`]: https://github.com/jonathantneal/postcss-short
|
||||
[`lost`]: https://github.com/peterramsing/lost
|
||||
|
||||
## 语法
|
||||
|
||||
PostCSS 可以转化样式到任意语法,不仅仅是 CSS。
|
||||
如果还没有支持你最喜欢的语法,你可以编写一个解释器以及(或者)一个 stringifier 来拓展 PostCSS。
|
||||
|
||||
* [`sugarss`] 是一个以缩进为基础的语法,类似于 Sass 和 Stylus。
|
||||
* [`postcss-html`] 允许你在 HTML / [Markdown](https://daringfireball.net/projects/markdown/syntax) / [Vue component](https://vue-loader.vuejs.org/) 里编写样式。
|
||||
* [`postcss-scss`] 允许你使用 SCSS *(但并没有将 SCSS 编译到 CSS)*。
|
||||
* [`postcss-sass`] 允许你使用 Sass *(但并没有将 Sass 编译到 CSS)*。
|
||||
* [`postcss-less`] 允许你使用 Less *(但并没有将 LESS 编译到 CSS)*。
|
||||
* [`postcss-less-engine`] 允许你使用 Less *(并且使用真正的 Less.js 把 LESS 编译到 CSS)*。
|
||||
* [`postcss-js`] 允许你在 JS 里编写样式,或者转换成 React 的内联样式/Radium/JSS。
|
||||
* [`postcss-safe-parser`] 查找并修复 CSS 语法错误。
|
||||
* [`midas`] 将 CSS 字符串转化成高亮的 HTML。
|
||||
|
||||
[`postcss-less-engine`]: https://github.com/Crunch/postcss-less
|
||||
[`postcss-safe-parser`]: https://github.com/postcss/postcss-safe-parser
|
||||
[`postcss-html`]: https://github.com/gucong3000/postcss-html
|
||||
[`postcss-scss`]: https://github.com/postcss/postcss-scss
|
||||
[`postcss-sass`]: https://github.com/AleshaOleg/postcss-sass
|
||||
[`postcss-less`]: https://github.com/webschik/postcss-less
|
||||
[`postcss-js`]: https://github.com/postcss/postcss-js
|
||||
[`sugarss`]: https://github.com/postcss/sugarss
|
||||
[`midas`]: https://github.com/ben-eb/midas
|
||||
|
||||
## 文章
|
||||
|
||||
* [一些你对 PostCSS 可能产生的误解](http://julian.io/some-things-you-may-think-about-postcss-and-you-might-be-wrong)
|
||||
* [PostCSS 究竟是什么,是做什么的](http://davidtheclark.com/its-time-for-everyone-to-learn-about-postcss)
|
||||
* [PostCSS 指南](http://webdesign.tutsplus.com/series/postcss-deep-dive--cms-889)
|
||||
|
||||
你可以在 [awesome-postcss](https://github.com/jjaderg/awesome-postcss) 列表里找到更多优秀的文章和视频。
|
||||
|
||||
## 书籍
|
||||
|
||||
* Alex Libby, Packt 的 [网页设计之精通 PostCSS](https://www.packtpub.com/web-development/mastering-postcss-web-design) (2016年6月)
|
||||
|
||||
## 使用方法
|
||||
|
||||
你可以通过简单的两步便开始使用 PostCSS:
|
||||
|
||||
1. 在你的构建工具中查找并添加 PostCSS 拓展。
|
||||
2. [选择插件]并将它们添加到你的 PostCSS 处理队列中。
|
||||
|
||||
[选择插件]: http://postcss.parts
|
||||
|
||||
### Webpack
|
||||
|
||||
在 `webpack.config.js` 里使用 [`postcss-loader`] :
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
exclude: /node_modules/,
|
||||
use: [
|
||||
{
|
||||
loader: 'style-loader',
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
然后创建 `postcss.config.js`:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('precss'),
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
[`postcss-loader`]: https://github.com/postcss/postcss-loader
|
||||
|
||||
### Gulp
|
||||
|
||||
使用 [`gulp-postcss`] 和 [`gulp-sourcemaps`].
|
||||
|
||||
```js
|
||||
gulp.task('css', function () {
|
||||
var postcss = require('gulp-postcss');
|
||||
var sourcemaps = require('gulp-sourcemaps');
|
||||
|
||||
return gulp.src('src/**/*.css')
|
||||
.pipe( sourcemaps.init() )
|
||||
.pipe( postcss([ require('precss'), require('autoprefixer') ]) )
|
||||
.pipe( sourcemaps.write('.') )
|
||||
.pipe( gulp.dest('build/') );
|
||||
});
|
||||
```
|
||||
|
||||
[`gulp-sourcemaps`]: https://github.com/floridoo/gulp-sourcemaps
|
||||
[`gulp-postcss`]: https://github.com/postcss/gulp-postcss
|
||||
|
||||
### npm run / CLI
|
||||
|
||||
如果需要在你的命令行界面或 npm 脚本里使用 PostCSS,你可以使用 [`postcss-cli`]。
|
||||
|
||||
```sh
|
||||
postcss --use autoprefixer -c options.json -o main.css css/*.css
|
||||
```
|
||||
|
||||
[`postcss-cli`]: https://github.com/postcss/postcss-cli
|
||||
|
||||
### 浏览器
|
||||
|
||||
如果你想编译浏览器里的 CSS 字符串(例如像 CodePen 一样的在线编辑器),
|
||||
只需使用 [Browserify] 或 [webpack]。它们会把 PostCSS 和插件文件打包进一个独立文件。
|
||||
|
||||
如果想要在 React 内联样式/JSS/Radium/其它 [CSS-in-JS] 里使用 PostCSS,
|
||||
你可以用 [`postcss-js`] 然后转换样式对象。
|
||||
|
||||
```js
|
||||
var postcss = require('postcss-js');
|
||||
var prefixer = postcss.sync([ require('autoprefixer') ]);
|
||||
|
||||
prefixer({ display: 'flex' }); //=> { display: ['-webkit-box', '-webkit-flex', '-ms-flexbox', 'flex'] }
|
||||
```
|
||||
|
||||
[`postcss-js`]: https://github.com/postcss/postcss-js
|
||||
[Browserify]: http://browserify.org/
|
||||
[CSS-in-JS]: https://github.com/MicheleBertoli/css-in-js
|
||||
[webpack]: https://webpack.github.io/
|
||||
|
||||
### 运行器
|
||||
|
||||
* **Grunt**: [`grunt-postcss`](https://github.com/nDmitry/grunt-postcss)
|
||||
* **HTML**: [`posthtml-postcss`](https://github.com/posthtml/posthtml-postcss)
|
||||
* **Stylus**: [`poststylus`](https://github.com/seaneking/poststylus)
|
||||
* **Rollup**: [`rollup-plugin-postcss`](https://github.com/egoist/rollup-plugin-postcss)
|
||||
* **Brunch**: [`postcss-brunch`](https://github.com/brunch/postcss-brunch)
|
||||
* **Broccoli**: [`broccoli-postcss`](https://github.com/jeffjewiss/broccoli-postcss)
|
||||
* **Meteor**: [`postcss`](https://atmospherejs.com/juliancwirko/postcss)
|
||||
* **ENB**: [`enb-postcss`](https://github.com/awinogradov/enb-postcss)
|
||||
* **Taskr**: [`taskr-postcss`](https://github.com/lukeed/taskr/tree/master/packages/postcss)
|
||||
* **Start**: [`start-postcss`](https://github.com/start-runner/postcss)
|
||||
* **Connect/Express**: [`postcss-middleware`](https://github.com/jedmao/postcss-middleware)
|
||||
|
||||
### JS API
|
||||
|
||||
对于其它的应用环境,你可以使用 JS API:
|
||||
|
||||
```js
|
||||
const fs = require('fs');
|
||||
const postcss = require('postcss');
|
||||
const precss = require('precss');
|
||||
const autoprefixer = require('autoprefixer');
|
||||
|
||||
fs.readFile('src/app.css', (err, css) => {
|
||||
postcss([precss, autoprefixer])
|
||||
.process(css, { from: 'src/app.css', to: 'dest/app.css' })
|
||||
.then(result => {
|
||||
fs.writeFile('dest/app.css', result.css);
|
||||
if ( result.map ) fs.writeFile('dest/app.css.map', result.map);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
阅读 [PostCSS API 文档] 获取更多有关 JS API 的信息.
|
||||
|
||||
所有的 PostCSS 运行器应当通过 [PostCSS 运行器指南]。
|
||||
|
||||
[PostCSS 运行器指南]: https://github.com/postcss/postcss/blob/master/docs/guidelines/runner.md
|
||||
[PostCSS API 文档]: http://api.postcss.org/postcss.html
|
||||
|
||||
### 配置选项
|
||||
|
||||
绝大多数 PostCSS 运行器接受两个参数:
|
||||
|
||||
* 一个包含所需插件的数组
|
||||
* 一个配置选项的对象
|
||||
|
||||
常见的选项:
|
||||
|
||||
* `syntax`: 一个提供了语法解释器和 stringifier 的对象。
|
||||
* `parser`: 一个特殊的语法解释器(例如 [SCSS])。
|
||||
* `stringifier`: 一个特殊的语法 output 生成器(例如 [Midas])。
|
||||
* `map`: [source map 选项].
|
||||
* `from`: input 文件名称(大多数运行器自动设置了这个)。
|
||||
* `to`: output 文件名称(大多数运行器自动设置了这个)。
|
||||
|
||||
[source map 选项]: https://github.com/postcss/postcss/blob/master/docs/source-maps.md
|
||||
[Midas]: https://github.com/ben-eb/midas
|
||||
[SCSS]: https://github.com/postcss/postcss-scss
|
||||
|
||||
### Atom
|
||||
|
||||
* [`language-postcss`] 添加了 PostCSS 和 [SugarSS] 代码高亮。
|
||||
* [`source-preview-postcss`] 在一个独立窗口里实时预览生成的 CSS。
|
||||
|
||||
[SugarSS]: https://github.com/postcss/sugarss
|
||||
|
||||
### Sublime Text
|
||||
|
||||
* [`Syntax-highlighting-for-PostCSS`] 添加了 PostCSS 代码高亮。
|
||||
|
||||
[`Syntax-highlighting-for-PostCSS`]: https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS
|
||||
[`source-preview-postcss`]: https://atom.io/packages/source-preview-postcss
|
||||
[`language-postcss`]: https://atom.io/packages/language-postcss
|
||||
|
||||
### Vim
|
||||
|
||||
* [`postcss.vim`] 添加了 PostCSS 代码高亮。
|
||||
|
||||
[`postcss.vim`]: https://github.com/stephenway/postcss.vim
|
||||
|
||||
### WebStorm
|
||||
|
||||
自 WebStorm 2016.3 开始,[提供了] 内建的 PostCSS 支持。
|
||||
|
||||
[提供了]: https://blog.jetbrains.com/webstorm/2016/08/webstorm-2016-3-early-access-preview/
|
||||
367
build/node_modules/autoprefixer/node_modules/postcss/README.md
generated
vendored
Normal file
367
build/node_modules/autoprefixer/node_modules/postcss/README.md
generated
vendored
Normal file
@@ -0,0 +1,367 @@
|
||||
# PostCSS [![Travis Build Status][travis-img]][travis] [![AppVeyor Build Status][appveyor-img]][appveyor] [![Gitter][chat-img]][chat]
|
||||
|
||||
<img align="right" width="95" height="95"
|
||||
alt="Philosopher’s stone, logo of PostCSS"
|
||||
src="http://postcss.github.io/postcss/logo.svg">
|
||||
|
||||
[appveyor-img]: https://img.shields.io/appveyor/ci/ai/postcss.svg?label=windows
|
||||
[travis-img]: https://img.shields.io/travis/postcss/postcss.svg?label=unix
|
||||
[chat-img]: https://img.shields.io/badge/Gitter-Join_the_PostCSS_chat-brightgreen.svg
|
||||
[appveyor]: https://ci.appveyor.com/project/ai/postcss
|
||||
[travis]: https://travis-ci.org/postcss/postcss
|
||||
[chat]: https://gitter.im/postcss/postcss
|
||||
|
||||
PostCSS is a tool for transforming styles with JS plugins.
|
||||
These plugins can lint your CSS, support variables and mixins,
|
||||
transpile future CSS syntax, inline images, and more.
|
||||
|
||||
PostCSS is used by industry leaders including Wikipedia, Twitter, Alibaba,
|
||||
and JetBrains. The [Autoprefixer] PostCSS plugin is one of the most popular
|
||||
CSS processors.
|
||||
|
||||
**Twitter account:** [@postcss](https://twitter.com/postcss).<br>
|
||||
**VK.com page:** [postcss](https://vk.com/postcss).<br>
|
||||
**Support / Discussion:** [Gitter](https://gitter.im/postcss/postcss).<br>
|
||||
**中文翻译**: [`README.cn.md`](./README.cn.md).
|
||||
|
||||
For PostCSS commercial support (consulting, improving the front-end culture
|
||||
of your company, PostCSS plugins), contact [Evil Martians](https://evilmartians.com/?utm_source=postcss)
|
||||
at <surrender@evilmartians.com>.
|
||||
|
||||
[Autoprefixer]: https://github.com/postcss/autoprefixer
|
||||
|
||||
<a href="https://evilmartians.com/?utm_source=postcss">
|
||||
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
|
||||
alt="Sponsored by Evil Martians" width="236" height="54">
|
||||
</a>
|
||||
|
||||
## Plugins
|
||||
|
||||
Currently, PostCSS has more than 200 plugins. You can find all of the plugins
|
||||
in the [plugins list] or in the [searchable catalog]. Below is a list
|
||||
of our favorite plugins — the best demonstrations of what can be built
|
||||
on top of PostCSS.
|
||||
|
||||
If you have any new ideas, [PostCSS plugin development] is really easy.
|
||||
|
||||
[searchable catalog]: http://postcss.parts
|
||||
[plugins list]: https://github.com/postcss/postcss/blob/master/docs/plugins.md
|
||||
|
||||
### Solve Global CSS Problem
|
||||
|
||||
* [`postcss-use`] allows you to explicitly set PostCSS plugins within CSS
|
||||
and execute them only for the current file.
|
||||
* [`postcss-modules`] and [`react-css-modules`] automatically isolate
|
||||
selectors within components.
|
||||
* [`postcss-autoreset`] is an alternative to using a global reset
|
||||
that is better for isolatable components.
|
||||
* [`postcss-initial`] adds `all: initial` support, which resets
|
||||
all inherited styles.
|
||||
* [`cq-prolyfill`] adds container query support, allowing styles that respond
|
||||
to the width of the parent.
|
||||
|
||||
### Use Future CSS, Today
|
||||
|
||||
* [`autoprefixer`] adds vendor prefixes, using data from Can I Use.
|
||||
* [`postcss-cssnext`] allows you to use future CSS features today
|
||||
(includes `autoprefixer`).
|
||||
* [`postcss-image-set-polyfill`] emulates [`image-set`] function logic for all browsers
|
||||
|
||||
### Better CSS Readability
|
||||
|
||||
* [`precss`] contains plugins for Sass-like features, like variables, nesting,
|
||||
and mixins.
|
||||
* [`postcss-sorting`] sorts the content of rules and at-rules.
|
||||
* [`postcss-utilities`] includes the most commonly used shortcuts and helpers.
|
||||
* [`short`] adds and extends numerous shorthand properties.
|
||||
|
||||
### Images and Fonts
|
||||
|
||||
* [`postcss-assets`] inserts image dimensions and inlines files.
|
||||
* [`postcss-sprites`] generates image sprites.
|
||||
* [`font-magician`] generates all the `@font-face` rules needed in CSS.
|
||||
* [`postcss-inline-svg`] allows you to inline SVG and customize its styles.
|
||||
* [`postcss-write-svg`] allows you to write simple SVG directly in your CSS.
|
||||
|
||||
### Linters
|
||||
|
||||
* [`stylelint`] is a modular stylesheet linter.
|
||||
* [`stylefmt`] is a tool that automatically formats CSS
|
||||
according `stylelint` rules.
|
||||
* [`doiuse`] lints CSS for browser support, using data from Can I Use.
|
||||
* [`colorguard`] helps you maintain a consistent color palette.
|
||||
|
||||
### Other
|
||||
|
||||
* [`postcss-rtl`] combines both-directional (left-to-right and right-to-left) styles in one CSS file.
|
||||
* [`cssnano`] is a modular CSS minifier.
|
||||
* [`lost`] is a feature-rich `calc()` grid system.
|
||||
* [`rtlcss`] mirrors styles for right-to-left locales.
|
||||
|
||||
[`postcss-image-set-polyfill`]: https://github.com/SuperOl3g/postcss-image-set-polyfill
|
||||
[PostCSS plugin development]: https://github.com/postcss/postcss/blob/master/docs/writing-a-plugin.md
|
||||
[`postcss-inline-svg`]: https://github.com/TrySound/postcss-inline-svg
|
||||
[`react-css-modules`]: https://github.com/gajus/react-css-modules
|
||||
[`postcss-autoreset`]: https://github.com/maximkoretskiy/postcss-autoreset
|
||||
[`postcss-write-svg`]: https://github.com/jonathantneal/postcss-write-svg
|
||||
[`postcss-utilities`]: https://github.com/ismamz/postcss-utilities
|
||||
[`postcss-initial`]: https://github.com/maximkoretskiy/postcss-initial
|
||||
[`postcss-sprites`]: https://github.com/2createStudio/postcss-sprites
|
||||
[`postcss-modules`]: https://github.com/outpunk/postcss-modules
|
||||
[`postcss-sorting`]: https://github.com/hudochenkov/postcss-sorting
|
||||
[`postcss-cssnext`]: http://cssnext.io
|
||||
[`postcss-assets`]: https://github.com/assetsjs/postcss-assets
|
||||
[`font-magician`]: https://github.com/jonathantneal/postcss-font-magician
|
||||
[`autoprefixer`]: https://github.com/postcss/autoprefixer
|
||||
[`cq-prolyfill`]: https://github.com/ausi/cq-prolyfill
|
||||
[`postcss-rtl`]: https://github.com/vkalinichev/postcss-rtl
|
||||
[`postcss-use`]: https://github.com/postcss/postcss-use
|
||||
[`css-modules`]: https://github.com/css-modules/css-modules
|
||||
[`colorguard`]: https://github.com/SlexAxton/css-colorguard
|
||||
[`stylelint`]: https://github.com/stylelint/stylelint
|
||||
[`image-set`]: https://drafts.csswg.org/css-images-4/#image-set-notation
|
||||
[`stylefmt`]: https://github.com/morishitter/stylefmt
|
||||
[`cssnano`]: http://cssnano.co
|
||||
[`precss`]: https://github.com/jonathantneal/precss
|
||||
[`doiuse`]: https://github.com/anandthakker/doiuse
|
||||
[`rtlcss`]: https://github.com/MohammadYounes/rtlcss
|
||||
[`short`]: https://github.com/jonathantneal/postcss-short
|
||||
[`lost`]: https://github.com/peterramsing/lost
|
||||
|
||||
## Syntaxes
|
||||
|
||||
PostCSS can transform styles in any syntax, not just CSS.
|
||||
If there is not yet support for your favorite syntax,
|
||||
you can write a parser and/or stringifier to extend PostCSS.
|
||||
|
||||
* [`sugarss`] is a indent-based syntax like Sass or Stylus.
|
||||
* [`postcss-html`] allows you to write styles in HTML / [Markdown](https://daringfireball.net/projects/markdown/syntax) / [Vue component](https://vue-loader.vuejs.org/)
|
||||
* [`postcss-scss`] allows you to work with SCSS
|
||||
*(but does not compile SCSS to CSS)*.
|
||||
* [`postcss-sass`] allows you to work with Sass
|
||||
*(but does not compile Sass to CSS)*.
|
||||
* [`postcss-less`] allows you to work with Less
|
||||
*(but does not compile LESS to CSS)*.
|
||||
* [`postcss-less-engine`] allows you to work with Less
|
||||
*(and DOES compile LESS to CSS using true Less.js evaluation)*.
|
||||
* [`postcss-js`] allows you to write styles in JS or transform
|
||||
React Inline Styles, Radium or JSS.
|
||||
* [`postcss-safe-parser`] finds and fixes CSS syntax errors.
|
||||
* [`midas`] converts a CSS string to highlighted HTML.
|
||||
|
||||
[`postcss-less-engine`]: https://github.com/Crunch/postcss-less
|
||||
[`postcss-safe-parser`]: https://github.com/postcss/postcss-safe-parser
|
||||
[`postcss-html`]: https://github.com/gucong3000/postcss-html
|
||||
[`postcss-scss`]: https://github.com/postcss/postcss-scss
|
||||
[`postcss-sass`]: https://github.com/AleshaOleg/postcss-sass
|
||||
[`postcss-less`]: https://github.com/webschik/postcss-less
|
||||
[`postcss-js`]: https://github.com/postcss/postcss-js
|
||||
[`sugarss`]: https://github.com/postcss/sugarss
|
||||
[`midas`]: https://github.com/ben-eb/midas
|
||||
|
||||
## Articles
|
||||
|
||||
* [Some things you may think about PostCSS… and you might be wrong](http://julian.io/some-things-you-may-think-about-postcss-and-you-might-be-wrong)
|
||||
* [What PostCSS Really Is; What It Really Does](http://davidtheclark.com/its-time-for-everyone-to-learn-about-postcss)
|
||||
* [PostCSS Guides](http://webdesign.tutsplus.com/series/postcss-deep-dive--cms-889)
|
||||
|
||||
More articles and videos you can find on [awesome-postcss](https://github.com/jjaderg/awesome-postcss) list.
|
||||
|
||||
## Books
|
||||
|
||||
* [Mastering PostCSS for Web Design](https://www.packtpub.com/web-development/mastering-postcss-web-design) by Alex Libby, Packt. (June 2016)
|
||||
|
||||
## Usage
|
||||
|
||||
You can start using PostCSS in just two steps:
|
||||
|
||||
1. Find and add PostCSS extensions for your build tool.
|
||||
2. [Select plugins] and add them to your PostCSS process.
|
||||
|
||||
[Select plugins]: http://postcss.parts
|
||||
|
||||
### Webpack
|
||||
|
||||
Use [`postcss-loader`] in `webpack.config.js`:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
exclude: /node_modules/,
|
||||
use: [
|
||||
{
|
||||
loader: 'style-loader',
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Then create `postcss.config.js`:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('precss'),
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
[`postcss-loader`]: https://github.com/postcss/postcss-loader
|
||||
|
||||
### Gulp
|
||||
|
||||
Use [`gulp-postcss`] and [`gulp-sourcemaps`].
|
||||
|
||||
```js
|
||||
gulp.task('css', function () {
|
||||
var postcss = require('gulp-postcss');
|
||||
var sourcemaps = require('gulp-sourcemaps');
|
||||
|
||||
return gulp.src('src/**/*.css')
|
||||
.pipe( sourcemaps.init() )
|
||||
.pipe( postcss([ require('precss'), require('autoprefixer') ]) )
|
||||
.pipe( sourcemaps.write('.') )
|
||||
.pipe( gulp.dest('build/') );
|
||||
});
|
||||
```
|
||||
|
||||
[`gulp-sourcemaps`]: https://github.com/floridoo/gulp-sourcemaps
|
||||
[`gulp-postcss`]: https://github.com/postcss/gulp-postcss
|
||||
|
||||
### npm run / CLI
|
||||
|
||||
To use PostCSS from your command-line interface or with npm scripts
|
||||
there is [`postcss-cli`].
|
||||
|
||||
```sh
|
||||
postcss --use autoprefixer -c options.json -o main.css css/*.css
|
||||
```
|
||||
|
||||
[`postcss-cli`]: https://github.com/postcss/postcss-cli
|
||||
|
||||
### Browser
|
||||
|
||||
If you want to compile CSS string in browser (for instance, in live edit
|
||||
tools like CodePen), just use [Browserify] or [webpack]. They will pack
|
||||
PostCSS and plugins files into a single file.
|
||||
|
||||
To apply PostCSS plugins to React Inline Styles, JSS, Radium
|
||||
and other [CSS-in-JS], you can use [`postcss-js`] and transforms style objects.
|
||||
|
||||
```js
|
||||
var postcss = require('postcss-js');
|
||||
var prefixer = postcss.sync([ require('autoprefixer') ]);
|
||||
|
||||
prefixer({ display: 'flex' }); //=> { display: ['-webkit-box', '-webkit-flex', '-ms-flexbox', 'flex'] }
|
||||
```
|
||||
|
||||
[`postcss-js`]: https://github.com/postcss/postcss-js
|
||||
[Browserify]: http://browserify.org/
|
||||
[CSS-in-JS]: https://github.com/MicheleBertoli/css-in-js
|
||||
[webpack]: https://webpack.github.io/
|
||||
|
||||
### Runners
|
||||
|
||||
* **Grunt**: [`grunt-postcss`](https://github.com/nDmitry/grunt-postcss)
|
||||
* **HTML**: [`posthtml-postcss`](https://github.com/posthtml/posthtml-postcss)
|
||||
* **Stylus**: [`poststylus`](https://github.com/seaneking/poststylus)
|
||||
* **Rollup**: [`rollup-plugin-postcss`](https://github.com/egoist/rollup-plugin-postcss)
|
||||
* **Brunch**: [`postcss-brunch`](https://github.com/brunch/postcss-brunch)
|
||||
* **Broccoli**: [`broccoli-postcss`](https://github.com/jeffjewiss/broccoli-postcss)
|
||||
* **Meteor**: [`postcss`](https://atmospherejs.com/juliancwirko/postcss)
|
||||
* **ENB**: [`enb-postcss`](https://github.com/awinogradov/enb-postcss)
|
||||
* **Taskr**: [`taskr-postcss`](https://github.com/lukeed/taskr/tree/master/packages/postcss)
|
||||
* **Start**: [`start-postcss`](https://github.com/start-runner/postcss)
|
||||
* **Connect/Express**: [`postcss-middleware`](https://github.com/jedmao/postcss-middleware)
|
||||
|
||||
### JS API
|
||||
|
||||
For other environments, you can use the JS API:
|
||||
|
||||
```js
|
||||
const fs = require('fs');
|
||||
const postcss = require('postcss');
|
||||
const precss = require('precss');
|
||||
const autoprefixer = require('autoprefixer');
|
||||
|
||||
fs.readFile('src/app.css', (err, css) => {
|
||||
postcss([precss, autoprefixer])
|
||||
.process(css, { from: 'src/app.css', to: 'dest/app.css' })
|
||||
.then(result => {
|
||||
fs.writeFile('dest/app.css', result.css);
|
||||
if ( result.map ) fs.writeFile('dest/app.css.map', result.map);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
Read the [PostCSS API documentation] for more details about the JS API.
|
||||
|
||||
All PostCSS runners should pass [PostCSS Runner Guidelines].
|
||||
|
||||
[PostCSS Runner Guidelines]: https://github.com/postcss/postcss/blob/master/docs/guidelines/runner.md
|
||||
[PostCSS API documentation]: http://api.postcss.org/postcss.html
|
||||
|
||||
### Options
|
||||
|
||||
Most PostCSS runners accept two parameters:
|
||||
|
||||
* An array of plugins.
|
||||
* An object of options.
|
||||
|
||||
Common options:
|
||||
|
||||
* `syntax`: an object providing a syntax parser and a stringifier.
|
||||
* `parser`: a special syntax parser (for example, [SCSS]).
|
||||
* `stringifier`: a special syntax output generator (for example, [Midas]).
|
||||
* `map`: [source map options].
|
||||
* `from`: the input file name (most runners set it automatically).
|
||||
* `to`: the output file name (most runners set it automatically).
|
||||
|
||||
[source map options]: https://github.com/postcss/postcss/blob/master/docs/source-maps.md
|
||||
[Midas]: https://github.com/ben-eb/midas
|
||||
[SCSS]: https://github.com/postcss/postcss-scss
|
||||
|
||||
## Editors & IDE Integration
|
||||
|
||||
### Atom
|
||||
|
||||
* [`language-postcss`] adds PostCSS and [SugarSS] highlight.
|
||||
* [`source-preview-postcss`] previews your output CSS in a separate, live pane.
|
||||
|
||||
[SugarSS]: https://github.com/postcss/sugarss
|
||||
|
||||
### Sublime Text
|
||||
|
||||
* [`Syntax-highlighting-for-PostCSS`] adds PostCSS highlight.
|
||||
|
||||
[`Syntax-highlighting-for-PostCSS`]: https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS
|
||||
[`source-preview-postcss`]: https://atom.io/packages/source-preview-postcss
|
||||
[`language-postcss`]: https://atom.io/packages/language-postcss
|
||||
|
||||
### Vim
|
||||
|
||||
* [`postcss.vim`] adds PostCSS highlight.
|
||||
|
||||
[`postcss.vim`]: https://github.com/stephenway/postcss.vim
|
||||
|
||||
### WebStorm
|
||||
|
||||
WebStorm 2016.3 [has] built-in PostCSS support.
|
||||
|
||||
[has]: https://blog.jetbrains.com/webstorm/2016/08/webstorm-2016-3-early-access-preview/
|
||||
195
build/node_modules/autoprefixer/node_modules/postcss/docs/guidelines/plugin.md
generated
vendored
Normal file
195
build/node_modules/autoprefixer/node_modules/postcss/docs/guidelines/plugin.md
generated
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
# PostCSS Plugin Guidelines
|
||||
|
||||
A PostCSS plugin is a function that receives and, usually,
|
||||
transforms a CSS AST from the PostCSS parser.
|
||||
|
||||
The rules below are *mandatory* for all PostCSS plugins.
|
||||
|
||||
See also [ClojureWerkz’s recommendations] for open source projects.
|
||||
|
||||
[ClojureWerkz’s recommendations]: http://blog.clojurewerkz.org/blog/2013/04/20/how-to-make-your-open-source-project-really-awesome/
|
||||
|
||||
## 1. API
|
||||
|
||||
### 1.1 Clear name with `postcss-` prefix
|
||||
|
||||
The plugin’s purpose should be clear just by reading its name.
|
||||
If you wrote a transpiler for CSS 4 Custom Media, `postcss-custom-media`
|
||||
would be a good name. If you wrote a plugin to support mixins,
|
||||
`postcss-mixins` would be a good name.
|
||||
|
||||
The prefix `postcss-` shows that the plugin is part of the PostCSS ecosystem.
|
||||
|
||||
This rule is not mandatory for plugins that can run as independent tools,
|
||||
without the user necessarily knowing that it is powered by
|
||||
PostCSS — for example, [cssnext] and [Autoprefixer].
|
||||
|
||||
[Autoprefixer]: https://github.com/postcss/autoprefixer
|
||||
[cssnext]: http://cssnext.io/
|
||||
|
||||
### 1.2. Do one thing, and do it well
|
||||
|
||||
Do not create multitool plugins. Several small, one-purpose plugins bundled into
|
||||
a plugin pack is usually a better solution.
|
||||
|
||||
For example, [cssnext] contains many small plugins,
|
||||
one for each W3C specification. And [cssnano] contains a separate plugin
|
||||
for each of its optimization.
|
||||
|
||||
[cssnext]: http://cssnext.io/
|
||||
[cssnano]: https://github.com/ben-eb/cssnano
|
||||
|
||||
### 1.3. Do not use mixins
|
||||
|
||||
Preprocessors libraries like Compass provide an API with mixins.
|
||||
|
||||
PostCSS plugins are different.
|
||||
A plugin cannot be just a set of mixins for [postcss-mixins].
|
||||
|
||||
To achieve your goal, consider transforming valid CSS
|
||||
or using custom at-rules and custom properties.
|
||||
|
||||
[postcss-mixins]: https://github.com/postcss/postcss-mixins
|
||||
|
||||
### 1.4. Create plugin by `postcss.plugin`
|
||||
|
||||
By wrapping your function in this method,
|
||||
you are hooking into a common plugin API:
|
||||
|
||||
```js
|
||||
module.exports = postcss.plugin('plugin-name', function (opts) {
|
||||
return function (root, result) {
|
||||
// Plugin code
|
||||
};
|
||||
});
|
||||
```
|
||||
|
||||
## 2. Processing
|
||||
|
||||
### 2.1. Plugin must be tested
|
||||
|
||||
A CI service like [Travis] is also recommended for testing code in
|
||||
different environments. You should test in (at least) Node.js [active LTS](https://github.com/nodejs/LTS) and current stable version.
|
||||
|
||||
[Travis]: https://travis-ci.org/
|
||||
|
||||
### 2.2. Use asynchronous methods whenever possible
|
||||
|
||||
For example, use `fs.writeFile` instead of `fs.writeFileSync`:
|
||||
|
||||
```js
|
||||
postcss.plugin('plugin-sprite', function (opts) {
|
||||
return function (root, result) {
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
var sprite = makeSprite();
|
||||
fs.writeFile(opts.file, function (err) {
|
||||
if ( err ) return reject(err);
|
||||
resolve();
|
||||
})
|
||||
});
|
||||
|
||||
};
|
||||
});
|
||||
```
|
||||
|
||||
### 2.3. Set `node.source` for new nodes
|
||||
|
||||
Every node must have a relevant `source` so PostCSS can generate
|
||||
an accurate source map.
|
||||
|
||||
So if you add new declaration based on some existing declaration, you should
|
||||
clone the existing declaration in order to save that original `source`.
|
||||
|
||||
```js
|
||||
if ( needPrefix(decl.prop) ) {
|
||||
decl.cloneBefore({ prop: '-webkit-' + decl.prop });
|
||||
}
|
||||
```
|
||||
|
||||
You can also set `source` directly, copying from some existing node:
|
||||
|
||||
```js
|
||||
if ( decl.prop === 'animation' ) {
|
||||
var keyframe = createAnimationByName(decl.value);
|
||||
keyframes.source = decl.source;
|
||||
decl.root().append(keyframes);
|
||||
}
|
||||
```
|
||||
|
||||
### 2.4. Use only the public PostCSS API
|
||||
|
||||
PostCSS plugins must not rely on undocumented properties or methods,
|
||||
which may be subject to change in any minor release. The public API
|
||||
is described in [API docs].
|
||||
|
||||
[API docs]: http://api.postcss.org/
|
||||
|
||||
## 3. Errors
|
||||
|
||||
### 3.1. Use `node.error` on CSS relevant errors
|
||||
|
||||
If you have an error because of input CSS (like an unknown name
|
||||
in a mixin plugin) you should use `node.error` to create an error
|
||||
that includes source position:
|
||||
|
||||
```js
|
||||
if ( typeof mixins[name] === 'undefined' ) {
|
||||
throw decl.error('Unknown mixin ' + name, { plugin: 'postcss-mixins' });
|
||||
}
|
||||
```
|
||||
|
||||
### 3.2. Use `result.warn` for warnings
|
||||
|
||||
Do not print warnings with `console.log` or `console.warn`,
|
||||
because some PostCSS runner may not allow console output.
|
||||
|
||||
```js
|
||||
if ( outdated(decl.prop) ) {
|
||||
result.warn(decl.prop + ' is outdated', { node: decl });
|
||||
}
|
||||
```
|
||||
|
||||
If CSS input is a source of the warning, the plugin must set the `node` option.
|
||||
|
||||
## 4. Documentation
|
||||
|
||||
### 4.1. Document your plugin in English
|
||||
|
||||
PostCSS plugins must have their `README.md` written in English. Do not be afraid
|
||||
of your English skills, as the open source community will fix your errors.
|
||||
|
||||
Of course, you are welcome to write documentation in other languages;
|
||||
just name them appropriately (e.g. `README.ja.md`).
|
||||
|
||||
### 4.2. Include input and output examples
|
||||
|
||||
The plugin's `README.md` must contain example input and output CSS.
|
||||
A clear example is the best way to describe how your plugin works.
|
||||
|
||||
The first section of the `README.md` is a good place to put examples.
|
||||
See [postcss-opacity](https://github.com/iamvdo/postcss-opacity) for an example.
|
||||
|
||||
Of course, this guideline does not apply if your plugin does not
|
||||
transform the CSS.
|
||||
|
||||
### 4.3. Maintain a changelog
|
||||
|
||||
PostCSS plugins must describe the changes of all their releases
|
||||
in a separate file, such as `CHANGELOG.md`, `History.md`, or [GitHub Releases].
|
||||
Visit [Keep A Changelog] for more information about how to write one of these.
|
||||
|
||||
Of course, you should be using [SemVer].
|
||||
|
||||
[Keep A Changelog]: http://keepachangelog.com/
|
||||
[GitHub Releases]: https://help.github.com/articles/creating-releases/
|
||||
[SemVer]: http://semver.org/
|
||||
|
||||
### 4.4. Include `postcss-plugin` keyword in `package.json`
|
||||
|
||||
PostCSS plugins written for npm must have the `postcss-plugin` keyword
|
||||
in their `package.json`. This special keyword will be useful for feedback about
|
||||
the PostCSS ecosystem.
|
||||
|
||||
For packages not published to npm, this is not mandatory, but is recommended
|
||||
if the package format can contain keywords.
|
||||
143
build/node_modules/autoprefixer/node_modules/postcss/docs/guidelines/runner.md
generated
vendored
Normal file
143
build/node_modules/autoprefixer/node_modules/postcss/docs/guidelines/runner.md
generated
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
# PostCSS Runner Guidelines
|
||||
|
||||
A PostCSS runner is a tool that processes CSS through a user-defined list
|
||||
of plugins; for example, [`postcss-cli`] or [`gulp‑postcss`].
|
||||
These rules are mandatory for any such runners.
|
||||
|
||||
For single-plugin tools, like [`gulp-autoprefixer`],
|
||||
these rules are not mandatory but are highly recommended.
|
||||
|
||||
See also [ClojureWerkz’s recommendations] for open source projects.
|
||||
|
||||
[ClojureWerkz’s recommendations]: http://blog.clojurewerkz.org/blog/2013/04/20/how-to-make-your-open-source-project-really-awesome/
|
||||
[`gulp-autoprefixer`]: https://github.com/sindresorhus/gulp-autoprefixer
|
||||
[`gulp‑postcss`]: https://github.com/w0rm/gulp-postcss
|
||||
[`postcss-cli`]: https://github.com/postcss/postcss-cli
|
||||
|
||||
## 1. API
|
||||
|
||||
### 1.1. Accept functions in plugin parameters
|
||||
|
||||
If your runner uses a config file, it must be written in JavaScript, so that
|
||||
it can support plugins which accept a function, such as [`postcss-assets`]:
|
||||
|
||||
```js
|
||||
module.exports = [
|
||||
require('postcss-assets')({
|
||||
cachebuster: function (file) {
|
||||
return fs.statSync(file).mtime.getTime().toString(16);
|
||||
}
|
||||
})
|
||||
];
|
||||
```
|
||||
|
||||
[`postcss-assets`]: https://github.com/borodean/postcss-assets
|
||||
|
||||
## 2. Processing
|
||||
|
||||
### 2.1. Set `from` and `to` processing options
|
||||
|
||||
To ensure that PostCSS generates source maps and displays better syntax errors,
|
||||
runners must specify the `from` and `to` options. If your runner does not handle
|
||||
writing to disk (for example, a gulp transform), you should set both options
|
||||
to point to the same file:
|
||||
|
||||
```js
|
||||
processor.process({ from: file.path, to: file.path });
|
||||
```
|
||||
|
||||
### 2.2. Use only the asynchronous API
|
||||
|
||||
PostCSS runners must use only the asynchronous API.
|
||||
The synchronous API is provided only for debugging, is slower,
|
||||
and can’t work with asynchronous plugins.
|
||||
|
||||
```js
|
||||
processor.process(opts).then(function (result) {
|
||||
// processing is finished
|
||||
});
|
||||
```
|
||||
|
||||
### 2.3. Use only the public PostCSS API
|
||||
|
||||
PostCSS runners must not rely on undocumented properties or methods,
|
||||
which may be subject to change in any minor release. The public API
|
||||
is described in [API docs].
|
||||
|
||||
[API docs]: http://api.postcss.org/
|
||||
|
||||
## 3. Output
|
||||
|
||||
### 3.1. Don’t show JS stack for `CssSyntaxError`
|
||||
|
||||
PostCSS runners must not show a stack trace for CSS syntax errors,
|
||||
as the runner can be used by developers who are not familiar with JavaScript.
|
||||
Instead, handle such errors gracefully:
|
||||
|
||||
```js
|
||||
processor.process(opts).catch(function (error) {
|
||||
if ( error.name === 'CssSyntaxError' ) {
|
||||
process.stderr.write(error.message + error.showSourceCode());
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### 3.2. Display `result.warnings()`
|
||||
|
||||
PostCSS runners must output warnings from `result.warnings()`:
|
||||
|
||||
```js
|
||||
result.warnings().forEach(function (warn) {
|
||||
process.stderr.write(warn.toString());
|
||||
});
|
||||
```
|
||||
|
||||
See also [postcss-log-warnings] and [postcss-messages] plugins.
|
||||
|
||||
[postcss-log-warnings]: https://github.com/davidtheclark/postcss-log-warnings
|
||||
[postcss-messages]: https://github.com/postcss/postcss-messages
|
||||
|
||||
### 3.3. Allow the user to write source maps to different files
|
||||
|
||||
PostCSS by default will inline source maps in the generated file; however,
|
||||
PostCSS runners must provide an option to save the source map in a different
|
||||
file:
|
||||
|
||||
```js
|
||||
if ( result.map ) {
|
||||
fs.writeFile(opts.to + '.map', result.map.toString());
|
||||
}
|
||||
```
|
||||
|
||||
## 4. Documentation
|
||||
|
||||
### 4.1. Document your runner in English
|
||||
|
||||
PostCSS runners must have their `README.md` written in English. Do not be afraid
|
||||
of your English skills, as the open source community will fix your errors.
|
||||
|
||||
Of course, you are welcome to write documentation in other languages;
|
||||
just name them appropriately (e.g. `README.ja.md`).
|
||||
|
||||
### 4.2. Maintain a changelog
|
||||
|
||||
PostCSS runners must describe changes of all releases in a separate file,
|
||||
such as `ChangeLog.md`, `History.md`, or with [GitHub Releases].
|
||||
Visit [Keep A Changelog] for more information on how to write one of these.
|
||||
|
||||
Of course you should use [SemVer].
|
||||
|
||||
[Keep A Changelog]: http://keepachangelog.com/
|
||||
[GitHub Releases]: https://help.github.com/articles/creating-releases/
|
||||
[SemVer]: http://semver.org/
|
||||
|
||||
### 4.3. `postcss-runner` keyword in `package.json`
|
||||
|
||||
PostCSS runners written for npm must have the `postcss-runner` keyword
|
||||
in their `package.json`. This special keyword will be useful for feedback about
|
||||
the PostCSS ecosystem.
|
||||
|
||||
For packages not published to npm, this is not mandatory, but recommended
|
||||
if the package format is allowed to contain keywords.
|
||||
74
build/node_modules/autoprefixer/node_modules/postcss/docs/source-maps.md
generated
vendored
Normal file
74
build/node_modules/autoprefixer/node_modules/postcss/docs/source-maps.md
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
# PostCSS and Source Maps
|
||||
|
||||
PostCSS has great [source maps] support. It can read and interpret maps
|
||||
from previous transformation steps, autodetect the format that you expect,
|
||||
and output both external and inline maps.
|
||||
|
||||
To ensure that you generate an accurate source map, you must indicate the input
|
||||
and output CSS file paths — using the options `from` and `to`, respectively.
|
||||
|
||||
To generate a new source map with the default options, simply set `map: true`.
|
||||
This will generate an inline source map that contains the source content.
|
||||
If you don’t want the map inlined, you can set `map.inline: false`.
|
||||
|
||||
```js
|
||||
processor
|
||||
.process(css, {
|
||||
from: 'app.sass.css',
|
||||
to: 'app.css',
|
||||
map: { inline: false },
|
||||
})
|
||||
.then(function (result) {
|
||||
result.map //=> '{ "version":3,
|
||||
// "file":"app.css",
|
||||
// "sources":["app.sass"],
|
||||
// "mappings":"AAAA,KAAI" }'
|
||||
});
|
||||
```
|
||||
|
||||
If PostCSS finds source maps from a previous transformation,
|
||||
it will automatically update that source map with the same options.
|
||||
|
||||
## Options
|
||||
|
||||
If you want more control over source map generation, you can define the `map`
|
||||
option as an object with the following parameters:
|
||||
|
||||
* `inline` boolean: indicates that the source map should be embedded
|
||||
in the output CSS as a Base64-encoded comment. By default, it is `true`.
|
||||
But if all previous maps are external, not inline, PostCSS will not embed
|
||||
the map even if you do not set this option.
|
||||
|
||||
If you have an inline source map, the `result.map` property will be empty,
|
||||
as the source map will be contained within the text of `result.css`.
|
||||
|
||||
* `prev` string, object, boolean or function: source map content from
|
||||
a previous processing step (for example, Sass compilation).
|
||||
PostCSS will try to read the previous source map automatically
|
||||
(based on comments within the source CSS), but you can use this option
|
||||
to identify it manually. If desired, you can omit the previous map
|
||||
with `prev: false`.
|
||||
|
||||
* `sourcesContent` boolean: indicates that PostCSS should set the origin
|
||||
content (for example, Sass source) of the source map. By default,
|
||||
it is `true`. But if all previous maps do not contain sources content,
|
||||
PostCSS will also leave it out even if you do not set this option.
|
||||
|
||||
* `annotation` boolean or string: indicates that PostCSS should add annotation
|
||||
comments to the CSS. By default, PostCSS will always add a comment with a path
|
||||
to the source map. PostCSS will not add annotations to CSS files that
|
||||
do not contain any comments.
|
||||
|
||||
By default, PostCSS presumes that you want to save the source map as
|
||||
`opts.to + '.map'` and will use this path in the annotation comment.
|
||||
A different path can be set by providing a string value for `annotation`.
|
||||
|
||||
If you have set `inline: true`, annotation cannot be disabled.
|
||||
|
||||
* `from` string: by default, PostCSS will set the `sources` property of the map
|
||||
to the value of the `from` option. If you want to override this behaviour, you
|
||||
can use `map.from` to explicitly set the source map's `sources` property.
|
||||
Path should be absolute or relative from generated file
|
||||
(`to` option in `process()` method).
|
||||
|
||||
[source maps]: http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/
|
||||
231
build/node_modules/autoprefixer/node_modules/postcss/docs/syntax.md
generated
vendored
Normal file
231
build/node_modules/autoprefixer/node_modules/postcss/docs/syntax.md
generated
vendored
Normal file
@@ -0,0 +1,231 @@
|
||||
# How to Write Custom Syntax
|
||||
|
||||
PostCSS can transform styles in any syntax, and is not limited to just CSS.
|
||||
By writing a custom syntax, you can transform styles in any desired format.
|
||||
|
||||
Writing a custom syntax is much harder than writing a PostCSS plugin, but
|
||||
it is an awesome adventure.
|
||||
|
||||
There are 3 types of PostCSS syntax packages:
|
||||
|
||||
* **Parser** to parse input string to node’s tree.
|
||||
* **Stringifier** to generate output string by node’s tree.
|
||||
* **Syntax** contains both parser and stringifier.
|
||||
|
||||
## Syntax
|
||||
|
||||
A good example of a custom syntax is [SCSS]. Some users may want to transform
|
||||
SCSS sources with PostCSS plugins, for example if they need to add vendor
|
||||
prefixes or change the property order. So this syntax should output SCSS from
|
||||
an SCSS input.
|
||||
|
||||
The syntax API is a very simple plain object, with `parse` & `stringify`
|
||||
functions:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
parse: require('./parse'),
|
||||
stringify: require('./stringify')
|
||||
};
|
||||
```
|
||||
|
||||
[SCSS]: https://github.com/postcss/postcss-scss
|
||||
|
||||
## Parser
|
||||
|
||||
A good example of a parser is [Safe Parser], which parses malformed/broken CSS.
|
||||
Because there is no point to generate broken output, this package only provides
|
||||
a parser.
|
||||
|
||||
The parser API is a function which receives a string & returns a [`Root`] node.
|
||||
The second argument is a function which receives an object with PostCSS options.
|
||||
|
||||
```js
|
||||
var postcss = require('postcss');
|
||||
|
||||
module.exports = function (css, opts) {
|
||||
var root = postcss.root();
|
||||
// Add other nodes to root
|
||||
return root;
|
||||
};
|
||||
```
|
||||
|
||||
[Safe Parser]: https://github.com/postcss/postcss-safe-parser
|
||||
[`Root`]: http://api.postcss.org/Root.html
|
||||
|
||||
### Main Theory
|
||||
|
||||
There are many books about parsers; but do not worry because CSS syntax is
|
||||
very easy, and so the parser will be much simpler than a programming language
|
||||
parser.
|
||||
|
||||
The default PostCSS parser contains two steps:
|
||||
|
||||
1. [Tokenizer] which reads input string character by character and builds a
|
||||
tokens array. For example, it joins space symbols to a `['space', '\n ']`
|
||||
token, and detects strings to a `['string', '"\"{"']` token.
|
||||
2. [Parser] which reads the tokens array, creates node instances and
|
||||
builds a tree.
|
||||
|
||||
[Tokenizer]: https://github.com/postcss/postcss/blob/master/lib/tokenize.es6
|
||||
[Parser]: https://github.com/postcss/postcss/blob/master/lib/parser.es6
|
||||
|
||||
### Performance
|
||||
|
||||
Parsing input is often the most time consuming task in CSS processors. So it
|
||||
is very important to have a fast parser.
|
||||
|
||||
The main rule of optimization is that there is no performance without a
|
||||
benchmark. You can look at [PostCSS benchmarks] to build your own.
|
||||
|
||||
Of parsing tasks, the tokenize step will often take the most time, so its
|
||||
performance should be prioritized. Unfortunately, classes, functions and
|
||||
high level structures can slow down your tokenizer. Be ready to write dirty
|
||||
code with repeated statements. This is why it is difficult to extend the
|
||||
default [PostCSS tokenizer]; copy & paste will be a necessary evil.
|
||||
|
||||
Second optimization is using character codes instead of strings.
|
||||
|
||||
```js
|
||||
// Slow
|
||||
string[i] === '{';
|
||||
|
||||
// Fast
|
||||
const OPEN_CURLY = 123; // `{'
|
||||
string.charCodeAt(i) === OPEN_CURLY;
|
||||
```
|
||||
|
||||
Third optimization is “fast jumps”. If you find open quotes, you can find
|
||||
next closing quote much faster by `indexOf`:
|
||||
|
||||
```js
|
||||
// Simple jump
|
||||
next = string.indexOf('"', currentPosition + 1);
|
||||
|
||||
// Jump by RegExp
|
||||
regexp.lastIndex = currentPosion + 1;
|
||||
regexp.text(string);
|
||||
next = regexp.lastIndex;
|
||||
```
|
||||
|
||||
The parser can be a well written class. There is no need in copy-paste and
|
||||
hardcore optimization there. You can extend the default [PostCSS parser].
|
||||
|
||||
[PostCSS benchmarks]: https://github.com/postcss/benchmark
|
||||
[PostCSS tokenizer]: https://github.com/postcss/postcss/blob/master/lib/tokenize.es6
|
||||
[PostCSS parser]: https://github.com/postcss/postcss/blob/master/lib/parser.es6
|
||||
|
||||
### Node Source
|
||||
|
||||
Every node should have `source` property to generate correct source map.
|
||||
This property contains `start` and `end` properties with `{ line, column }`,
|
||||
and `input` property with an [`Input`] instance.
|
||||
|
||||
Your tokenizer should save the original position so that you can propagate
|
||||
the values to the parser, to ensure that the source map is correctly updated.
|
||||
|
||||
[`Input`]: https://github.com/postcss/postcss/blob/master/lib/input.es6
|
||||
|
||||
### Raw Values
|
||||
|
||||
A good PostCSS parser should provide all information (including spaces symbols)
|
||||
to generate byte-to-byte equal output. It is not so difficult, but respectful
|
||||
for user input and allow integration smoke tests.
|
||||
|
||||
A parser should save all additional symbols to `node.raws` object.
|
||||
It is an open structure for you, you can add additional keys.
|
||||
For example, [SCSS parser] saves comment types (`/* */` or `//`)
|
||||
in `node.raws.inline`.
|
||||
|
||||
The default parser cleans CSS values from comments and spaces.
|
||||
It saves the original value with comments to `node.raws.value.raw` and uses it,
|
||||
if the node value was not changed.
|
||||
|
||||
[SCSS parser]: https://github.com/postcss/postcss-scss
|
||||
|
||||
### Tests
|
||||
|
||||
Of course, all parsers in the PostCSS ecosystem must have tests.
|
||||
|
||||
If your parser just extends CSS syntax (like [SCSS] or [Safe Parser]),
|
||||
you can use the [PostCSS Parser Tests]. It contains unit & integration tests.
|
||||
|
||||
[PostCSS Parser Tests]: https://github.com/postcss/postcss-parser-tests
|
||||
|
||||
## Stringifier
|
||||
|
||||
A style guide generator is a good example of a stringifier. It generates output
|
||||
HTML which contains CSS components. For this use case, a parser isn't necessary,
|
||||
so the package should just contain a stringifier.
|
||||
|
||||
The Stringifier API is little bit more complicated, than the parser API.
|
||||
PostCSS generates a source map, so a stringifier can’t just return a string.
|
||||
It must link every substring with its source node.
|
||||
|
||||
A Stringifier is a function which receives [`Root`] node and builder callback.
|
||||
Then it calls builder with every node’s string and node instance.
|
||||
|
||||
```js
|
||||
module.exports = function (root, builder) {
|
||||
// Some magic
|
||||
var string = decl.prop + ':' + decl.value + ';';
|
||||
builder(string, decl);
|
||||
// Some science
|
||||
};
|
||||
```
|
||||
|
||||
### Main Theory
|
||||
|
||||
PostCSS [default stringifier] is just a class with a method for each node type
|
||||
and many methods to detect raw properties.
|
||||
|
||||
In most cases it will be enough just to extend this class,
|
||||
like in [SCSS stringifier].
|
||||
|
||||
[default stringifier]: https://github.com/postcss/postcss/blob/master/lib/stringifier.es6
|
||||
[SCSS stringifier]: https://github.com/postcss/postcss-scss/blob/master/lib/scss-stringifier.es6
|
||||
|
||||
### Builder Function
|
||||
|
||||
A builder function will be passed to `stringify` function as second argument.
|
||||
For example, the default PostCSS stringifier class saves it
|
||||
to `this.builder` property.
|
||||
|
||||
Builder receives output substring and source node to append this substring
|
||||
to the final output.
|
||||
|
||||
Some nodes contain other nodes in the middle. For example, a rule has a `{`
|
||||
at the beginning, many declarations inside and a closing `}`.
|
||||
|
||||
For these cases, you should pass a third argument to builder function:
|
||||
`'start'` or `'end'` string:
|
||||
|
||||
```js
|
||||
this.builder(rule.selector + '{', rule, 'start');
|
||||
// Stringify declarations inside
|
||||
this.builder('}', rule, 'end');
|
||||
```
|
||||
|
||||
### Raw Values
|
||||
|
||||
A good PostCSS custom syntax saves all symbols and provide byte-to-byte equal
|
||||
output if there were no changes.
|
||||
|
||||
This is why every node has `node.raws` object to store space symbol, etc.
|
||||
|
||||
Be careful, because sometimes these raw properties will not be present; some
|
||||
nodes may be built manually, or may lose their indentation when they are moved
|
||||
to another parent node.
|
||||
|
||||
This is why the default stringifier has a `raw()` method to autodetect raw
|
||||
properties by other nodes. For example, it will look at other nodes to detect
|
||||
indent size and them multiply it with the current node depth.
|
||||
|
||||
### Tests
|
||||
|
||||
A stringifier must have tests too.
|
||||
|
||||
You can use unit and integration test cases from [PostCSS Parser Tests].
|
||||
Just compare input CSS with CSS after your parser and stringifier.
|
||||
|
||||
[PostCSS Parser Tests]: https://github.com/postcss/postcss-parser-tests
|
||||
97
build/node_modules/autoprefixer/node_modules/postcss/gulpfile.js
generated
vendored
Normal file
97
build/node_modules/autoprefixer/node_modules/postcss/gulpfile.js
generated
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
'use strict';
|
||||
|
||||
const gulp = require('gulp');
|
||||
|
||||
gulp.task('clean', () => {
|
||||
let del = require('del');
|
||||
return del(['lib/*.js', 'postcss.js', 'build/', 'api/']);
|
||||
});
|
||||
|
||||
// Build
|
||||
|
||||
gulp.task('compile', () => {
|
||||
let sourcemaps = require('gulp-sourcemaps');
|
||||
let changed = require('gulp-changed');
|
||||
let babel = require('gulp-babel');
|
||||
return gulp.src('lib/*.es6')
|
||||
.pipe(changed('lib', { extension: '.js' }))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(babel({
|
||||
presets: [
|
||||
[
|
||||
'env',
|
||||
{
|
||||
targets: {
|
||||
browsers: 'last 2 version',
|
||||
node: 4
|
||||
},
|
||||
loose: true
|
||||
}
|
||||
]
|
||||
],
|
||||
plugins: ['add-module-exports', 'precompile-charcodes']
|
||||
}))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest('lib'));
|
||||
});
|
||||
|
||||
gulp.task('build:lib', ['compile'], () => {
|
||||
return gulp.src(['lib/*.js', 'lib/*.d.ts']).pipe(gulp.dest('build/lib'));
|
||||
});
|
||||
|
||||
gulp.task('build:package', () => {
|
||||
const editor = require('gulp-json-editor');
|
||||
return gulp.src('./package.json')
|
||||
.pipe(editor((json) => {
|
||||
delete json.babel;
|
||||
delete json.scripts;
|
||||
delete json.jest;
|
||||
delete json.eslintConfig;
|
||||
delete json['size-limit'];
|
||||
delete json['pre-commit'];
|
||||
delete json['lint-staged'];
|
||||
delete json.devDependencies;
|
||||
return json;
|
||||
}))
|
||||
.pipe(gulp.dest('build'));
|
||||
});
|
||||
|
||||
gulp.task('build:docs', () => {
|
||||
let ignore = require('fs').readFileSync('.npmignore').toString()
|
||||
.trim().split(/\n+/)
|
||||
.concat([
|
||||
'package.json', '.npmignore', 'lib/*', 'test/*',
|
||||
'node_modules/**/*', 'docs/api.md', 'docs/plugins.md',
|
||||
'docs/writing-a-plugin.md'
|
||||
]).map( i => '!' + i );
|
||||
return gulp.src(['**/*'].concat(ignore))
|
||||
.pipe(gulp.dest('build'));
|
||||
});
|
||||
|
||||
gulp.task('build', done => {
|
||||
let runSequence = require('run-sequence');
|
||||
runSequence('clean', ['build:lib', 'build:docs', 'build:package'], done);
|
||||
});
|
||||
|
||||
// Tests
|
||||
|
||||
gulp.task('integration', ['build'], done => {
|
||||
let postcss = require('./build');
|
||||
let real = require('postcss-parser-tests/real');
|
||||
real(done, css => {
|
||||
return postcss.parse(css).toResult({ map: { annotation: false } });
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('version', ['build:lib'], () => {
|
||||
let Processor = require('./lib/processor');
|
||||
let instance = new Processor();
|
||||
let pkg = require('./package');
|
||||
if ( pkg.version !== instance.version ) {
|
||||
throw new Error('Version in Processor is not equal to package.json');
|
||||
}
|
||||
});
|
||||
|
||||
// Common
|
||||
|
||||
gulp.task('default', ['version', 'integration']);
|
||||
131
build/node_modules/autoprefixer/node_modules/postcss/lib/at-rule.js
generated
vendored
Normal file
131
build/node_modules/autoprefixer/node_modules/postcss/lib/at-rule.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
61
build/node_modules/autoprefixer/node_modules/postcss/lib/comment.js
generated
vendored
Normal file
61
build/node_modules/autoprefixer/node_modules/postcss/lib/comment.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _node = require('./node');
|
||||
|
||||
var _node2 = _interopRequireDefault(_node);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
|
||||
/**
|
||||
* Represents a comment between declarations or statements (rule and at-rules).
|
||||
*
|
||||
* Comments inside selectors, at-rule parameters, or declaration values
|
||||
* will be stored in the `raws` properties explained above.
|
||||
*
|
||||
* @extends Node
|
||||
*/
|
||||
var Comment = function (_Node) {
|
||||
_inherits(Comment, _Node);
|
||||
|
||||
function Comment(defaults) {
|
||||
_classCallCheck(this, Comment);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, _Node.call(this, defaults));
|
||||
|
||||
_this.type = 'comment';
|
||||
return _this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @memberof Comment#
|
||||
* @member {string} text - the comment’s text
|
||||
*/
|
||||
|
||||
/**
|
||||
* @memberof Comment#
|
||||
* @member {object} raws - Information to generate byte-to-byte equal
|
||||
* node string as it was in the origin input.
|
||||
*
|
||||
* Every parser saves its own properties,
|
||||
* but the default CSS parser uses:
|
||||
*
|
||||
* * `before`: the space symbols before the node.
|
||||
* * `left`: the space symbols between `/*` and the comment’s text.
|
||||
* * `right`: the space symbols between the comment’s text.
|
||||
*/
|
||||
|
||||
|
||||
return Comment;
|
||||
}(_node2.default);
|
||||
|
||||
exports.default = Comment;
|
||||
module.exports = exports['default'];
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQuZXM2Il0sIm5hbWVzIjpbIkNvbW1lbnQiLCJkZWZhdWx0cyIsInR5cGUiXSwibWFwcGluZ3MiOiI7Ozs7QUFBQTs7Ozs7Ozs7Ozs7O0FBRUE7Ozs7Ozs7O0lBUU1BLE87OztBQUVGLG1CQUFZQyxRQUFaLEVBQXNCO0FBQUE7O0FBQUEsaURBQ2xCLGlCQUFNQSxRQUFOLENBRGtCOztBQUVsQixVQUFLQyxJQUFMLEdBQVksU0FBWjtBQUZrQjtBQUdyQjs7QUFFRDs7Ozs7QUFLQTs7Ozs7Ozs7Ozs7Ozs7Ozs7a0JBY1dGLE8iLCJmaWxlIjoiY29tbWVudC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBOb2RlIGZyb20gJy4vbm9kZSc7XG5cbi8qKlxuICogUmVwcmVzZW50cyBhIGNvbW1lbnQgYmV0d2VlbiBkZWNsYXJhdGlvbnMgb3Igc3RhdGVtZW50cyAocnVsZSBhbmQgYXQtcnVsZXMpLlxuICpcbiAqIENvbW1lbnRzIGluc2lkZSBzZWxlY3RvcnMsIGF0LXJ1bGUgcGFyYW1ldGVycywgb3IgZGVjbGFyYXRpb24gdmFsdWVzXG4gKiB3aWxsIGJlIHN0b3JlZCBpbiB0aGUgYHJhd3NgIHByb3BlcnRpZXMgZXhwbGFpbmVkIGFib3ZlLlxuICpcbiAqIEBleHRlbmRzIE5vZGVcbiAqL1xuY2xhc3MgQ29tbWVudCBleHRlbmRzIE5vZGUge1xuXG4gICAgY29uc3RydWN0b3IoZGVmYXVsdHMpIHtcbiAgICAgICAgc3VwZXIoZGVmYXVsdHMpO1xuICAgICAgICB0aGlzLnR5cGUgPSAnY29tbWVudCc7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQG1lbWJlcm9mIENvbW1lbnQjXG4gICAgICogQG1lbWJlciB7c3RyaW5nfSB0ZXh0IC0gdGhlIGNvbW1lbnTigJlzIHRleHRcbiAgICAgKi9cblxuICAgIC8qKlxuICAgICAqIEBtZW1iZXJvZiBDb21tZW50I1xuICAgICAqIEBtZW1iZXIge29iamVjdH0gcmF3cyAtIEluZm9ybWF0aW9uIHRvIGdlbmVyYXRlIGJ5dGUtdG8tYnl0ZSBlcXVhbFxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUgc3RyaW5nIGFzIGl0IHdhcyBpbiB0aGUgb3JpZ2luIGlucHV0LlxuICAgICAqXG4gICAgICogRXZlcnkgcGFyc2VyIHNhdmVzIGl0cyBvd24gcHJvcGVydGllcyxcbiAgICAgKiBidXQgdGhlIGRlZmF1bHQgQ1NTIHBhcnNlciB1c2VzOlxuICAgICAqXG4gICAgICogKiBgYmVmb3JlYDogdGhlIHNwYWNlIHN5bWJvbHMgYmVmb3JlIHRoZSBub2RlLlxuICAgICAqICogYGxlZnRgOiB0aGUgc3BhY2Ugc3ltYm9scyBiZXR3ZWVuIGAvKmAgYW5kIHRoZSBjb21tZW504oCZcyB0ZXh0LlxuICAgICAqICogYHJpZ2h0YDogdGhlIHNwYWNlIHN5bWJvbHMgYmV0d2VlbiB0aGUgY29tbWVudOKAmXMgdGV4dC5cbiAgICAgKi9cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29tbWVudDtcbiJdfQ==
|
||||
907
build/node_modules/autoprefixer/node_modules/postcss/lib/container.js
generated
vendored
Normal file
907
build/node_modules/autoprefixer/node_modules/postcss/lib/container.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
256
build/node_modules/autoprefixer/node_modules/postcss/lib/css-syntax-error.js
generated
vendored
Normal file
256
build/node_modules/autoprefixer/node_modules/postcss/lib/css-syntax-error.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
101
build/node_modules/autoprefixer/node_modules/postcss/lib/declaration.js
generated
vendored
Normal file
101
build/node_modules/autoprefixer/node_modules/postcss/lib/declaration.js
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _node = require('./node');
|
||||
|
||||
var _node2 = _interopRequireDefault(_node);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
|
||||
/**
|
||||
* Represents a CSS declaration.
|
||||
*
|
||||
* @extends Node
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a { color: black }');
|
||||
* const decl = root.first.first;
|
||||
* decl.type //=> 'decl'
|
||||
* decl.toString() //=> ' color: black'
|
||||
*/
|
||||
var Declaration = function (_Node) {
|
||||
_inherits(Declaration, _Node);
|
||||
|
||||
function Declaration(defaults) {
|
||||
_classCallCheck(this, Declaration);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, _Node.call(this, defaults));
|
||||
|
||||
_this.type = 'decl';
|
||||
return _this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @memberof Declaration#
|
||||
* @member {string} prop - the declaration’s property name
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a { color: black }');
|
||||
* const decl = root.first.first;
|
||||
* decl.prop //=> 'color'
|
||||
*/
|
||||
|
||||
/**
|
||||
* @memberof Declaration#
|
||||
* @member {string} value - the declaration’s value
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a { color: black }');
|
||||
* const decl = root.first.first;
|
||||
* decl.value //=> 'black'
|
||||
*/
|
||||
|
||||
/**
|
||||
* @memberof Declaration#
|
||||
* @member {boolean} important - `true` if the declaration
|
||||
* has an !important annotation.
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a { color: black !important; color: red }');
|
||||
* root.first.first.important //=> true
|
||||
* root.first.last.important //=> undefined
|
||||
*/
|
||||
|
||||
/**
|
||||
* @memberof Declaration#
|
||||
* @member {object} raws - Information to generate byte-to-byte equal
|
||||
* node string as it was in the origin input.
|
||||
*
|
||||
* Every parser saves its own properties,
|
||||
* but the default CSS parser uses:
|
||||
*
|
||||
* * `before`: the space symbols before the node. It also stores `*`
|
||||
* and `_` symbols before the declaration (IE hack).
|
||||
* * `between`: the symbols between the property and value
|
||||
* for declarations.
|
||||
* * `important`: the content of the important statement,
|
||||
* if it is not just `!important`.
|
||||
*
|
||||
* PostCSS cleans declaration from comments and extra spaces,
|
||||
* but it stores origin content in raws properties.
|
||||
* As such, if you don’t change a declaration’s value,
|
||||
* PostCSS will use the raw value with comments.
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a {\n color:black\n}')
|
||||
* root.first.first.raws //=> { before: '\n ', between: ':' }
|
||||
*/
|
||||
|
||||
return Declaration;
|
||||
}(_node2.default);
|
||||
|
||||
exports.default = Declaration;
|
||||
module.exports = exports['default'];
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uLmVzNiJdLCJuYW1lcyI6WyJEZWNsYXJhdGlvbiIsImRlZmF1bHRzIiwidHlwZSJdLCJtYXBwaW5ncyI6Ijs7OztBQUFBOzs7Ozs7Ozs7Ozs7QUFFQTs7Ozs7Ozs7Ozs7SUFXTUEsVzs7O0FBRUYsdUJBQVlDLFFBQVosRUFBc0I7QUFBQTs7QUFBQSxpREFDbEIsaUJBQU1BLFFBQU4sQ0FEa0I7O0FBRWxCLFVBQUtDLElBQUwsR0FBWSxNQUFaO0FBRmtCO0FBR3JCOztBQUVEOzs7Ozs7Ozs7O0FBVUE7Ozs7Ozs7Ozs7QUFVQTs7Ozs7Ozs7Ozs7QUFXQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztrQkEyQldGLFciLCJmaWxlIjoiZGVjbGFyYXRpb24uanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgTm9kZSBmcm9tICcuL25vZGUnO1xuXG4vKipcbiAqIFJlcHJlc2VudHMgYSBDU1MgZGVjbGFyYXRpb24uXG4gKlxuICogQGV4dGVuZHMgTm9kZVxuICpcbiAqIEBleGFtcGxlXG4gKiBjb25zdCByb290ID0gcG9zdGNzcy5wYXJzZSgnYSB7IGNvbG9yOiBibGFjayB9Jyk7XG4gKiBjb25zdCBkZWNsID0gcm9vdC5maXJzdC5maXJzdDtcbiAqIGRlY2wudHlwZSAgICAgICAvLz0+ICdkZWNsJ1xuICogZGVjbC50b1N0cmluZygpIC8vPT4gJyBjb2xvcjogYmxhY2snXG4gKi9cbmNsYXNzIERlY2xhcmF0aW9uIGV4dGVuZHMgTm9kZSB7XG5cbiAgICBjb25zdHJ1Y3RvcihkZWZhdWx0cykge1xuICAgICAgICBzdXBlcihkZWZhdWx0cyk7XG4gICAgICAgIHRoaXMudHlwZSA9ICdkZWNsJztcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAbWVtYmVyb2YgRGVjbGFyYXRpb24jXG4gICAgICogQG1lbWJlciB7c3RyaW5nfSBwcm9wIC0gdGhlIGRlY2xhcmF0aW9u4oCZcyBwcm9wZXJ0eSBuYW1lXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIGNvbnN0IHJvb3QgPSBwb3N0Y3NzLnBhcnNlKCdhIHsgY29sb3I6IGJsYWNrIH0nKTtcbiAgICAgKiBjb25zdCBkZWNsID0gcm9vdC5maXJzdC5maXJzdDtcbiAgICAgKiBkZWNsLnByb3AgLy89PiAnY29sb3InXG4gICAgICovXG5cbiAgICAvKipcbiAgICAgKiBAbWVtYmVyb2YgRGVjbGFyYXRpb24jXG4gICAgICogQG1lbWJlciB7c3RyaW5nfSB2YWx1ZSAtIHRoZSBkZWNsYXJhdGlvbuKAmXMgdmFsdWVcbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoJ2EgeyBjb2xvcjogYmxhY2sgfScpO1xuICAgICAqIGNvbnN0IGRlY2wgPSByb290LmZpcnN0LmZpcnN0O1xuICAgICAqIGRlY2wudmFsdWUgLy89PiAnYmxhY2snXG4gICAgICovXG5cbiAgICAvKipcbiAgICAgKiBAbWVtYmVyb2YgRGVjbGFyYXRpb24jXG4gICAgICogQG1lbWJlciB7Ym9vbGVhbn0gaW1wb3J0YW50IC0gYHRydWVgIGlmIHRoZSBkZWNsYXJhdGlvblxuICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhcyBhbiAhaW1wb3J0YW50IGFubm90YXRpb24uXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIGNvbnN0IHJvb3QgPSBwb3N0Y3NzLnBhcnNlKCdhIHsgY29sb3I6IGJsYWNrICFpbXBvcnRhbnQ7IGNvbG9yOiByZWQgfScpO1xuICAgICAqIHJvb3QuZmlyc3QuZmlyc3QuaW1wb3J0YW50IC8vPT4gdHJ1ZVxuICAgICAqIHJvb3QuZmlyc3QubGFzdC5pbXBvcnRhbnQgIC8vPT4gdW5kZWZpbmVkXG4gICAgICovXG5cbiAgICAvKipcbiAgICAgKiBAbWVtYmVyb2YgRGVjbGFyYXRpb24jXG4gICAgICogQG1lbWJlciB7b2JqZWN0fSByYXdzIC0gSW5mb3JtYXRpb24gdG8gZ2VuZXJhdGUgYnl0ZS10by1ieXRlIGVxdWFsXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAgbm9kZSBzdHJpbmcgYXMgaXQgd2FzIGluIHRoZSBvcmlnaW4gaW5wdXQuXG4gICAgICpcbiAgICAgKiBFdmVyeSBwYXJzZXIgc2F2ZXMgaXRzIG93biBwcm9wZXJ0aWVzLFxuICAgICAqIGJ1dCB0aGUgZGVmYXVsdCBDU1MgcGFyc2VyIHVzZXM6XG4gICAgICpcbiAgICAgKiAqIGBiZWZvcmVgOiB0aGUgc3BhY2Ugc3ltYm9scyBiZWZvcmUgdGhlIG5vZGUuIEl0IGFsc28gc3RvcmVzIGAqYFxuICAgICAqICAgYW5kIGBfYCBzeW1ib2xzIGJlZm9yZSB0aGUgZGVjbGFyYXRpb24gKElFIGhhY2spLlxuICAgICAqICogYGJldHdlZW5gOiB0aGUgc3ltYm9scyBiZXR3ZWVuIHRoZSBwcm9wZXJ0eSBhbmQgdmFsdWVcbiAgICAgKiAgIGZvciBkZWNsYXJhdGlvbnMuXG4gICAgICogKiBgaW1wb3J0YW50YDogdGhlIGNvbnRlbnQgb2YgdGhlIGltcG9ydGFudCBzdGF0ZW1lbnQsXG4gICAgICogICBpZiBpdCBpcyBub3QganVzdCBgIWltcG9ydGFudGAuXG4gICAgICpcbiAgICAgKiBQb3N0Q1NTIGNsZWFucyBkZWNsYXJhdGlvbiBmcm9tIGNvbW1lbnRzIGFuZCBleHRyYSBzcGFjZXMsXG4gICAgICogYnV0IGl0IHN0b3JlcyBvcmlnaW4gY29udGVudCBpbiByYXdzIHByb3BlcnRpZXMuXG4gICAgICogQXMgc3VjaCwgaWYgeW91IGRvbuKAmXQgY2hhbmdlIGEgZGVjbGFyYXRpb27igJlzIHZhbHVlLFxuICAgICAqIFBvc3RDU1Mgd2lsbCB1c2UgdGhlIHJhdyB2YWx1ZSB3aXRoIGNvbW1lbnRzLlxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBjb25zdCByb290ID0gcG9zdGNzcy5wYXJzZSgnYSB7XFxuICBjb2xvcjpibGFja1xcbn0nKVxuICAgICAqIHJvb3QuZmlyc3QuZmlyc3QucmF3cyAvLz0+IHsgYmVmb3JlOiAnXFxuICAnLCBiZXR3ZWVuOiAnOicgfVxuICAgICAqL1xuXG59XG5cbmV4cG9ydCBkZWZhdWx0IERlY2xhcmF0aW9uO1xuIl19
|
||||
198
build/node_modules/autoprefixer/node_modules/postcss/lib/input.js
generated
vendored
Normal file
198
build/node_modules/autoprefixer/node_modules/postcss/lib/input.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
435
build/node_modules/autoprefixer/node_modules/postcss/lib/lazy-result.js
generated
vendored
Normal file
435
build/node_modules/autoprefixer/node_modules/postcss/lib/lazy-result.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
95
build/node_modules/autoprefixer/node_modules/postcss/lib/list.js
generated
vendored
Normal file
95
build/node_modules/autoprefixer/node_modules/postcss/lib/list.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
323
build/node_modules/autoprefixer/node_modules/postcss/lib/map-generator.js
generated
vendored
Normal file
323
build/node_modules/autoprefixer/node_modules/postcss/lib/map-generator.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
623
build/node_modules/autoprefixer/node_modules/postcss/lib/node.js
generated
vendored
Normal file
623
build/node_modules/autoprefixer/node_modules/postcss/lib/node.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
41
build/node_modules/autoprefixer/node_modules/postcss/lib/parse.js
generated
vendored
Normal file
41
build/node_modules/autoprefixer/node_modules/postcss/lib/parse.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = parse;
|
||||
|
||||
var _parser = require('./parser');
|
||||
|
||||
var _parser2 = _interopRequireDefault(_parser);
|
||||
|
||||
var _input = require('./input');
|
||||
|
||||
var _input2 = _interopRequireDefault(_input);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function parse(css, opts) {
|
||||
if (opts && opts.safe) {
|
||||
throw new Error('Option safe was removed. ' + 'Use parser: require("postcss-safe-parser")');
|
||||
}
|
||||
|
||||
var input = new _input2.default(css, opts);
|
||||
var parser = new _parser2.default(input);
|
||||
try {
|
||||
parser.parse();
|
||||
} catch (e) {
|
||||
if (e.name === 'CssSyntaxError' && opts && opts.from) {
|
||||
if (/\.scss$/i.test(opts.from)) {
|
||||
e.message += '\nYou tried to parse SCSS with ' + 'the standard CSS parser; ' + 'try again with the postcss-scss parser';
|
||||
} else if (/\.sass/i.test(opts.from)) {
|
||||
e.message += '\nYou tried to parse Sass with ' + 'the standard CSS parser; ' + 'try again with the postcss-sass parser';
|
||||
} else if (/\.less$/i.test(opts.from)) {
|
||||
e.message += '\nYou tried to parse Less with ' + 'the standard CSS parser; ' + 'try again with the postcss-less parser';
|
||||
}
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
return parser.root;
|
||||
}
|
||||
module.exports = exports['default'];
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlLmVzNiJdLCJuYW1lcyI6WyJwYXJzZSIsImNzcyIsIm9wdHMiLCJzYWZlIiwiRXJyb3IiLCJpbnB1dCIsInBhcnNlciIsImUiLCJuYW1lIiwiZnJvbSIsInRlc3QiLCJtZXNzYWdlIiwicm9vdCJdLCJtYXBwaW5ncyI6Ijs7O2tCQUd3QkEsSzs7QUFIeEI7Ozs7QUFDQTs7Ozs7O0FBRWUsU0FBU0EsS0FBVCxDQUFlQyxHQUFmLEVBQW9CQyxJQUFwQixFQUEwQjtBQUNyQyxRQUFLQSxRQUFRQSxLQUFLQyxJQUFsQixFQUF5QjtBQUNyQixjQUFNLElBQUlDLEtBQUosQ0FBVSw4QkFDQSw0Q0FEVixDQUFOO0FBRUg7O0FBRUQsUUFBSUMsUUFBUSxvQkFBVUosR0FBVixFQUFlQyxJQUFmLENBQVo7QUFDQSxRQUFJSSxTQUFTLHFCQUFXRCxLQUFYLENBQWI7QUFDQSxRQUFJO0FBQ0FDLGVBQU9OLEtBQVA7QUFDSCxLQUZELENBRUUsT0FBT08sQ0FBUCxFQUFVO0FBQ1IsWUFBS0EsRUFBRUMsSUFBRixLQUFXLGdCQUFYLElBQStCTixJQUEvQixJQUF1Q0EsS0FBS08sSUFBakQsRUFBd0Q7QUFDcEQsZ0JBQUssV0FBV0MsSUFBWCxDQUFnQlIsS0FBS08sSUFBckIsQ0FBTCxFQUFrQztBQUM5QkYsa0JBQUVJLE9BQUYsSUFBYSxvQ0FDQSwyQkFEQSxHQUVBLHdDQUZiO0FBR0gsYUFKRCxNQUlPLElBQUssVUFBVUQsSUFBVixDQUFlUixLQUFLTyxJQUFwQixDQUFMLEVBQWlDO0FBQ3BDRixrQkFBRUksT0FBRixJQUFhLG9DQUNBLDJCQURBLEdBRUEsd0NBRmI7QUFHSCxhQUpNLE1BSUEsSUFBSyxXQUFXRCxJQUFYLENBQWdCUixLQUFLTyxJQUFyQixDQUFMLEVBQWtDO0FBQ3JDRixrQkFBRUksT0FBRixJQUFhLG9DQUNBLDJCQURBLEdBRUEsd0NBRmI7QUFHSDtBQUNKO0FBQ0QsY0FBTUosQ0FBTjtBQUNIOztBQUVELFdBQU9ELE9BQU9NLElBQWQ7QUFDSCIsImZpbGUiOiJwYXJzZS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBQYXJzZXIgZnJvbSAnLi9wYXJzZXInO1xuaW1wb3J0IElucHV0ICBmcm9tICcuL2lucHV0JztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gcGFyc2UoY3NzLCBvcHRzKSB7XG4gICAgaWYgKCBvcHRzICYmIG9wdHMuc2FmZSApIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdPcHRpb24gc2FmZSB3YXMgcmVtb3ZlZC4gJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAnVXNlIHBhcnNlcjogcmVxdWlyZShcInBvc3Rjc3Mtc2FmZS1wYXJzZXJcIiknKTtcbiAgICB9XG5cbiAgICBsZXQgaW5wdXQgPSBuZXcgSW5wdXQoY3NzLCBvcHRzKTtcbiAgICBsZXQgcGFyc2VyID0gbmV3IFBhcnNlcihpbnB1dCk7XG4gICAgdHJ5IHtcbiAgICAgICAgcGFyc2VyLnBhcnNlKCk7XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgICBpZiAoIGUubmFtZSA9PT0gJ0Nzc1N5bnRheEVycm9yJyAmJiBvcHRzICYmIG9wdHMuZnJvbSApIHtcbiAgICAgICAgICAgIGlmICggL1xcLnNjc3MkL2kudGVzdChvcHRzLmZyb20pICkge1xuICAgICAgICAgICAgICAgIGUubWVzc2FnZSArPSAnXFxuWW91IHRyaWVkIHRvIHBhcnNlIFNDU1Mgd2l0aCAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RoZSBzdGFuZGFyZCBDU1MgcGFyc2VyOyAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RyeSBhZ2FpbiB3aXRoIHRoZSBwb3N0Y3NzLXNjc3MgcGFyc2VyJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIC9cXC5zYXNzL2kudGVzdChvcHRzLmZyb20pICkge1xuICAgICAgICAgICAgICAgIGUubWVzc2FnZSArPSAnXFxuWW91IHRyaWVkIHRvIHBhcnNlIFNhc3Mgd2l0aCAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RoZSBzdGFuZGFyZCBDU1MgcGFyc2VyOyAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RyeSBhZ2FpbiB3aXRoIHRoZSBwb3N0Y3NzLXNhc3MgcGFyc2VyJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIC9cXC5sZXNzJC9pLnRlc3Qob3B0cy5mcm9tKSApIHtcbiAgICAgICAgICAgICAgICBlLm1lc3NhZ2UgKz0gJ1xcbllvdSB0cmllZCB0byBwYXJzZSBMZXNzIHdpdGggJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aGUgc3RhbmRhcmQgQ1NTIHBhcnNlcjsgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0cnkgYWdhaW4gd2l0aCB0aGUgcG9zdGNzcy1sZXNzIHBhcnNlcic7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdGhyb3cgZTtcbiAgICB9XG5cbiAgICByZXR1cm4gcGFyc2VyLnJvb3Q7XG59XG4iXX0=
|
||||
534
build/node_modules/autoprefixer/node_modules/postcss/lib/parser.js
generated
vendored
Normal file
534
build/node_modules/autoprefixer/node_modules/postcss/lib/parser.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1305
build/node_modules/autoprefixer/node_modules/postcss/lib/postcss.d.ts
generated
vendored
Normal file
1305
build/node_modules/autoprefixer/node_modules/postcss/lib/postcss.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
292
build/node_modules/autoprefixer/node_modules/postcss/lib/postcss.js
generated
vendored
Normal file
292
build/node_modules/autoprefixer/node_modules/postcss/lib/postcss.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
170
build/node_modules/autoprefixer/node_modules/postcss/lib/previous-map.js
generated
vendored
Normal file
170
build/node_modules/autoprefixer/node_modules/postcss/lib/previous-map.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
240
build/node_modules/autoprefixer/node_modules/postcss/lib/processor.js
generated
vendored
Normal file
240
build/node_modules/autoprefixer/node_modules/postcss/lib/processor.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
206
build/node_modules/autoprefixer/node_modules/postcss/lib/result.js
generated
vendored
Normal file
206
build/node_modules/autoprefixer/node_modules/postcss/lib/result.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
129
build/node_modules/autoprefixer/node_modules/postcss/lib/root.js
generated
vendored
Normal file
129
build/node_modules/autoprefixer/node_modules/postcss/lib/root.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
123
build/node_modules/autoprefixer/node_modules/postcss/lib/rule.js
generated
vendored
Normal file
123
build/node_modules/autoprefixer/node_modules/postcss/lib/rule.js
generated
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
|
||||
var _container = require('./container');
|
||||
|
||||
var _container2 = _interopRequireDefault(_container);
|
||||
|
||||
var _list = require('./list');
|
||||
|
||||
var _list2 = _interopRequireDefault(_list);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
|
||||
/**
|
||||
* Represents a CSS rule: a selector followed by a declaration block.
|
||||
*
|
||||
* @extends Container
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a{}');
|
||||
* const rule = root.first;
|
||||
* rule.type //=> 'rule'
|
||||
* rule.toString() //=> 'a{}'
|
||||
*/
|
||||
var Rule = function (_Container) {
|
||||
_inherits(Rule, _Container);
|
||||
|
||||
function Rule(defaults) {
|
||||
_classCallCheck(this, Rule);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, _Container.call(this, defaults));
|
||||
|
||||
_this.type = 'rule';
|
||||
if (!_this.nodes) _this.nodes = [];
|
||||
return _this;
|
||||
}
|
||||
|
||||
/**
|
||||
* An array containing the rule’s individual selectors.
|
||||
* Groups of selectors are split at commas.
|
||||
*
|
||||
* @type {string[]}
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a, b { }');
|
||||
* const rule = root.first;
|
||||
*
|
||||
* rule.selector //=> 'a, b'
|
||||
* rule.selectors //=> ['a', 'b']
|
||||
*
|
||||
* rule.selectors = ['a', 'strong'];
|
||||
* rule.selector //=> 'a, strong'
|
||||
*/
|
||||
|
||||
|
||||
_createClass(Rule, [{
|
||||
key: 'selectors',
|
||||
get: function get() {
|
||||
return _list2.default.comma(this.selector);
|
||||
},
|
||||
set: function set(values) {
|
||||
var match = this.selector ? this.selector.match(/,\s*/) : null;
|
||||
var sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen');
|
||||
this.selector = values.join(sep);
|
||||
}
|
||||
|
||||
/**
|
||||
* @memberof Rule#
|
||||
* @member {string} selector - the rule’s full selector represented
|
||||
* as a string
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a, b { }');
|
||||
* const rule = root.first;
|
||||
* rule.selector //=> 'a, b'
|
||||
*/
|
||||
|
||||
/**
|
||||
* @memberof Rule#
|
||||
* @member {object} raws - Information to generate byte-to-byte equal
|
||||
* node string as it was in the origin input.
|
||||
*
|
||||
* Every parser saves its own properties,
|
||||
* but the default CSS parser uses:
|
||||
*
|
||||
* * `before`: the space symbols before the node. It also stores `*`
|
||||
* and `_` symbols before the declaration (IE hack).
|
||||
* * `after`: the space symbols after the last child of the node
|
||||
* to the end of the node.
|
||||
* * `between`: the symbols between the property and value
|
||||
* for declarations, selector and `{` for rules, or last parameter
|
||||
* and `{` for at-rules.
|
||||
* * `semicolon`: contains `true` if the last child has
|
||||
* an (optional) semicolon.
|
||||
* * `ownSemicolon`: contains `true` if there is semicolon after rule.
|
||||
*
|
||||
* PostCSS cleans selectors from comments and extra spaces,
|
||||
* but it stores origin content in raws properties.
|
||||
* As such, if you don’t change a declaration’s value,
|
||||
* PostCSS will use the raw value with comments.
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a {\n color:black\n}')
|
||||
* root.first.first.raws //=> { before: '', between: ' ', after: '\n' }
|
||||
*/
|
||||
|
||||
}]);
|
||||
|
||||
return Rule;
|
||||
}(_container2.default);
|
||||
|
||||
exports.default = Rule;
|
||||
module.exports = exports['default'];
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGUuZXM2Il0sIm5hbWVzIjpbIlJ1bGUiLCJkZWZhdWx0cyIsInR5cGUiLCJub2RlcyIsImNvbW1hIiwic2VsZWN0b3IiLCJ2YWx1ZXMiLCJtYXRjaCIsInNlcCIsInJhdyIsImpvaW4iXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBOzs7O0FBQ0E7Ozs7Ozs7Ozs7OztBQUVBOzs7Ozs7Ozs7OztJQVdNQSxJOzs7QUFFRixnQkFBWUMsUUFBWixFQUFzQjtBQUFBOztBQUFBLGlEQUNsQixzQkFBTUEsUUFBTixDQURrQjs7QUFFbEIsVUFBS0MsSUFBTCxHQUFZLE1BQVo7QUFDQSxRQUFLLENBQUMsTUFBS0MsS0FBWCxFQUFtQixNQUFLQSxLQUFMLEdBQWEsRUFBYjtBQUhEO0FBSXJCOztBQUVEOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozt3QkFnQmdCO0FBQ1osYUFBTyxlQUFLQyxLQUFMLENBQVcsS0FBS0MsUUFBaEIsQ0FBUDtBQUNILEs7c0JBRWFDLE0sRUFBUTtBQUNsQixVQUFJQyxRQUFRLEtBQUtGLFFBQUwsR0FBZ0IsS0FBS0EsUUFBTCxDQUFjRSxLQUFkLENBQW9CLE1BQXBCLENBQWhCLEdBQThDLElBQTFEO0FBQ0EsVUFBSUMsTUFBUUQsUUFBUUEsTUFBTSxDQUFOLENBQVIsR0FBbUIsTUFBTSxLQUFLRSxHQUFMLENBQVMsU0FBVCxFQUFvQixZQUFwQixDQUFyQztBQUNBLFdBQUtKLFFBQUwsR0FBZ0JDLE9BQU9JLElBQVAsQ0FBWUYsR0FBWixDQUFoQjtBQUNIOztBQUVEOzs7Ozs7Ozs7OztBQVdBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O2tCQStCV1IsSSIsImZpbGUiOiJydWxlLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IENvbnRhaW5lciBmcm9tICcuL2NvbnRhaW5lcic7XG5pbXBvcnQgbGlzdCAgICAgIGZyb20gJy4vbGlzdCc7XG5cbi8qKlxuICogUmVwcmVzZW50cyBhIENTUyBydWxlOiBhIHNlbGVjdG9yIGZvbGxvd2VkIGJ5IGEgZGVjbGFyYXRpb24gYmxvY2suXG4gKlxuICogQGV4dGVuZHMgQ29udGFpbmVyXG4gKlxuICogQGV4YW1wbGVcbiAqIGNvbnN0IHJvb3QgPSBwb3N0Y3NzLnBhcnNlKCdhe30nKTtcbiAqIGNvbnN0IHJ1bGUgPSByb290LmZpcnN0O1xuICogcnVsZS50eXBlICAgICAgIC8vPT4gJ3J1bGUnXG4gKiBydWxlLnRvU3RyaW5nKCkgLy89PiAnYXt9J1xuICovXG5jbGFzcyBSdWxlIGV4dGVuZHMgQ29udGFpbmVyIHtcblxuICAgIGNvbnN0cnVjdG9yKGRlZmF1bHRzKSB7XG4gICAgICAgIHN1cGVyKGRlZmF1bHRzKTtcbiAgICAgICAgdGhpcy50eXBlID0gJ3J1bGUnO1xuICAgICAgICBpZiAoICF0aGlzLm5vZGVzICkgdGhpcy5ub2RlcyA9IFtdO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEFuIGFycmF5IGNvbnRhaW5pbmcgdGhlIHJ1bGXigJlzIGluZGl2aWR1YWwgc2VsZWN0b3JzLlxuICAgICAqIEdyb3VwcyBvZiBzZWxlY3RvcnMgYXJlIHNwbGl0IGF0IGNvbW1hcy5cbiAgICAgKlxuICAgICAqIEB0eXBlIHtzdHJpbmdbXX1cbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoJ2EsIGIgeyB9Jyk7XG4gICAgICogY29uc3QgcnVsZSA9IHJvb3QuZmlyc3Q7XG4gICAgICpcbiAgICAgKiBydWxlLnNlbGVjdG9yICAvLz0+ICdhLCBiJ1xuICAgICAqIHJ1bGUuc2VsZWN0b3JzIC8vPT4gWydhJywgJ2InXVxuICAgICAqXG4gICAgICogcnVsZS5zZWxlY3RvcnMgPSBbJ2EnLCAnc3Ryb25nJ107XG4gICAgICogcnVsZS5zZWxlY3RvciAvLz0+ICdhLCBzdHJvbmcnXG4gICAgICovXG4gICAgZ2V0IHNlbGVjdG9ycygpIHtcbiAgICAgICAgcmV0dXJuIGxpc3QuY29tbWEodGhpcy5zZWxlY3Rvcik7XG4gICAgfVxuXG4gICAgc2V0IHNlbGVjdG9ycyh2YWx1ZXMpIHtcbiAgICAgICAgbGV0IG1hdGNoID0gdGhpcy5zZWxlY3RvciA/IHRoaXMuc2VsZWN0b3IubWF0Y2goLyxcXHMqLykgOiBudWxsO1xuICAgICAgICBsZXQgc2VwICAgPSBtYXRjaCA/IG1hdGNoWzBdIDogJywnICsgdGhpcy5yYXcoJ2JldHdlZW4nLCAnYmVmb3JlT3BlbicpO1xuICAgICAgICB0aGlzLnNlbGVjdG9yID0gdmFsdWVzLmpvaW4oc2VwKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAbWVtYmVyb2YgUnVsZSNcbiAgICAgKiBAbWVtYmVyIHtzdHJpbmd9IHNlbGVjdG9yIC0gdGhlIHJ1bGXigJlzIGZ1bGwgc2VsZWN0b3IgcmVwcmVzZW50ZWRcbiAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXMgYSBzdHJpbmdcbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoJ2EsIGIgeyB9Jyk7XG4gICAgICogY29uc3QgcnVsZSA9IHJvb3QuZmlyc3Q7XG4gICAgICogcnVsZS5zZWxlY3RvciAvLz0+ICdhLCBiJ1xuICAgICAqL1xuXG4gICAgLyoqXG4gICAgICogQG1lbWJlcm9mIFJ1bGUjXG4gICAgICogQG1lbWJlciB7b2JqZWN0fSByYXdzIC0gSW5mb3JtYXRpb24gdG8gZ2VuZXJhdGUgYnl0ZS10by1ieXRlIGVxdWFsXG4gICAgICogICAgICAgICAgICAgICAgICAgICAgICAgbm9kZSBzdHJpbmcgYXMgaXQgd2FzIGluIHRoZSBvcmlnaW4gaW5wdXQuXG4gICAgICpcbiAgICAgKiBFdmVyeSBwYXJzZXIgc2F2ZXMgaXRzIG93biBwcm9wZXJ0aWVzLFxuICAgICAqIGJ1dCB0aGUgZGVmYXVsdCBDU1MgcGFyc2VyIHVzZXM6XG4gICAgICpcbiAgICAgKiAqIGBiZWZvcmVgOiB0aGUgc3BhY2Ugc3ltYm9scyBiZWZvcmUgdGhlIG5vZGUuIEl0IGFsc28gc3RvcmVzIGAqYFxuICAgICAqICAgYW5kIGBfYCBzeW1ib2xzIGJlZm9yZSB0aGUgZGVjbGFyYXRpb24gKElFIGhhY2spLlxuICAgICAqICogYGFmdGVyYDogdGhlIHNwYWNlIHN5bWJvbHMgYWZ0ZXIgdGhlIGxhc3QgY2hpbGQgb2YgdGhlIG5vZGVcbiAgICAgKiAgIHRvIHRoZSBlbmQgb2YgdGhlIG5vZGUuXG4gICAgICogKiBgYmV0d2VlbmA6IHRoZSBzeW1ib2xzIGJldHdlZW4gdGhlIHByb3BlcnR5IGFuZCB2YWx1ZVxuICAgICAqICAgZm9yIGRlY2xhcmF0aW9ucywgc2VsZWN0b3IgYW5kIGB7YCBmb3IgcnVsZXMsIG9yIGxhc3QgcGFyYW1ldGVyXG4gICAgICogICBhbmQgYHtgIGZvciBhdC1ydWxlcy5cbiAgICAgKiAqIGBzZW1pY29sb25gOiBjb250YWlucyBgdHJ1ZWAgaWYgdGhlIGxhc3QgY2hpbGQgaGFzXG4gICAgICogICBhbiAob3B0aW9uYWwpIHNlbWljb2xvbi5cbiAgICAgKiAqIGBvd25TZW1pY29sb25gOiBjb250YWlucyBgdHJ1ZWAgaWYgdGhlcmUgaXMgc2VtaWNvbG9uIGFmdGVyIHJ1bGUuXG4gICAgICpcbiAgICAgKiBQb3N0Q1NTIGNsZWFucyBzZWxlY3RvcnMgZnJvbSBjb21tZW50cyBhbmQgZXh0cmEgc3BhY2VzLFxuICAgICAqIGJ1dCBpdCBzdG9yZXMgb3JpZ2luIGNvbnRlbnQgaW4gcmF3cyBwcm9wZXJ0aWVzLlxuICAgICAqIEFzIHN1Y2gsIGlmIHlvdSBkb27igJl0IGNoYW5nZSBhIGRlY2xhcmF0aW9u4oCZcyB2YWx1ZSxcbiAgICAgKiBQb3N0Q1NTIHdpbGwgdXNlIHRoZSByYXcgdmFsdWUgd2l0aCBjb21tZW50cy5cbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoJ2Ege1xcbiAgY29sb3I6YmxhY2tcXG59JylcbiAgICAgKiByb290LmZpcnN0LmZpcnN0LnJhd3MgLy89PiB7IGJlZm9yZTogJycsIGJldHdlZW46ICcgJywgYWZ0ZXI6ICdcXG4nIH1cbiAgICAgKi9cblxufVxuXG5leHBvcnQgZGVmYXVsdCBSdWxlO1xuIl19
|
||||
344
build/node_modules/autoprefixer/node_modules/postcss/lib/stringifier.js
generated
vendored
Normal file
344
build/node_modules/autoprefixer/node_modules/postcss/lib/stringifier.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user