mirror of
https://github.com/kemko/liquid.git
synced 2026-01-04 09:15:41 +03:00
Set up Grunt
Fixing up Grunt file to watch for directories Exclude node modules folder from Jekyll built site
This commit is contained in:
79
Gruntfile.js
Normal file
79
Gruntfile.js
Normal file
@@ -0,0 +1,79 @@
|
||||
// Gruntfile
|
||||
module.exports = function(grunt) {
|
||||
var autoprefixer = require('autoprefixer-core');
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
||||
watch: {
|
||||
css: {
|
||||
files: ['_sass/*.scss'],
|
||||
tasks: ['sass', 'postcss', 'shell:jekyllBuild'],
|
||||
options: {
|
||||
spawn: false,
|
||||
interrupt: true,
|
||||
atBegin: true
|
||||
}
|
||||
},
|
||||
|
||||
jekyll: {
|
||||
files: ['index.html', '_includes/*.html', 'filters/*.*', '_layouts/*.*', '_posts/*.*'],
|
||||
tasks: ['shell:jekyllBuild']
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
sass: {
|
||||
dist: {
|
||||
options: {
|
||||
style: 'expanded',
|
||||
sourcemap: 'none'
|
||||
},
|
||||
files: {
|
||||
'_site/css/main.css':'_sass/main.scss'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
shell: {
|
||||
jekyllServe: {
|
||||
command: 'jekyll serve --no-watch'
|
||||
},
|
||||
|
||||
jekyllBuild: {
|
||||
command: 'jekyll build'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
postcss: {
|
||||
options: {
|
||||
map: true,
|
||||
processors: [
|
||||
autoprefixer({ browsers: ['last 2 version'] }).postcss
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
src: '_site/css/*.css'
|
||||
}
|
||||
},
|
||||
|
||||
concurrent: {
|
||||
tasks: ['shell:jekyllServe', 'watch'],
|
||||
options: {
|
||||
logConcurrentOutput: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-sass');
|
||||
grunt.loadNpmTasks('grunt-postcss');
|
||||
grunt.loadNpmTasks('grunt-concurrent');
|
||||
|
||||
// grunt.registerTask('default', ['shell:jekyllServe', 'watch']);
|
||||
grunt.registerTask('default', ['concurrent']);
|
||||
};
|
||||
@@ -8,3 +8,5 @@ collections:
|
||||
exclude:
|
||||
- README.md
|
||||
- CNAME
|
||||
- node_modules
|
||||
keep_files: ['css']
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.data.site.title }}</title>
|
||||
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.data.site.description }}{% endif %}">
|
||||
|
||||
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
|
||||
<link rel="stylesheet" href="{{ '/css/main.css' | prepend: site.baseurl }}">
|
||||
<link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'>
|
||||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
---
|
||||
# Liquid Docs Main Styles
|
||||
---
|
||||
|
||||
@charset "utf-8";
|
||||
|
||||
@@ -18,7 +15,7 @@ $color-blue-2: #B4DCED;
|
||||
$color-blue-3: #91C9E8;
|
||||
$color-blue-4: #67B8DE;
|
||||
$color-blue-5: #3399CC;
|
||||
$color-white: #fff;
|
||||
$color-white: #ffffff;
|
||||
$color-slate: #5E5E5E;
|
||||
|
||||
/*
|
||||
@@ -27,7 +24,7 @@ $grey-color-light: lighten($grey-color, 40%);
|
||||
$grey-color-dark: darken($grey-color, 25%);
|
||||
*/
|
||||
|
||||
// Width of the content area
|
||||
// Width of the cont s sent area
|
||||
$sidebar-width: 250px;
|
||||
$content-width: 900px;
|
||||
$on-palm: 600px;
|
||||
@@ -49,8 +46,8 @@ $on-laptop: 900px;
|
||||
|
||||
// Import partials from `sass_dir` (defaults to `_sass`)
|
||||
@import
|
||||
"base",
|
||||
"syntax-highlighting"
|
||||
"modules/base",
|
||||
"vendors/syntax-highlighting"
|
||||
;
|
||||
|
||||
* {
|
||||
17
filters.md
17
filters.md
@@ -1,17 +0,0 @@
|
||||
---
|
||||
title: Filters
|
||||
permalink: /filters/
|
||||
layout: page
|
||||
---
|
||||
|
||||
{% for doc in site.filters %}
|
||||
<h3 class="component-link" id="{{ doc.title }}">{{ doc.title }}</h3>
|
||||
<div>
|
||||
<span class="right">
|
||||
<a href="https://github.com/Shopify/liquid/edit/gh-pages/{{ doc.relative_path }}">
|
||||
Improve documentation for {{doc.title}}.
|
||||
</a>
|
||||
</span>
|
||||
{{ doc.output }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: ceil
|
||||
layout: default
|
||||
---
|
||||
|
||||
`ceil` rounds the input up to the nearest whole number.
|
||||
9
filters/index.html
Normal file
9
filters/index.html
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<div class="home">
|
||||
|
||||
FILTERS
|
||||
|
||||
</div>
|
||||
@@ -19,6 +19,7 @@ layout: default
|
||||
|
||||
It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library.
|
||||
|
||||
# What does it look like?
|
||||
# What does it look like???
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
1
node_modules/.bin/csswring
generated
vendored
Symbolic link
1
node_modules/.bin/csswring
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../csswring/bin/csswring
|
||||
493
node_modules/autoprefixer-core/ChangeLog.md
generated
vendored
Normal file
493
node_modules/autoprefixer-core/ChangeLog.md
generated
vendored
Normal file
@@ -0,0 +1,493 @@
|
||||
## 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
node_modules/autoprefixer-core/LICENSE
generated
vendored
Normal file
20
node_modules/autoprefixer-core/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.
|
||||
194
node_modules/autoprefixer-core/README.md
generated
vendored
Normal file
194
node_modules/autoprefixer-core/README.md
generated
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
# Autoprefixer Core [](https://travis-ci.org/postcss/autoprefixer-core)
|
||||
|
||||
<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 using values
|
||||
from [Can I Use].
|
||||
|
||||
This is core package to build Autoprefixer plugin for some environment
|
||||
(like [grunt‑autoprefixer]). For end-user documentation, features
|
||||
and plugins list visit [main Autoprefixer] project.
|
||||
|
||||
<a href="https://evilmartians.com/?utm_source=autoprefixer-core">
|
||||
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
|
||||
</a>
|
||||
|
||||
[grunt‑autoprefixer]: https://github.com/nDmitry/grunt-autoprefixer
|
||||
[main Autoprefixer]: https://github.com/postcss/autoprefixer
|
||||
[Can I Use]: http://caniuse.com/
|
||||
[PostCSS]: https://github.com/postcss/postcss
|
||||
|
||||
## Quick Example
|
||||
|
||||
Write your CSS rules without vendor prefixes (in fact, forget about them
|
||||
entirely):
|
||||
|
||||
```css
|
||||
:fullscreen a {
|
||||
display: flex
|
||||
}
|
||||
```
|
||||
|
||||
Process your CSS by Autoprefixer:
|
||||
|
||||
```js
|
||||
var autoprefixer = require('autoprefixer-core');
|
||||
var prefixed = autoprefixer.process(css).css;
|
||||
```
|
||||
|
||||
It will use the data based on current browser popularity and property support
|
||||
to apply prefixes for you:
|
||||
|
||||
```css
|
||||
:-webkit-full-screen a {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex
|
||||
}
|
||||
:-moz-full-screen a {
|
||||
display: flex
|
||||
}
|
||||
:-ms-fullscreen a {
|
||||
display: -ms-flexbox;
|
||||
display: flex
|
||||
}
|
||||
:fullscreen a {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
To process your CSS you need to make 2 steps:
|
||||
|
||||
1. Build processor for your options and browsers supported in your project.
|
||||
2. Process CSS throw this processor.
|
||||
|
||||
Function `autoprefixer(options)` returns new processor object:
|
||||
|
||||
```js
|
||||
var processor = autoprefixer({ browsers: ['> 1%', 'IE 7'], cascade: false });
|
||||
```
|
||||
|
||||
There are 2 options:
|
||||
|
||||
* `browsers` (array): list of browsers, which are supported in your project.
|
||||
You can directly specify browser version (like `iOS 7`) or use selections
|
||||
(like `last 2 version` or `> 5%`). See [Browserslist docs] for available
|
||||
queries and default value.
|
||||
* `cascade` (boolean): should Autoprefixer uses [Visual Cascade],
|
||||
if CSS will be uncompressed.
|
||||
|
||||
Processor object had:
|
||||
|
||||
* `.process(css, opts)` method, which will add prefixes to `css`.
|
||||
* `.info()` method, which returns debug information: which browsers are selected
|
||||
and which properties will be prefixed
|
||||
* `.postcss` property returns [PostCSS] processor to use in chain
|
||||
with other [PostCSS processors].
|
||||
|
||||
You can use processor object to process several CSS files
|
||||
to increase perfomance.
|
||||
|
||||
There are `autoprefixer.process()`, `autoprefixer.info()`
|
||||
and `autoprefixer.postcss` shortcuts, which use default browsers and options.
|
||||
|
||||
[PostCSS processors]: https://github.com/postcss/postcss#built-with-postcss
|
||||
[Browserslist docs]: https://github.com/ai/browserslist
|
||||
[Visual Cascade]: https://github.com/postcss/autoprefixer#visual-cascade
|
||||
[PostCSS]: https://github.com/postcss/postcss
|
||||
|
||||
## CSS Processing
|
||||
|
||||
Method `process(css, opts)` from Autoprefixer processor is a PostCSS’s method.
|
||||
|
||||
You must set `from` and `to` options with file names to generates corrects
|
||||
source maps and useful error messages.
|
||||
|
||||
Options:
|
||||
|
||||
* `from` (path): file path to origin CSS files.
|
||||
* `to` (path): file path to future CSS file, which will
|
||||
contain processed CSS with prefixes.
|
||||
* `safe` (boolean): enables [Safe Mode] in PostCSS. By default `false`.
|
||||
* `map` contains options for source maps:
|
||||
|
||||
* `inline: false` to force save map to separated file, instead of inline it
|
||||
to CSS in special comment by base64.
|
||||
* `prev` (string or object): map content from previous processing step
|
||||
(like Sass compilation).
|
||||
|
||||
If you set `map: false`, PostCSS will remove source map.
|
||||
|
||||
You can read more about the source map options in [PostCSS documentation].
|
||||
|
||||
[PostCSS documentation]: https://github.com/postcss/postcss#source-map-1
|
||||
[Safe Mode]: https://github.com/postcss/postcss#safe-mode
|
||||
|
||||
## PostCSS Chain
|
||||
|
||||
You parse CSS only once and then process it through array of PostCSS processors.
|
||||
|
||||
For example, you can use [gulp-postcss]:
|
||||
|
||||
```js
|
||||
var postcss = require('gulp-postcss');
|
||||
var sourcemaps = require('gulp-sourcemaps');
|
||||
|
||||
gulp.task('css', function () {
|
||||
var processors = [
|
||||
require('autoprefixer')('last 1 version'),
|
||||
require('css-mqpacker'),
|
||||
require('csswring')
|
||||
];
|
||||
return gulp.src('./src/style.css')
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(postcss(processors))
|
||||
.pipe(sourcemaps.write('.'))
|
||||
.pipe(gulp.dest('./dest'));
|
||||
});
|
||||
```
|
||||
|
||||
[gulp-postcss]: https://github.com/w0rm/gulp-postcss
|
||||
|
||||
## Safe Mode
|
||||
|
||||
PostCSS has a special safe mode to parse broken CSS. If you set the `safe: true`
|
||||
option to the `process` method, it will parse `a {` as `a {}`:
|
||||
|
||||
```js
|
||||
autoprefixer.process('a {'); // will throw “Unclosed block”
|
||||
autoprefixer.process('a {', { safe: true }); // will process as a closed block
|
||||
```
|
||||
|
||||
It is useful for legacy code when using several hacks, or interactive
|
||||
tools with live input, like [Autoprefixer demo].
|
||||
|
||||
[Autoprefixer demo]: http://simevidas.jsbin.com/gufoko/quiet
|
||||
|
||||
## Cleaning
|
||||
|
||||
By default, Autoprefixer not only add new prefixes, but also remove outdated.
|
||||
You can remove this behaviour by `remove: false` option:
|
||||
|
||||
```js
|
||||
autoprefixer()
|
||||
.process('a { -webkit-border-radius: 2px; border-radius: 2px }');
|
||||
// remove outdated -webkit-border-radius
|
||||
|
||||
autoprefixer({ remove: false })
|
||||
.process('a { -webkit-border-radius: 2px; border-radius: 2px }');
|
||||
// keeps -webkit-border-radius
|
||||
```
|
||||
|
||||
## Debug
|
||||
|
||||
You can check which browsers are selected and which properties will be prefixed:
|
||||
|
||||
```js
|
||||
info = autoprefixer({ browsers: ['last 1 version'] }).info();
|
||||
console.log(info);
|
||||
```
|
||||
433
node_modules/autoprefixer-core/data/prefixes.js
generated
vendored
Normal file
433
node_modules/autoprefixer-core/data/prefixes.js
generated
vendored
Normal file
@@ -0,0 +1,433 @@
|
||||
(function() {
|
||||
var add, crispedges, feature, flexbox, gradients, logicalProps, prefix, resolution, result, sort, textDecoration,
|
||||
slice = [].slice;
|
||||
|
||||
sort = function(array) {
|
||||
return array.sort(function(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 parseFloat(a[1]) - parseFloat(b[1]);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
feature = function(data, opts, callback) {
|
||||
var browser, match, need, ref, ref1, support, version, versions;
|
||||
if (!callback) {
|
||||
ref = [opts, {}], callback = ref[0], opts = ref[1];
|
||||
}
|
||||
match = opts.match || /\sx($|\s)/;
|
||||
need = [];
|
||||
ref1 = data.stats;
|
||||
for (browser in ref1) {
|
||||
versions = ref1[browser];
|
||||
for (version in versions) {
|
||||
support = versions[version];
|
||||
if (support.match(match)) {
|
||||
need.push(browser + ' ' + version);
|
||||
}
|
||||
}
|
||||
}
|
||||
return callback(sort(need));
|
||||
};
|
||||
|
||||
result = {};
|
||||
|
||||
prefix = function() {
|
||||
var data, i, j, k, len, name, names, results;
|
||||
names = 2 <= arguments.length ? slice.call(arguments, 0, j = arguments.length - 1) : (j = 0, []), data = arguments[j++];
|
||||
results = [];
|
||||
for (k = 0, len = names.length; k < len; k++) {
|
||||
name = names[k];
|
||||
result[name] = {};
|
||||
results.push((function() {
|
||||
var results1;
|
||||
results1 = [];
|
||||
for (i in data) {
|
||||
results1.push(result[name][i] = data[i]);
|
||||
}
|
||||
return results1;
|
||||
})());
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
add = function() {
|
||||
var data, j, k, len, name, names, results;
|
||||
names = 2 <= arguments.length ? slice.call(arguments, 0, j = arguments.length - 1) : (j = 0, []), data = arguments[j++];
|
||||
results = [];
|
||||
for (k = 0, len = names.length; k < len; k++) {
|
||||
name = names[k];
|
||||
results.push(result[name].browsers = sort(result[name].browsers.concat(data.browsers)));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
module.exports = result;
|
||||
|
||||
feature(require('caniuse-db/features-json/border-radius'), function(browsers) {
|
||||
return prefix('border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius', {
|
||||
mistakes: ['-ms-', '-o-'],
|
||||
transition: true,
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-boxshadow'), function(browsers) {
|
||||
return prefix('box-shadow', {
|
||||
transition: true,
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-animation'), 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: ['-ms-'],
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-transitions'), function(browsers) {
|
||||
return prefix('transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function', {
|
||||
mistakes: ['-ms-'],
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/transforms2d'), function(browsers) {
|
||||
return prefix('transform', 'transform-origin', {
|
||||
transition: true,
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/transforms3d'), function(browsers) {
|
||||
prefix('perspective', 'perspective-origin', {
|
||||
transition: true,
|
||||
browsers: browsers
|
||||
});
|
||||
return prefix('transform-style', 'backface-visibility', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
gradients = require('caniuse-db/features-json/css-gradients');
|
||||
|
||||
feature(gradients, {
|
||||
match: /y\sx/
|
||||
}, function(browsers) {
|
||||
return prefix('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', {
|
||||
props: ['background', 'background-image', 'border-image', 'list-style', 'list-style-image', 'content', 'mask-image', 'mask'],
|
||||
mistakes: ['-ms-'],
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(gradients, {
|
||||
match: /a\sx/
|
||||
}, function(browsers) {
|
||||
browsers = browsers.map(function(i) {
|
||||
if (/op/.test(i)) {
|
||||
return i;
|
||||
} else {
|
||||
return i + " old";
|
||||
}
|
||||
});
|
||||
return add('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css3-boxsizing'), function(browsers) {
|
||||
return prefix('box-sizing', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-filters'), function(browsers) {
|
||||
return prefix('filter', {
|
||||
transition: true,
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/multicolumn'), function(browsers) {
|
||||
prefix('columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', {
|
||||
transition: true,
|
||||
browsers: browsers
|
||||
});
|
||||
return prefix('column-count', 'column-rule-style', 'column-span', 'column-fill', 'break-before', 'break-after', 'break-inside', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/user-select-none'), function(browsers) {
|
||||
return prefix('user-select', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
flexbox = require('caniuse-db/features-json/flexbox');
|
||||
|
||||
feature(flexbox, {
|
||||
match: /a\sx/
|
||||
}, function(browsers) {
|
||||
browsers = browsers.map(function(i) {
|
||||
if (/ie|firefox/.test(i)) {
|
||||
return i;
|
||||
} else {
|
||||
return i + " 2009";
|
||||
}
|
||||
});
|
||||
prefix('display-flex', 'inline-flex', {
|
||||
props: ['display'],
|
||||
browsers: browsers
|
||||
});
|
||||
prefix('flex', 'flex-grow', 'flex-shrink', 'flex-basis', {
|
||||
transition: true,
|
||||
browsers: browsers
|
||||
});
|
||||
return prefix('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(flexbox, {
|
||||
match: /y\sx/
|
||||
}, function(browsers) {
|
||||
add('display-flex', 'inline-flex', {
|
||||
browsers: browsers
|
||||
});
|
||||
add('flex', 'flex-grow', 'flex-shrink', 'flex-basis', {
|
||||
browsers: browsers
|
||||
});
|
||||
return add('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/calc'), function(browsers) {
|
||||
return prefix('calc', {
|
||||
props: ['*'],
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/background-img-opts'), function(browsers) {
|
||||
return prefix('background-clip', 'background-origin', 'background-size', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/font-feature'), function(browsers) {
|
||||
return prefix('font-feature-settings', 'font-variant-ligatures', 'font-language-override', 'font-kerning', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/border-image'), function(browsers) {
|
||||
return prefix('border-image', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-selection'), function(browsers) {
|
||||
return prefix('::selection', {
|
||||
selector: true,
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-placeholder'), function(browsers) {
|
||||
browsers = browsers.map(function(i) {
|
||||
var name, ref, version;
|
||||
ref = i.split(' '), name = ref[0], version = ref[1];
|
||||
if (name === 'firefox' && parseFloat(version) <= 18) {
|
||||
return i + ' old';
|
||||
} else {
|
||||
return i;
|
||||
}
|
||||
});
|
||||
return prefix(':placeholder-shown', '::placeholder', {
|
||||
selector: true,
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-hyphens'), function(browsers) {
|
||||
return prefix('hyphens', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/fullscreen'), function(browsers) {
|
||||
return prefix(':fullscreen', {
|
||||
selector: true,
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css3-tabsize'), function(browsers) {
|
||||
return prefix('tab-size', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/intrinsic-width'), function(browsers) {
|
||||
return prefix('max-content', 'min-content', 'fit-content', 'fill-available', {
|
||||
props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height'],
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css3-cursors-newer'), function(browsers) {
|
||||
prefix('zoom-in', 'zoom-out', {
|
||||
props: ['cursor'],
|
||||
browsers: browsers.concat(['chrome 3'])
|
||||
});
|
||||
return prefix('grab', 'grabbing', {
|
||||
props: ['cursor'],
|
||||
browsers: browsers.concat(['firefox 24', 'firefox 25', 'firefox 26'])
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-sticky'), function(browsers) {
|
||||
return prefix('sticky', {
|
||||
props: ['position'],
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/pointer'), function(browsers) {
|
||||
return prefix('touch-action', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
textDecoration = require('caniuse-db/features-json/text-decoration');
|
||||
|
||||
feature(textDecoration, function(browsers) {
|
||||
return prefix('text-decoration-style', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(textDecoration, {
|
||||
match: /y\sx($|\s)/
|
||||
}, function(browsers) {
|
||||
return prefix('text-decoration-line', 'text-decoration-color', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/text-size-adjust'), function(browsers) {
|
||||
return prefix('text-size-adjust', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-masks'), function(browsers) {
|
||||
prefix('mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-repeat', {
|
||||
browsers: browsers
|
||||
});
|
||||
return prefix('clip-path', 'mask', 'mask-position', 'mask-size', {
|
||||
transition: true,
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-boxdecorationbreak'), function(brwsrs) {
|
||||
return prefix('box-decoration-break', {
|
||||
browsers: brwsrs
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/object-fit'), function(browsers) {
|
||||
return prefix('object-fit', 'object-position', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-shapes'), function(browsers) {
|
||||
return prefix('shape-margin', 'shape-outside', 'shape-image-threshold', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/text-overflow'), function(browsers) {
|
||||
return prefix('text-overflow', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/text-emphasis'), function(browsers) {
|
||||
return prefix('text-emphasis', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-deviceadaptation'), function(browsers) {
|
||||
return prefix('@viewport', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
resolution = require('caniuse-db/features-json/css-media-resolution');
|
||||
|
||||
feature(resolution, {
|
||||
match: /( x($| )|a #3)/
|
||||
}, function(browsers) {
|
||||
return prefix('@resolution', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(require('caniuse-db/features-json/css-text-align-last'), function(browsers) {
|
||||
return prefix('text-align-last', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
crispedges = require('caniuse-db/features-json/css-crisp-edges');
|
||||
|
||||
feature(crispedges, {
|
||||
match: /y x/
|
||||
}, function(browsers) {
|
||||
return prefix('crisp-edges', {
|
||||
props: ['image-rendering'],
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(crispedges, {
|
||||
match: /a x/
|
||||
}, function(browsers) {
|
||||
return prefix('image-rendering', {
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
logicalProps = require('caniuse-db/features-json/css-logical-props');
|
||||
|
||||
feature(logicalProps, function(browsers) {
|
||||
return prefix('border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', {
|
||||
transition: true,
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
feature(logicalProps, {
|
||||
match: /x\s#2/
|
||||
}, function(browsers) {
|
||||
return prefix('border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', {
|
||||
transition: true,
|
||||
browsers: browsers
|
||||
});
|
||||
});
|
||||
|
||||
}).call(this);
|
||||
51
node_modules/autoprefixer-core/lib/at-rule.js
generated
vendored
Normal file
51
node_modules/autoprefixer-core/lib/at-rule.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
(function() {
|
||||
var AtRule, Prefixer,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Prefixer = require('./prefixer');
|
||||
|
||||
AtRule = (function(superClass) {
|
||||
extend(AtRule, superClass);
|
||||
|
||||
function AtRule() {
|
||||
return AtRule.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
AtRule.prototype.add = function(rule, prefix) {
|
||||
var already, cloned, prefixed;
|
||||
prefixed = prefix + rule.name;
|
||||
already = rule.parent.some(function(i) {
|
||||
return i.name === prefixed && i.params === rule.params;
|
||||
});
|
||||
if (already) {
|
||||
return;
|
||||
}
|
||||
cloned = this.clone(rule, {
|
||||
name: prefixed
|
||||
});
|
||||
return rule.parent.insertBefore(rule, cloned);
|
||||
};
|
||||
|
||||
AtRule.prototype.process = function(node) {
|
||||
var j, len, parent, prefix, ref, results;
|
||||
parent = this.parentPrefix(node);
|
||||
ref = this.prefixes;
|
||||
results = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
prefix = ref[j];
|
||||
if (parent && parent !== prefix) {
|
||||
continue;
|
||||
}
|
||||
results.push(this.add(node, prefix));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
return AtRule;
|
||||
|
||||
})(Prefixer);
|
||||
|
||||
module.exports = AtRule;
|
||||
|
||||
}).call(this);
|
||||
109
node_modules/autoprefixer-core/lib/autoprefixer.js
generated
vendored
Normal file
109
node_modules/autoprefixer-core/lib/autoprefixer.js
generated
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
(function() {
|
||||
var Autoprefixer, Browsers, Prefixes, autoprefixer, browserslist, infoCache, isPlainObject, postcss,
|
||||
slice = [].slice,
|
||||
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
|
||||
|
||||
browserslist = require('browserslist');
|
||||
|
||||
postcss = require('postcss');
|
||||
|
||||
Browsers = require('./browsers');
|
||||
|
||||
Prefixes = require('./prefixes');
|
||||
|
||||
infoCache = null;
|
||||
|
||||
isPlainObject = function(obj) {
|
||||
return Object.prototype.toString.apply(obj) === '[object Object]';
|
||||
};
|
||||
|
||||
autoprefixer = function() {
|
||||
var options, reqs;
|
||||
reqs = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
||||
if (reqs.length === 1 && isPlainObject(reqs[0])) {
|
||||
options = reqs[0];
|
||||
reqs = void 0;
|
||||
} else if (reqs.length === 0 || (reqs.length === 1 && (reqs[0] == null))) {
|
||||
reqs = void 0;
|
||||
} else if (reqs.length <= 2 && (reqs[0] instanceof Array || (reqs[0] == null))) {
|
||||
options = reqs[1];
|
||||
reqs = reqs[0];
|
||||
} else if (typeof reqs[reqs.length - 1] === 'object') {
|
||||
options = reqs.pop();
|
||||
}
|
||||
if ((options != null ? options.browsers : void 0) != null) {
|
||||
reqs = options.browsers;
|
||||
}
|
||||
return new Autoprefixer(autoprefixer.data, reqs, options);
|
||||
};
|
||||
|
||||
autoprefixer.data = {
|
||||
browsers: require('caniuse-db/data').agents,
|
||||
prefixes: require('../data/prefixes')
|
||||
};
|
||||
|
||||
Autoprefixer = (function() {
|
||||
function Autoprefixer(data, reqs1, options1) {
|
||||
this.data = data;
|
||||
this.reqs = reqs1;
|
||||
this.options = options1 != null ? options1 : {};
|
||||
this.postcss = bind(this.postcss, this);
|
||||
}
|
||||
|
||||
Autoprefixer.prototype.process = function(str, options) {
|
||||
if (options == null) {
|
||||
options = {};
|
||||
}
|
||||
return postcss(this.postcss).process(str, options);
|
||||
};
|
||||
|
||||
Autoprefixer.prototype.postcss = function(css) {
|
||||
var prefixes;
|
||||
prefixes = this.prefixes({
|
||||
from: css.source.input.file
|
||||
});
|
||||
if (this.options.remove !== false) {
|
||||
prefixes.processor.remove(css);
|
||||
}
|
||||
return prefixes.processor.add(css);
|
||||
};
|
||||
|
||||
Autoprefixer.prototype.prefixes = function(opts) {
|
||||
var browsers;
|
||||
browsers = new Browsers(autoprefixer.data.browsers, this.reqs, opts);
|
||||
return new Prefixes(autoprefixer.data.prefixes, browsers, this.options);
|
||||
};
|
||||
|
||||
Autoprefixer.prototype.info = function(opts) {
|
||||
infoCache || (infoCache = require('./info'));
|
||||
return infoCache(this.prefixes(opts));
|
||||
};
|
||||
|
||||
return Autoprefixer;
|
||||
|
||||
})();
|
||||
|
||||
autoprefixer.defaults = browserslist.defaults;
|
||||
|
||||
autoprefixer.loadDefault = function() {
|
||||
return this.defaultCache || (this.defaultCache = autoprefixer());
|
||||
};
|
||||
|
||||
autoprefixer.process = function(str, options) {
|
||||
if (options == null) {
|
||||
options = {};
|
||||
}
|
||||
return this.loadDefault().process(str, options);
|
||||
};
|
||||
|
||||
autoprefixer.postcss = function(css) {
|
||||
return autoprefixer.loadDefault().postcss(css);
|
||||
};
|
||||
|
||||
autoprefixer.info = function() {
|
||||
return this.loadDefault().info();
|
||||
};
|
||||
|
||||
module.exports = autoprefixer;
|
||||
|
||||
}).call(this);
|
||||
83
node_modules/autoprefixer-core/lib/browsers.js
generated
vendored
Normal file
83
node_modules/autoprefixer-core/lib/browsers.js
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
(function() {
|
||||
var Browsers, browserslist, utils;
|
||||
|
||||
browserslist = require('browserslist');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
Browsers = (function() {
|
||||
Browsers.prefixes = function() {
|
||||
var data, i, name;
|
||||
if (this.prefixesCache) {
|
||||
return this.prefixesCache;
|
||||
}
|
||||
data = require('caniuse-db/data').agents;
|
||||
return this.prefixesCache = utils.uniq((function() {
|
||||
var results;
|
||||
results = [];
|
||||
for (name in data) {
|
||||
i = data[name];
|
||||
results.push("-" + i.prefix + "-");
|
||||
}
|
||||
return results;
|
||||
})()).sort(function(a, b) {
|
||||
return b.length - a.length;
|
||||
});
|
||||
};
|
||||
|
||||
Browsers.withPrefix = function(value) {
|
||||
if (!this.prefixesRegexp) {
|
||||
this.prefixesRegexp = RegExp("" + (this.prefixes().join('|')));
|
||||
}
|
||||
return this.prefixesRegexp.test(value);
|
||||
};
|
||||
|
||||
function Browsers(data1, requirements, options) {
|
||||
this.data = data1;
|
||||
this.options = options;
|
||||
this.selected = this.parse(requirements);
|
||||
}
|
||||
|
||||
Browsers.prototype.parse = function(requirements) {
|
||||
var ref;
|
||||
return browserslist(requirements, {
|
||||
path: (ref = this.options) != null ? ref.from : void 0
|
||||
});
|
||||
};
|
||||
|
||||
Browsers.prototype.browsers = function(criteria) {
|
||||
var browser, data, ref, selected, versions;
|
||||
selected = [];
|
||||
ref = this.data;
|
||||
for (browser in ref) {
|
||||
data = ref[browser];
|
||||
versions = criteria(data).map(function(version) {
|
||||
return browser + " " + version;
|
||||
});
|
||||
selected = selected.concat(versions);
|
||||
}
|
||||
return selected;
|
||||
};
|
||||
|
||||
Browsers.prototype.prefix = function(browser) {
|
||||
var data, name, prefix, ref, version;
|
||||
ref = browser.split(' '), name = ref[0], version = ref[1];
|
||||
data = this.data[name];
|
||||
if (data.prefix_exceptions) {
|
||||
prefix = data.prefix_exceptions[version];
|
||||
}
|
||||
prefix || (prefix = data.prefix);
|
||||
return '-' + prefix + '-';
|
||||
};
|
||||
|
||||
Browsers.prototype.isSelected = function(browser) {
|
||||
return this.selected.indexOf(browser) !== -1;
|
||||
};
|
||||
|
||||
return Browsers;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Browsers;
|
||||
|
||||
}).call(this);
|
||||
153
node_modules/autoprefixer-core/lib/declaration.js
generated
vendored
Normal file
153
node_modules/autoprefixer-core/lib/declaration.js
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
(function() {
|
||||
var Browsers, Declaration, Prefixer, utils, vendor,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Prefixer = require('./prefixer');
|
||||
|
||||
Browsers = require('./browsers');
|
||||
|
||||
vendor = require('postcss/lib/vendor');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
Declaration = (function(superClass) {
|
||||
extend(Declaration, superClass);
|
||||
|
||||
function Declaration() {
|
||||
return Declaration.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Declaration.prototype.check = function(decl) {
|
||||
return true;
|
||||
};
|
||||
|
||||
Declaration.prototype.prefixed = function(prop, prefix) {
|
||||
return prefix + prop;
|
||||
};
|
||||
|
||||
Declaration.prototype.normalize = function(prop) {
|
||||
return prop;
|
||||
};
|
||||
|
||||
Declaration.prototype.otherPrefixes = function(value, prefix) {
|
||||
var j, len, other, ref;
|
||||
ref = Browsers.prefixes();
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
other = ref[j];
|
||||
if (other === prefix) {
|
||||
continue;
|
||||
}
|
||||
if (value.indexOf(other) !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
Declaration.prototype.set = function(decl, prefix) {
|
||||
decl.prop = this.prefixed(decl.prop, prefix);
|
||||
return decl;
|
||||
};
|
||||
|
||||
Declaration.prototype.needCascade = function(decl) {
|
||||
return decl._autoprefixerCascade || (decl._autoprefixerCascade = this.all.options.cascade !== false && decl.style('before').indexOf('\n') !== -1);
|
||||
};
|
||||
|
||||
Declaration.prototype.maxPrefixed = function(prefixes, decl) {
|
||||
var j, len, max, prefix;
|
||||
if (decl._autoprefixerMax) {
|
||||
return decl._autoprefixerMax;
|
||||
}
|
||||
max = 0;
|
||||
for (j = 0, len = prefixes.length; j < len; j++) {
|
||||
prefix = prefixes[j];
|
||||
prefix = utils.removeNote(prefix);
|
||||
if (prefix.length > max) {
|
||||
max = prefix.length;
|
||||
}
|
||||
}
|
||||
return decl._autoprefixerMax = max;
|
||||
};
|
||||
|
||||
Declaration.prototype.calcBefore = function(prefixes, decl, prefix) {
|
||||
var before, diff, i, j, max, ref;
|
||||
if (prefix == null) {
|
||||
prefix = '';
|
||||
}
|
||||
before = decl.style('before');
|
||||
max = this.maxPrefixed(prefixes, decl);
|
||||
diff = max - utils.removeNote(prefix).length;
|
||||
for (i = j = 0, ref = diff; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
|
||||
before += ' ';
|
||||
}
|
||||
return before;
|
||||
};
|
||||
|
||||
Declaration.prototype.restoreBefore = function(decl) {
|
||||
var lines, min;
|
||||
lines = decl.style('before').split("\n");
|
||||
min = lines[lines.length - 1];
|
||||
this.all.group(decl).up(function(prefixed) {
|
||||
var array, last;
|
||||
array = prefixed.style('before').split("\n");
|
||||
last = array[array.length - 1];
|
||||
if (last.length < min.length) {
|
||||
return min = last;
|
||||
}
|
||||
});
|
||||
lines[lines.length - 1] = min;
|
||||
return decl.before = lines.join("\n");
|
||||
};
|
||||
|
||||
Declaration.prototype.insert = function(decl, prefix, prefixes) {
|
||||
var cloned;
|
||||
cloned = this.set(this.clone(decl), prefix);
|
||||
if (!cloned) {
|
||||
return;
|
||||
}
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.before = this.calcBefore(prefixes, decl, prefix);
|
||||
}
|
||||
return decl.parent.insertBefore(decl, cloned);
|
||||
};
|
||||
|
||||
Declaration.prototype.add = function(decl, prefix, prefixes) {
|
||||
var already, prefixed;
|
||||
prefixed = this.prefixed(decl.prop, prefix);
|
||||
already = this.all.group(decl).up(function(i) {
|
||||
return i.prop === prefixed;
|
||||
});
|
||||
already || (already = this.all.group(decl).down(function(i) {
|
||||
return i.prop === prefixed;
|
||||
}));
|
||||
if (already || this.otherPrefixes(decl.value, prefix)) {
|
||||
return;
|
||||
}
|
||||
return this.insert(decl, prefix, prefixes);
|
||||
};
|
||||
|
||||
Declaration.prototype.process = function(decl) {
|
||||
var prefixes;
|
||||
if (this.needCascade(decl)) {
|
||||
prefixes = Declaration.__super__.process.apply(this, arguments);
|
||||
if (prefixes != null ? prefixes.length : void 0) {
|
||||
this.restoreBefore(decl);
|
||||
return decl.before = this.calcBefore(prefixes, decl);
|
||||
}
|
||||
} else {
|
||||
return Declaration.__super__.process.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Declaration.prototype.old = function(prop, prefix) {
|
||||
return [this.prefixed(prop, prefix)];
|
||||
};
|
||||
|
||||
return Declaration;
|
||||
|
||||
})(Prefixer);
|
||||
|
||||
module.exports = Declaration;
|
||||
|
||||
}).call(this);
|
||||
57
node_modules/autoprefixer-core/lib/hacks/align-content.js
generated
vendored
Normal file
57
node_modules/autoprefixer-core/lib/hacks/align-content.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
(function() {
|
||||
var AlignContent, Declaration, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
AlignContent = (function(superClass) {
|
||||
extend(AlignContent, superClass);
|
||||
|
||||
function AlignContent() {
|
||||
return AlignContent.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
AlignContent.names = ['align-content', 'flex-line-pack'];
|
||||
|
||||
AlignContent.oldValues = {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start',
|
||||
'space-between': 'justify',
|
||||
'space-around': 'distribute'
|
||||
};
|
||||
|
||||
AlignContent.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-line-pack';
|
||||
} else {
|
||||
return AlignContent.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
AlignContent.prototype.normalize = function(prop) {
|
||||
return 'align-content';
|
||||
};
|
||||
|
||||
AlignContent.prototype.set = function(decl, prefix) {
|
||||
var spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2012) {
|
||||
decl.value = AlignContent.oldValues[decl.value] || decl.value;
|
||||
return AlignContent.__super__.set.call(this, decl, prefix);
|
||||
} else if (spec === 'final') {
|
||||
return AlignContent.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return AlignContent;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = AlignContent;
|
||||
|
||||
}).call(this);
|
||||
57
node_modules/autoprefixer-core/lib/hacks/align-items.js
generated
vendored
Normal file
57
node_modules/autoprefixer-core/lib/hacks/align-items.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
(function() {
|
||||
var AlignItems, Declaration, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
AlignItems = (function(superClass) {
|
||||
extend(AlignItems, superClass);
|
||||
|
||||
function AlignItems() {
|
||||
return AlignItems.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
AlignItems.names = ['align-items', 'flex-align', 'box-align'];
|
||||
|
||||
AlignItems.oldValues = {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start'
|
||||
};
|
||||
|
||||
AlignItems.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-align';
|
||||
} else if (spec === 2012) {
|
||||
return prefix + 'flex-align';
|
||||
} else {
|
||||
return AlignItems.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
AlignItems.prototype.normalize = function(prop) {
|
||||
return 'align-items';
|
||||
};
|
||||
|
||||
AlignItems.prototype.set = function(decl, prefix) {
|
||||
var spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009 || spec === 2012) {
|
||||
decl.value = AlignItems.oldValues[decl.value] || decl.value;
|
||||
return AlignItems.__super__.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return AlignItems.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return AlignItems;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = AlignItems;
|
||||
|
||||
}).call(this);
|
||||
55
node_modules/autoprefixer-core/lib/hacks/align-self.js
generated
vendored
Normal file
55
node_modules/autoprefixer-core/lib/hacks/align-self.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
(function() {
|
||||
var AlignSelf, Declaration, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
AlignSelf = (function(superClass) {
|
||||
extend(AlignSelf, superClass);
|
||||
|
||||
function AlignSelf() {
|
||||
return AlignSelf.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
AlignSelf.names = ['align-self', 'flex-item-align'];
|
||||
|
||||
AlignSelf.oldValues = {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start'
|
||||
};
|
||||
|
||||
AlignSelf.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-item-align';
|
||||
} else {
|
||||
return AlignSelf.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
AlignSelf.prototype.normalize = function(prop) {
|
||||
return 'align-self';
|
||||
};
|
||||
|
||||
AlignSelf.prototype.set = function(decl, prefix) {
|
||||
var spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2012) {
|
||||
decl.value = AlignSelf.oldValues[decl.value] || decl.value;
|
||||
return AlignSelf.__super__.set.call(this, decl, prefix);
|
||||
} else if (spec === 'final') {
|
||||
return AlignSelf.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return AlignSelf;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = AlignSelf;
|
||||
|
||||
}).call(this);
|
||||
32
node_modules/autoprefixer-core/lib/hacks/background-size.js
generated
vendored
Normal file
32
node_modules/autoprefixer-core/lib/hacks/background-size.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
(function() {
|
||||
var BackgroundSize, Declaration,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BackgroundSize = (function(superClass) {
|
||||
extend(BackgroundSize, superClass);
|
||||
|
||||
function BackgroundSize() {
|
||||
return BackgroundSize.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
BackgroundSize.names = ['background-size'];
|
||||
|
||||
BackgroundSize.prototype.set = function(decl, prefix) {
|
||||
var value;
|
||||
value = decl.value.toLowerCase();
|
||||
if (prefix === '-webkit-' && value.indexOf(' ') === -1 && value !== 'contain' && value !== 'cover') {
|
||||
decl.value = decl.value + ' ' + decl.value;
|
||||
}
|
||||
return BackgroundSize.__super__.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return BackgroundSize;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = BackgroundSize;
|
||||
|
||||
}).call(this);
|
||||
35
node_modules/autoprefixer-core/lib/hacks/block-logical.js
generated
vendored
Normal file
35
node_modules/autoprefixer-core/lib/hacks/block-logical.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
(function() {
|
||||
var BlockLogical, Declaration,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BlockLogical = (function(superClass) {
|
||||
extend(BlockLogical, superClass);
|
||||
|
||||
function BlockLogical() {
|
||||
return BlockLogical.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
BlockLogical.names = ['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', 'border-before', 'border-after', 'margin-before', 'margin-after', 'padding-before', 'padding-after'];
|
||||
|
||||
BlockLogical.prototype.prefixed = function(prop, prefix) {
|
||||
return prefix + (prop.indexOf('-start') !== -1 ? prop.replace('-block-start', '-before') : prop.replace('-block-end', '-after'));
|
||||
};
|
||||
|
||||
BlockLogical.prototype.normalize = function(prop) {
|
||||
if (prop.indexOf('-before') !== -1) {
|
||||
return prop.replace('-before', '-block-start');
|
||||
} else {
|
||||
return prop.replace('-after', '-block-end');
|
||||
}
|
||||
};
|
||||
|
||||
return BlockLogical;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = BlockLogical;
|
||||
|
||||
}).call(this);
|
||||
28
node_modules/autoprefixer-core/lib/hacks/border-image.js
generated
vendored
Normal file
28
node_modules/autoprefixer-core/lib/hacks/border-image.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
(function() {
|
||||
var BorderImage, Declaration,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BorderImage = (function(superClass) {
|
||||
extend(BorderImage, superClass);
|
||||
|
||||
function BorderImage() {
|
||||
return BorderImage.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
BorderImage.names = ['border-image'];
|
||||
|
||||
BorderImage.prototype.set = function(decl, prefix) {
|
||||
decl.value = decl.value.replace(/\s+fill(\s)/, '$1');
|
||||
return BorderImage.__super__.set.call(this, decl, prefix);
|
||||
};
|
||||
|
||||
return BorderImage;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = BorderImage;
|
||||
|
||||
}).call(this);
|
||||
56
node_modules/autoprefixer-core/lib/hacks/border-radius.js
generated
vendored
Normal file
56
node_modules/autoprefixer-core/lib/hacks/border-radius.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
(function() {
|
||||
var BorderRadius, Declaration,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BorderRadius = (function(superClass) {
|
||||
var hor, i, j, len, len1, mozilla, normal, ref, ref1, ver;
|
||||
|
||||
extend(BorderRadius, superClass);
|
||||
|
||||
function BorderRadius() {
|
||||
return BorderRadius.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
BorderRadius.names = ['border-radius'];
|
||||
|
||||
BorderRadius.toMozilla = {};
|
||||
|
||||
BorderRadius.toNormal = {};
|
||||
|
||||
ref = ['top', 'bottom'];
|
||||
for (i = 0, len = ref.length; i < len; i++) {
|
||||
ver = ref[i];
|
||||
ref1 = ['left', 'right'];
|
||||
for (j = 0, len1 = ref1.length; j < len1; j++) {
|
||||
hor = ref1[j];
|
||||
normal = "border-" + ver + "-" + hor + "-radius";
|
||||
mozilla = "border-radius-" + ver + hor;
|
||||
BorderRadius.names.push(normal);
|
||||
BorderRadius.names.push(mozilla);
|
||||
BorderRadius.toMozilla[normal] = mozilla;
|
||||
BorderRadius.toNormal[mozilla] = normal;
|
||||
}
|
||||
}
|
||||
|
||||
BorderRadius.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-moz-') {
|
||||
return prefix + (BorderRadius.toMozilla[prop] || prop);
|
||||
} else {
|
||||
return BorderRadius.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
BorderRadius.prototype.normalize = function(prop) {
|
||||
return BorderRadius.toNormal[prop] || prop;
|
||||
};
|
||||
|
||||
return BorderRadius;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = BorderRadius;
|
||||
|
||||
}).call(this);
|
||||
54
node_modules/autoprefixer-core/lib/hacks/break-inside.js
generated
vendored
Normal file
54
node_modules/autoprefixer-core/lib/hacks/break-inside.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
(function() {
|
||||
var BreakInside, Declaration,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
BreakInside = (function(superClass) {
|
||||
extend(BreakInside, superClass);
|
||||
|
||||
function BreakInside() {
|
||||
return BreakInside.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
BreakInside.names = ['break-inside', 'page-break-inside', 'column-break-inside'];
|
||||
|
||||
BreakInside.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return prefix + 'column-break-inside';
|
||||
} else if (prefix === '-moz-') {
|
||||
return 'page-break-inside';
|
||||
} else {
|
||||
return BreakInside.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
BreakInside.prototype.normalize = function() {
|
||||
return 'break-inside';
|
||||
};
|
||||
|
||||
BreakInside.prototype.set = function(decl, prefix) {
|
||||
if (decl.value === 'avoid-column' || decl.value === 'avoid-page') {
|
||||
decl.value = 'avoid';
|
||||
}
|
||||
return BreakInside.__super__.set.apply(this, arguments);
|
||||
};
|
||||
|
||||
BreakInside.prototype.insert = function(decl, prefix, prefixes) {
|
||||
if (decl.value === 'avoid-region') {
|
||||
|
||||
} else if (decl.value === 'avoid-page' && prefix === '-webkit-') {
|
||||
|
||||
} else {
|
||||
return BreakInside.__super__.insert.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return BreakInside;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = BreakInside;
|
||||
|
||||
}).call(this);
|
||||
31
node_modules/autoprefixer-core/lib/hacks/crisp-edges.js
generated
vendored
Normal file
31
node_modules/autoprefixer-core/lib/hacks/crisp-edges.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
(function() {
|
||||
var CrispEdges, Value,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
CrispEdges = (function(superClass) {
|
||||
extend(CrispEdges, superClass);
|
||||
|
||||
function CrispEdges() {
|
||||
return CrispEdges.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
CrispEdges.names = ['crisp-edges'];
|
||||
|
||||
CrispEdges.prototype.replace = function(string, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return string.replace(this.regexp(), '$1-webkit-optimize-contrast');
|
||||
} else {
|
||||
return CrispEdges.__super__.replace.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return CrispEdges;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = CrispEdges;
|
||||
|
||||
}).call(this);
|
||||
68
node_modules/autoprefixer-core/lib/hacks/display-flex.js
generated
vendored
Normal file
68
node_modules/autoprefixer-core/lib/hacks/display-flex.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
(function() {
|
||||
var DisplayFlex, OldDisplayFlex, OldValue, Value, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
OldDisplayFlex = (function(superClass) {
|
||||
extend(OldDisplayFlex, superClass);
|
||||
|
||||
function OldDisplayFlex(unprefixed, prefixed1) {
|
||||
this.unprefixed = unprefixed;
|
||||
this.prefixed = prefixed1;
|
||||
}
|
||||
|
||||
OldDisplayFlex.prototype.check = function(value) {
|
||||
return value === this.name;
|
||||
};
|
||||
|
||||
return OldDisplayFlex;
|
||||
|
||||
})(OldValue);
|
||||
|
||||
DisplayFlex = (function(superClass) {
|
||||
extend(DisplayFlex, superClass);
|
||||
|
||||
DisplayFlex.names = ['display-flex', 'inline-flex'];
|
||||
|
||||
function DisplayFlex(name, prefixes) {
|
||||
DisplayFlex.__super__.constructor.apply(this, arguments);
|
||||
if (name === 'display-flex') {
|
||||
this.name = 'flex';
|
||||
}
|
||||
}
|
||||
|
||||
DisplayFlex.prototype.check = function(decl) {
|
||||
return decl.value === this.name;
|
||||
};
|
||||
|
||||
DisplayFlex.prototype.prefixed = function(prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
return prefix + (spec === 2009 ? this.name === 'flex' ? 'box' : 'inline-box' : spec === 2012 ? this.name === 'flex' ? 'flexbox' : 'inline-flexbox' : spec === 'final' ? this.name : void 0);
|
||||
};
|
||||
|
||||
DisplayFlex.prototype.replace = function(string, prefix) {
|
||||
return this.prefixed(prefix);
|
||||
};
|
||||
|
||||
DisplayFlex.prototype.old = function(prefix) {
|
||||
var prefixed;
|
||||
prefixed = this.prefixed(prefix);
|
||||
if (prefixed) {
|
||||
return new OldValue(this.name, prefixed);
|
||||
}
|
||||
};
|
||||
|
||||
return DisplayFlex;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = DisplayFlex;
|
||||
|
||||
}).call(this);
|
||||
41
node_modules/autoprefixer-core/lib/hacks/fill-available.js
generated
vendored
Normal file
41
node_modules/autoprefixer-core/lib/hacks/fill-available.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
(function() {
|
||||
var FillAvailable, OldValue, Value,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
FillAvailable = (function(superClass) {
|
||||
extend(FillAvailable, superClass);
|
||||
|
||||
function FillAvailable() {
|
||||
return FillAvailable.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FillAvailable.names = ['fill-available'];
|
||||
|
||||
FillAvailable.prototype.replace = function(string, prefix) {
|
||||
if (prefix === '-moz-') {
|
||||
return string.replace(this.regexp(), '$1-moz-available$3');
|
||||
} else {
|
||||
return FillAvailable.__super__.replace.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
FillAvailable.prototype.old = function(prefix) {
|
||||
if (prefix === '-moz-') {
|
||||
return new OldValue(this.name, '-moz-available');
|
||||
} else {
|
||||
return FillAvailable.__super__.old.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return FillAvailable;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = FillAvailable;
|
||||
|
||||
}).call(this);
|
||||
69
node_modules/autoprefixer-core/lib/hacks/filter-value.js
generated
vendored
Normal file
69
node_modules/autoprefixer-core/lib/hacks/filter-value.js
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
(function() {
|
||||
var FilterValue, OldFilterValue, OldValue, Value, utils,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
utils = require('../utils');
|
||||
|
||||
OldFilterValue = (function(superClass) {
|
||||
extend(OldFilterValue, superClass);
|
||||
|
||||
function OldFilterValue() {
|
||||
return OldFilterValue.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
OldFilterValue.prototype.clean = function(decl) {
|
||||
return decl.value = utils.editList(decl.value, (function(_this) {
|
||||
return function(props) {
|
||||
if (props.every(function(i) {
|
||||
return i.indexOf(_this.unprefixed) !== 0;
|
||||
})) {
|
||||
return props;
|
||||
}
|
||||
return props.filter(function(i) {
|
||||
return i.indexOf(_this.prefixed) === -1;
|
||||
});
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
return OldFilterValue;
|
||||
|
||||
})(OldValue);
|
||||
|
||||
FilterValue = (function(superClass) {
|
||||
extend(FilterValue, superClass);
|
||||
|
||||
function FilterValue() {
|
||||
return FilterValue.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FilterValue.names = ['filter'];
|
||||
|
||||
FilterValue.prototype.replace = function(value, prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
if (value.indexOf('-webkit-filter') === -1) {
|
||||
return FilterValue.__super__.replace.apply(this, arguments) + ', ' + value;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
} else {
|
||||
return FilterValue.__super__.replace.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
FilterValue.prototype.old = function(prefix) {
|
||||
return new OldFilterValue(this.name, prefix + this.name);
|
||||
};
|
||||
|
||||
return FilterValue;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = FilterValue;
|
||||
|
||||
}).call(this);
|
||||
29
node_modules/autoprefixer-core/lib/hacks/filter.js
generated
vendored
Normal file
29
node_modules/autoprefixer-core/lib/hacks/filter.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
(function() {
|
||||
var Declaration, Filter,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
Filter = (function(superClass) {
|
||||
extend(Filter, superClass);
|
||||
|
||||
function Filter() {
|
||||
return Filter.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Filter.names = ['filter'];
|
||||
|
||||
Filter.prototype.check = function(decl) {
|
||||
var v;
|
||||
v = decl.value;
|
||||
return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1 && v.indexOf('data:image/svg+xml') === -1;
|
||||
};
|
||||
|
||||
return Filter;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = Filter;
|
||||
|
||||
}).call(this);
|
||||
47
node_modules/autoprefixer-core/lib/hacks/flex-basis.js
generated
vendored
Normal file
47
node_modules/autoprefixer-core/lib/hacks/flex-basis.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
(function() {
|
||||
var Declaration, FlexBasis, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexBasis = (function(superClass) {
|
||||
extend(FlexBasis, superClass);
|
||||
|
||||
function FlexBasis() {
|
||||
return FlexBasis.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexBasis.names = ['flex-basis', 'flex-preferred-size'];
|
||||
|
||||
FlexBasis.prototype.normalize = function() {
|
||||
return 'flex-basis';
|
||||
};
|
||||
|
||||
FlexBasis.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-preferred-size';
|
||||
} else {
|
||||
return FlexBasis.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
FlexBasis.prototype.set = function(decl, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012 || spec === 'final') {
|
||||
return FlexBasis.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexBasis;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = FlexBasis;
|
||||
|
||||
}).call(this);
|
||||
71
node_modules/autoprefixer-core/lib/hacks/flex-direction.js
generated
vendored
Normal file
71
node_modules/autoprefixer-core/lib/hacks/flex-direction.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
(function() {
|
||||
var Declaration, FlexDirection, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexDirection = (function(superClass) {
|
||||
extend(FlexDirection, superClass);
|
||||
|
||||
function FlexDirection() {
|
||||
return FlexDirection.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexDirection.names = ['flex-direction', 'box-direction', 'box-orient'];
|
||||
|
||||
FlexDirection.prototype.normalize = function(prop) {
|
||||
return 'flex-direction';
|
||||
};
|
||||
|
||||
FlexDirection.prototype.insert = function(decl, prefix, prefixes) {
|
||||
var already, cloned, dir, orient, ref, spec, value;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
already = decl.parent.some(function(i) {
|
||||
return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
|
||||
});
|
||||
if (already) {
|
||||
return;
|
||||
}
|
||||
value = decl.value;
|
||||
orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
|
||||
dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
|
||||
cloned = this.clone(decl);
|
||||
cloned.prop = prefix + 'box-orient';
|
||||
cloned.value = orient;
|
||||
if (this.needCascade(decl)) {
|
||||
cloned.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.before = this.calcBefore(prefixes, decl, prefix);
|
||||
}
|
||||
return decl.parent.insertBefore(decl, cloned);
|
||||
} else {
|
||||
return FlexDirection.__super__.insert.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
FlexDirection.prototype.old = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
return [prefix + 'box-orient', prefix + 'box-direction'];
|
||||
} else {
|
||||
return FlexDirection.__super__.old.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexDirection;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = FlexDirection;
|
||||
|
||||
}).call(this);
|
||||
35
node_modules/autoprefixer-core/lib/hacks/flex-flow.js
generated
vendored
Normal file
35
node_modules/autoprefixer-core/lib/hacks/flex-flow.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
(function() {
|
||||
var Declaration, FlexFlow, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexFlow = (function(superClass) {
|
||||
extend(FlexFlow, superClass);
|
||||
|
||||
function FlexFlow() {
|
||||
return FlexFlow.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexFlow.names = ['flex-flow'];
|
||||
|
||||
FlexFlow.prototype.set = function(decl, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012) {
|
||||
return FlexFlow.__super__.set.apply(this, arguments);
|
||||
} else if (spec === 'final') {
|
||||
return FlexFlow.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexFlow;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = FlexFlow;
|
||||
|
||||
}).call(this);
|
||||
41
node_modules/autoprefixer-core/lib/hacks/flex-grow.js
generated
vendored
Normal file
41
node_modules/autoprefixer-core/lib/hacks/flex-grow.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
(function() {
|
||||
var Declaration, Flex, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
Flex = (function(superClass) {
|
||||
extend(Flex, superClass);
|
||||
|
||||
function Flex() {
|
||||
return Flex.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Flex.names = ['flex-grow', 'flex-positive'];
|
||||
|
||||
Flex.prototype.normalize = function() {
|
||||
return 'flex';
|
||||
};
|
||||
|
||||
Flex.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-flex';
|
||||
} else if (spec === 2012) {
|
||||
return prefix + 'flex-positive';
|
||||
} else {
|
||||
return Flex.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Flex;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = Flex;
|
||||
|
||||
}).call(this);
|
||||
47
node_modules/autoprefixer-core/lib/hacks/flex-shrink.js
generated
vendored
Normal file
47
node_modules/autoprefixer-core/lib/hacks/flex-shrink.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
(function() {
|
||||
var Declaration, FlexShrink, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexShrink = (function(superClass) {
|
||||
extend(FlexShrink, superClass);
|
||||
|
||||
function FlexShrink() {
|
||||
return FlexShrink.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexShrink.names = ['flex-shrink', 'flex-negative'];
|
||||
|
||||
FlexShrink.prototype.normalize = function() {
|
||||
return 'flex-shrink';
|
||||
};
|
||||
|
||||
FlexShrink.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-negative';
|
||||
} else {
|
||||
return FlexShrink.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
FlexShrink.prototype.set = function(decl, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2012 || spec === 'final') {
|
||||
return FlexShrink.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexShrink;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = FlexShrink;
|
||||
|
||||
}).call(this);
|
||||
11
node_modules/autoprefixer-core/lib/hacks/flex-spec.js
generated
vendored
Normal file
11
node_modules/autoprefixer-core/lib/hacks/flex-spec.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
(function() {
|
||||
module.exports = function(prefix) {
|
||||
var spec;
|
||||
spec = prefix === '-webkit- 2009' || prefix === '-moz-' ? 2009 : prefix === '-ms-' ? 2012 : prefix === '-webkit-' ? 'final' : void 0;
|
||||
if (prefix === '-webkit- 2009') {
|
||||
prefix = '-webkit-';
|
||||
}
|
||||
return [spec, prefix];
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
37
node_modules/autoprefixer-core/lib/hacks/flex-values.js
generated
vendored
Normal file
37
node_modules/autoprefixer-core/lib/hacks/flex-values.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
(function() {
|
||||
var FlexValues, OldValue, Value,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
FlexValues = (function(superClass) {
|
||||
extend(FlexValues, superClass);
|
||||
|
||||
function FlexValues() {
|
||||
return FlexValues.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexValues.names = ['flex', 'flex-grow', 'flex-shrink', 'flex-basis'];
|
||||
|
||||
FlexValues.prototype.prefixed = function(prefix) {
|
||||
return this.all.prefixed(this.name, prefix);
|
||||
};
|
||||
|
||||
FlexValues.prototype.replace = function(string, prefix) {
|
||||
return string.replace(this.regexp(), '$1' + this.prefixed(prefix) + '$3');
|
||||
};
|
||||
|
||||
FlexValues.prototype.old = function(prefix) {
|
||||
return new OldValue(this.name, this.prefixed(prefix));
|
||||
};
|
||||
|
||||
return FlexValues;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = FlexValues;
|
||||
|
||||
}).call(this);
|
||||
33
node_modules/autoprefixer-core/lib/hacks/flex-wrap.js
generated
vendored
Normal file
33
node_modules/autoprefixer-core/lib/hacks/flex-wrap.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
(function() {
|
||||
var Declaration, FlexWrap, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
FlexWrap = (function(superClass) {
|
||||
extend(FlexWrap, superClass);
|
||||
|
||||
function FlexWrap() {
|
||||
return FlexWrap.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
FlexWrap.names = ['flex-wrap'];
|
||||
|
||||
FlexWrap.prototype.set = function(decl, prefix) {
|
||||
var spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec !== 2009) {
|
||||
return FlexWrap.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return FlexWrap;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = FlexWrap;
|
||||
|
||||
}).call(this);
|
||||
58
node_modules/autoprefixer-core/lib/hacks/flex.js
generated
vendored
Normal file
58
node_modules/autoprefixer-core/lib/hacks/flex.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
(function() {
|
||||
var Declaration, Flex, flexSpec, list,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
Flex = (function(superClass) {
|
||||
extend(Flex, superClass);
|
||||
|
||||
function Flex() {
|
||||
return Flex.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Flex.names = ['flex', 'box-flex'];
|
||||
|
||||
Flex.oldValues = {
|
||||
'auto': '1',
|
||||
'none': '0'
|
||||
};
|
||||
|
||||
Flex.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-flex';
|
||||
} else {
|
||||
return Flex.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Flex.prototype.normalize = function() {
|
||||
return 'flex';
|
||||
};
|
||||
|
||||
Flex.prototype.set = function(decl, prefix) {
|
||||
var spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009) {
|
||||
decl.value = list.space(decl.value)[0];
|
||||
decl.value = Flex.oldValues[decl.value] || decl.value;
|
||||
return Flex.__super__.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return Flex.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Flex;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = Flex;
|
||||
|
||||
}).call(this);
|
||||
33
node_modules/autoprefixer-core/lib/hacks/fullscreen.js
generated
vendored
Normal file
33
node_modules/autoprefixer-core/lib/hacks/fullscreen.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
(function() {
|
||||
var Fullscreen, Selector,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Selector = require('../selector');
|
||||
|
||||
Fullscreen = (function(superClass) {
|
||||
extend(Fullscreen, superClass);
|
||||
|
||||
function Fullscreen() {
|
||||
return Fullscreen.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Fullscreen.names = [':fullscreen'];
|
||||
|
||||
Fullscreen.prototype.prefixed = function(prefix) {
|
||||
if ('-webkit-' === prefix) {
|
||||
return ':-webkit-full-screen';
|
||||
} else if ('-moz-' === prefix) {
|
||||
return ':-moz-full-screen';
|
||||
} else {
|
||||
return ":" + prefix + "fullscreen";
|
||||
}
|
||||
};
|
||||
|
||||
return Fullscreen;
|
||||
|
||||
})(Selector);
|
||||
|
||||
module.exports = Fullscreen;
|
||||
|
||||
}).call(this);
|
||||
234
node_modules/autoprefixer-core/lib/hacks/gradient.js
generated
vendored
Normal file
234
node_modules/autoprefixer-core/lib/hacks/gradient.js
generated
vendored
Normal file
@@ -0,0 +1,234 @@
|
||||
(function() {
|
||||
var Gradient, OldValue, Value, isDirection, list, utils,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldValue = require('../old-value');
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
utils = require('../utils');
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
isDirection = /top|left|right|bottom/gi;
|
||||
|
||||
Gradient = (function(superClass) {
|
||||
extend(Gradient, superClass);
|
||||
|
||||
function Gradient() {
|
||||
return Gradient.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Gradient.names = ['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'];
|
||||
|
||||
Gradient.prototype.replace = function(string, prefix) {
|
||||
return list.space(string).map((function(_this) {
|
||||
return function(value) {
|
||||
var after, args, close, params;
|
||||
if (value.slice(0, +_this.name.length + 1 || 9e9) !== _this.name + '(') {
|
||||
return value;
|
||||
}
|
||||
close = value.lastIndexOf(')');
|
||||
after = value.slice(close + 1);
|
||||
args = value.slice(_this.name.length + 1, +(close - 1) + 1 || 9e9);
|
||||
params = list.comma(args);
|
||||
params = _this.newDirection(params);
|
||||
if (prefix === '-webkit- old') {
|
||||
return _this.oldWebkit(value, args, params, after);
|
||||
} else {
|
||||
_this.convertDirection(params);
|
||||
return prefix + _this.name + '(' + params.join(', ') + ')' + after;
|
||||
}
|
||||
};
|
||||
})(this)).join(' ');
|
||||
};
|
||||
|
||||
Gradient.prototype.directions = {
|
||||
top: 'bottom',
|
||||
left: 'right',
|
||||
bottom: 'top',
|
||||
right: 'left'
|
||||
};
|
||||
|
||||
Gradient.prototype.oldDirections = {
|
||||
'top': 'left bottom, left top',
|
||||
'left': 'right top, left top',
|
||||
'bottom': 'left top, left bottom',
|
||||
'right': 'left top, right top',
|
||||
'top right': 'left bottom, right top',
|
||||
'top left': 'right bottom, left top',
|
||||
'right top': 'left bottom, right top',
|
||||
'right bottom': 'left top, right bottom',
|
||||
'bottom right': 'left top, right bottom',
|
||||
'bottom left': 'right top, left bottom',
|
||||
'left top': 'right bottom, left top',
|
||||
'left bottom': 'right top, left bottom'
|
||||
};
|
||||
|
||||
Gradient.prototype.newDirection = function(params) {
|
||||
var first, value;
|
||||
first = params[0];
|
||||
if (first.indexOf('to ') === -1 && isDirection.test(first)) {
|
||||
first = first.split(' ');
|
||||
first = (function() {
|
||||
var j, len, results;
|
||||
results = [];
|
||||
for (j = 0, len = first.length; j < len; j++) {
|
||||
value = first[j];
|
||||
results.push(this.directions[value.toLowerCase()] || value);
|
||||
}
|
||||
return results;
|
||||
}).call(this);
|
||||
params[0] = 'to ' + first.join(' ');
|
||||
}
|
||||
return params;
|
||||
};
|
||||
|
||||
Gradient.prototype.oldWebkit = function(value, args, params, after) {
|
||||
if (args.indexOf('px') !== -1) {
|
||||
return value;
|
||||
}
|
||||
if (this.name !== 'linear-gradient') {
|
||||
return value;
|
||||
}
|
||||
if (params[0] && params[0].indexOf('deg') !== -1) {
|
||||
return value;
|
||||
}
|
||||
if (args.indexOf('-corner') !== -1) {
|
||||
return value;
|
||||
}
|
||||
if (args.indexOf('-side') !== -1) {
|
||||
return value;
|
||||
}
|
||||
params = this.oldDirection(params);
|
||||
params = this.colorStops(params);
|
||||
return '-webkit-gradient(linear, ' + params.join(', ') + ')' + after;
|
||||
};
|
||||
|
||||
Gradient.prototype.convertDirection = function(params) {
|
||||
if (params.length > 0) {
|
||||
if (params[0].slice(0, 3) === 'to ') {
|
||||
return params[0] = this.fixDirection(params[0]);
|
||||
} else if (params[0].indexOf('deg') !== -1) {
|
||||
return params[0] = this.fixAngle(params[0]);
|
||||
} else if (params[0].indexOf(' at ') !== -1) {
|
||||
return this.fixRadial(params);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Gradient.prototype.fixDirection = function(param) {
|
||||
var value;
|
||||
param = param.split(' ');
|
||||
param.splice(0, 1);
|
||||
param = (function() {
|
||||
var j, len, results;
|
||||
results = [];
|
||||
for (j = 0, len = param.length; j < len; j++) {
|
||||
value = param[j];
|
||||
results.push(this.directions[value.toLowerCase()] || value);
|
||||
}
|
||||
return results;
|
||||
}).call(this);
|
||||
return param.join(' ');
|
||||
};
|
||||
|
||||
Gradient.prototype.roundFloat = function(float, digits) {
|
||||
return parseFloat(float.toFixed(digits));
|
||||
};
|
||||
|
||||
Gradient.prototype.fixAngle = function(param) {
|
||||
param = parseFloat(param);
|
||||
param = Math.abs(450 - param) % 360;
|
||||
param = this.roundFloat(param, 3);
|
||||
return param + "deg";
|
||||
};
|
||||
|
||||
Gradient.prototype.oldDirection = function(params) {
|
||||
var direction;
|
||||
if (params.length === 0) {
|
||||
params;
|
||||
}
|
||||
if (params[0].indexOf('to ') !== -1) {
|
||||
direction = params[0].replace(/^to\s+/, '');
|
||||
direction = this.oldDirections[direction];
|
||||
params[0] = direction;
|
||||
return params;
|
||||
} else {
|
||||
direction = this.oldDirections.bottom;
|
||||
return [direction].concat(params);
|
||||
}
|
||||
};
|
||||
|
||||
Gradient.prototype.colorStops = function(params) {
|
||||
return params.map(function(param, i) {
|
||||
var color, match, position, ref;
|
||||
if (i === 0) {
|
||||
return param;
|
||||
}
|
||||
ref = list.space(param), color = ref[0], position = ref[1];
|
||||
if (position == null) {
|
||||
match = param.match(/^(.*\))(\d.*)$/);
|
||||
if (match) {
|
||||
color = match[1];
|
||||
position = match[2];
|
||||
}
|
||||
}
|
||||
if (position && position.indexOf(')') !== -1) {
|
||||
color += ' ' + position;
|
||||
position = void 0;
|
||||
}
|
||||
if (i === 1 && (position === void 0 || position === '0%')) {
|
||||
return "from(" + color + ")";
|
||||
} else if (i === params.length - 1 && (position === void 0 || position === '100%')) {
|
||||
return "to(" + color + ")";
|
||||
} else if (position) {
|
||||
return "color-stop(" + position + ", " + color + ")";
|
||||
} else {
|
||||
return "color-stop(" + color + ")";
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Gradient.prototype.fixRadial = function(params) {
|
||||
var first;
|
||||
first = params[0].split(/\s+at\s+/);
|
||||
return params.splice(0, 1, first[1], first[0]);
|
||||
};
|
||||
|
||||
Gradient.prototype.old = function(prefix) {
|
||||
var regexp, string, type;
|
||||
if (prefix === '-webkit-') {
|
||||
type = this.name === 'linear-gradient' ? 'linear' : 'radial';
|
||||
string = '-gradient';
|
||||
regexp = utils.regexp("-webkit-(" + type + "-gradient|gradient\\(\\s*" + type + ")", false);
|
||||
return new OldValue(this.name, prefix + this.name, string, regexp);
|
||||
} else {
|
||||
return Gradient.__super__.old.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Gradient.prototype.add = function(decl, prefix) {
|
||||
var p;
|
||||
p = decl.prop;
|
||||
if (p.indexOf('mask') !== -1) {
|
||||
if (prefix === '-webkit-' || prefix === '-webkit- old') {
|
||||
return Gradient.__super__.add.apply(this, arguments);
|
||||
}
|
||||
} else if (p === 'list-style' || p === 'list-style-image' || p === 'content') {
|
||||
if (prefix === '-webkit-' || prefix === '-webkit- old') {
|
||||
return Gradient.__super__.add.apply(this, arguments);
|
||||
}
|
||||
} else {
|
||||
return Gradient.__super__.add.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Gradient;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = Gradient;
|
||||
|
||||
}).call(this);
|
||||
49
node_modules/autoprefixer-core/lib/hacks/image-rendering.js
generated
vendored
Normal file
49
node_modules/autoprefixer-core/lib/hacks/image-rendering.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
(function() {
|
||||
var Declaration, ImageRendering,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
ImageRendering = (function(superClass) {
|
||||
extend(ImageRendering, superClass);
|
||||
|
||||
function ImageRendering() {
|
||||
return ImageRendering.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
ImageRendering.names = ['image-rendering', 'interpolation-mode'];
|
||||
|
||||
ImageRendering.prototype.check = function(decl) {
|
||||
return decl.value === 'crisp-edges';
|
||||
};
|
||||
|
||||
ImageRendering.prototype.prefixed = function(prop, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return '-ms-interpolation-mode';
|
||||
} else {
|
||||
return ImageRendering.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
ImageRendering.prototype.set = function(decl, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
decl.prop = '-ms-interpolation-mode';
|
||||
decl.value = 'nearest-neighbor';
|
||||
return decl;
|
||||
} else {
|
||||
return ImageRendering.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
ImageRendering.prototype.normalize = function(prop) {
|
||||
return 'image-rendering';
|
||||
};
|
||||
|
||||
return ImageRendering;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = ImageRendering;
|
||||
|
||||
}).call(this);
|
||||
31
node_modules/autoprefixer-core/lib/hacks/inline-logical.js
generated
vendored
Normal file
31
node_modules/autoprefixer-core/lib/hacks/inline-logical.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
(function() {
|
||||
var Declaration, InlineLogical,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
InlineLogical = (function(superClass) {
|
||||
extend(InlineLogical, superClass);
|
||||
|
||||
function InlineLogical() {
|
||||
return InlineLogical.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
InlineLogical.names = ['border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', 'border-start', 'border-end', 'margin-start', 'margin-end', 'padding-start', 'padding-end'];
|
||||
|
||||
InlineLogical.prototype.prefixed = function(prop, prefix) {
|
||||
return prefix + prop.replace('-inline', '');
|
||||
};
|
||||
|
||||
InlineLogical.prototype.normalize = function(prop) {
|
||||
return prop.replace(/(margin|padding|border)-(start|end)/, '$1-inline-$2');
|
||||
};
|
||||
|
||||
return InlineLogical;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = InlineLogical;
|
||||
|
||||
}).call(this);
|
||||
62
node_modules/autoprefixer-core/lib/hacks/justify-content.js
generated
vendored
Normal file
62
node_modules/autoprefixer-core/lib/hacks/justify-content.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
(function() {
|
||||
var Declaration, JustifyContent, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
JustifyContent = (function(superClass) {
|
||||
extend(JustifyContent, superClass);
|
||||
|
||||
function JustifyContent() {
|
||||
return JustifyContent.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
JustifyContent.names = ['justify-content', 'flex-pack', 'box-pack'];
|
||||
|
||||
JustifyContent.oldValues = {
|
||||
'flex-end': 'end',
|
||||
'flex-start': 'start',
|
||||
'space-between': 'justify',
|
||||
'space-around': 'distribute'
|
||||
};
|
||||
|
||||
JustifyContent.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-pack';
|
||||
} else if (spec === 2012) {
|
||||
return prefix + 'flex-pack';
|
||||
} else {
|
||||
return JustifyContent.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
JustifyContent.prototype.normalize = function(prop) {
|
||||
return 'justify-content';
|
||||
};
|
||||
|
||||
JustifyContent.prototype.set = function(decl, prefix) {
|
||||
var spec, value;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009 || spec === 2012) {
|
||||
value = JustifyContent.oldValues[decl.value] || decl.value;
|
||||
decl.value = value;
|
||||
if (spec !== 2009 || value !== 'distribute') {
|
||||
return JustifyContent.__super__.set.call(this, decl, prefix);
|
||||
}
|
||||
} else if (spec === 'final') {
|
||||
return JustifyContent.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return JustifyContent;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = JustifyContent;
|
||||
|
||||
}).call(this);
|
||||
52
node_modules/autoprefixer-core/lib/hacks/order.js
generated
vendored
Normal file
52
node_modules/autoprefixer-core/lib/hacks/order.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
(function() {
|
||||
var Declaration, Order, flexSpec,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
flexSpec = require('./flex-spec');
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
Order = (function(superClass) {
|
||||
extend(Order, superClass);
|
||||
|
||||
function Order() {
|
||||
return Order.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Order.names = ['order', 'flex-order', 'box-ordinal-group'];
|
||||
|
||||
Order.prototype.prefixed = function(prop, prefix) {
|
||||
var ref, spec;
|
||||
ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
|
||||
if (spec === 2009) {
|
||||
return prefix + 'box-ordinal-group';
|
||||
} else if (spec === 2012) {
|
||||
return prefix + 'flex-order';
|
||||
} else {
|
||||
return Order.__super__.prefixed.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Order.prototype.normalize = function(prop) {
|
||||
return 'order';
|
||||
};
|
||||
|
||||
Order.prototype.set = function(decl, prefix) {
|
||||
var spec;
|
||||
spec = flexSpec(prefix)[0];
|
||||
if (spec === 2009) {
|
||||
decl.value = (parseInt(decl.value) + 1).toString();
|
||||
return Order.__super__.set.call(this, decl, prefix);
|
||||
} else {
|
||||
return Order.__super__.set.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return Order;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = Order;
|
||||
|
||||
}).call(this);
|
||||
39
node_modules/autoprefixer-core/lib/hacks/placeholder.js
generated
vendored
Normal file
39
node_modules/autoprefixer-core/lib/hacks/placeholder.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
(function() {
|
||||
var Placeholder, Selector,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Selector = require('../selector');
|
||||
|
||||
Placeholder = (function(superClass) {
|
||||
extend(Placeholder, superClass);
|
||||
|
||||
function Placeholder() {
|
||||
return Placeholder.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Placeholder.names = [':placeholder-shown', '::placeholder'];
|
||||
|
||||
Placeholder.prototype.possible = function() {
|
||||
return Placeholder.__super__.possible.apply(this, arguments).concat('-moz- old');
|
||||
};
|
||||
|
||||
Placeholder.prototype.prefixed = function(prefix) {
|
||||
if ('-webkit-' === prefix) {
|
||||
return '::-webkit-input-placeholder';
|
||||
} else if ('-ms-' === prefix) {
|
||||
return ':-ms-input-placeholder';
|
||||
} else if ('-moz- old' === prefix) {
|
||||
return ':-moz-placeholder';
|
||||
} else {
|
||||
return "::" + prefix + "placeholder";
|
||||
}
|
||||
};
|
||||
|
||||
return Placeholder;
|
||||
|
||||
})(Selector);
|
||||
|
||||
module.exports = Placeholder;
|
||||
|
||||
}).call(this);
|
||||
66
node_modules/autoprefixer-core/lib/hacks/transform-decl.js
generated
vendored
Normal file
66
node_modules/autoprefixer-core/lib/hacks/transform-decl.js
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
(function() {
|
||||
var Declaration, TransformDecl,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Declaration = require('../declaration');
|
||||
|
||||
TransformDecl = (function(superClass) {
|
||||
extend(TransformDecl, superClass);
|
||||
|
||||
function TransformDecl() {
|
||||
return TransformDecl.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
TransformDecl.names = ['transform', 'transform-origin'];
|
||||
|
||||
TransformDecl.functions3d = ['matrix3d', 'translate3d', 'translateZ', 'scale3d', 'scaleZ', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'perspective'];
|
||||
|
||||
TransformDecl.prototype.keykrameParents = function(decl) {
|
||||
var parent;
|
||||
parent = decl.parent;
|
||||
while (parent) {
|
||||
if (parent.type === 'atrule' && parent.name === 'keyframes') {
|
||||
return true;
|
||||
}
|
||||
parent = parent.parent;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
TransformDecl.prototype.contain3d = function(decl) {
|
||||
var func, i, len, ref;
|
||||
if (decl.prop === 'transform-origin') {
|
||||
return false;
|
||||
}
|
||||
ref = TransformDecl.functions3d;
|
||||
for (i = 0, len = ref.length; i < len; i++) {
|
||||
func = ref[i];
|
||||
if (decl.value.indexOf(func + "(") !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
TransformDecl.prototype.insert = function(decl, prefix, prefixes) {
|
||||
if (prefix === '-ms-') {
|
||||
if (!this.contain3d(decl) && !this.keykrameParents(decl)) {
|
||||
return TransformDecl.__super__.insert.apply(this, arguments);
|
||||
}
|
||||
} else if (prefix === '-o-') {
|
||||
if (!this.contain3d(decl)) {
|
||||
return TransformDecl.__super__.insert.apply(this, arguments);
|
||||
}
|
||||
} else {
|
||||
return TransformDecl.__super__.insert.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return TransformDecl;
|
||||
|
||||
})(Declaration);
|
||||
|
||||
module.exports = TransformDecl;
|
||||
|
||||
}).call(this);
|
||||
31
node_modules/autoprefixer-core/lib/hacks/transform-value.js
generated
vendored
Normal file
31
node_modules/autoprefixer-core/lib/hacks/transform-value.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
(function() {
|
||||
var TransformValue, Value,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Value = require('../value');
|
||||
|
||||
TransformValue = (function(superClass) {
|
||||
extend(TransformValue, superClass);
|
||||
|
||||
function TransformValue() {
|
||||
return TransformValue.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
TransformValue.names = ['transform'];
|
||||
|
||||
TransformValue.prototype.replace = function(value, prefix) {
|
||||
if (prefix === '-ms-') {
|
||||
return value;
|
||||
} else {
|
||||
return TransformValue.__super__.replace.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
return TransformValue;
|
||||
|
||||
})(Value);
|
||||
|
||||
module.exports = TransformValue;
|
||||
|
||||
}).call(this);
|
||||
122
node_modules/autoprefixer-core/lib/info.js
generated
vendored
Normal file
122
node_modules/autoprefixer-core/lib/info.js
generated
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
(function() {
|
||||
var capitalize, names, prefix;
|
||||
|
||||
capitalize = function(str) {
|
||||
return str.slice(0, 1).toUpperCase() + str.slice(1);
|
||||
};
|
||||
|
||||
names = {
|
||||
ie: 'IE',
|
||||
ie_mob: 'IE Mobile',
|
||||
ios_saf: 'iOS',
|
||||
op_mini: 'Opera Mini',
|
||||
op_mob: 'Opera Mobile',
|
||||
and_chr: 'Chrome for Android',
|
||||
and_ff: 'Firefox for Android',
|
||||
and_uc: 'UC for Android'
|
||||
};
|
||||
|
||||
prefix = function(name, transition, prefixes) {
|
||||
var out;
|
||||
out = ' ' + name + (transition ? '*' : '') + ': ';
|
||||
out += prefixes.map(function(i) {
|
||||
return i.replace(/^-(.*)-$/g, '$1');
|
||||
}).join(', ');
|
||||
out += "\n";
|
||||
return out;
|
||||
};
|
||||
|
||||
module.exports = function(prefixes) {
|
||||
var atrules, browser, data, j, k, l, len, len1, len2, list, name, needTransition, out, props, ref, ref1, ref2, ref3, ref4, ref5, ref6, selector, selectors, string, transitionProp, useTransition, value, values, version, versions;
|
||||
if (prefixes.browsers.selected.length === 0) {
|
||||
return "No browsers selected";
|
||||
}
|
||||
versions = [];
|
||||
ref = prefixes.browsers.selected;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
browser = ref[j];
|
||||
ref1 = browser.split(' '), name = ref1[0], version = ref1[1];
|
||||
name = names[name] || capitalize(name);
|
||||
if (versions[name]) {
|
||||
versions[name].push(version);
|
||||
} else {
|
||||
versions[name] = [version];
|
||||
}
|
||||
}
|
||||
out = "Browsers:\n";
|
||||
for (browser in versions) {
|
||||
list = versions[browser];
|
||||
list = list.sort(function(a, b) {
|
||||
return parseFloat(b) - parseFloat(a);
|
||||
});
|
||||
out += ' ' + browser + ': ' + list.join(', ') + "\n";
|
||||
}
|
||||
atrules = '';
|
||||
ref2 = prefixes.add;
|
||||
for (name in ref2) {
|
||||
data = ref2[name];
|
||||
if (name[0] === '@' && data.prefixes) {
|
||||
atrules += prefix(name, false, data.prefixes);
|
||||
}
|
||||
}
|
||||
if (atrules !== '') {
|
||||
out += "\nAt-Rules:\n" + atrules;
|
||||
}
|
||||
selectors = '';
|
||||
ref3 = prefixes.add.selectors;
|
||||
for (k = 0, len1 = ref3.length; k < len1; k++) {
|
||||
selector = ref3[k];
|
||||
if (selector.prefixes) {
|
||||
selectors += prefix(selector.name, false, selector.prefixes);
|
||||
}
|
||||
}
|
||||
if (selectors !== '') {
|
||||
out += "\nSelectors:\n" + selectors;
|
||||
}
|
||||
values = '';
|
||||
props = '';
|
||||
useTransition = false;
|
||||
needTransition = (ref4 = prefixes.add.transition) != null ? ref4.prefixes : void 0;
|
||||
ref5 = prefixes.add;
|
||||
for (name in ref5) {
|
||||
data = ref5[name];
|
||||
if (name[0] !== '@' && data.prefixes) {
|
||||
transitionProp = needTransition && prefixes.data[name].transition;
|
||||
if (transitionProp) {
|
||||
useTransition = true;
|
||||
}
|
||||
props += prefix(name, transitionProp, data.prefixes);
|
||||
}
|
||||
if (!data.values) {
|
||||
continue;
|
||||
}
|
||||
if (prefixes.transitionProps.some(function(i) {
|
||||
return i === name;
|
||||
})) {
|
||||
continue;
|
||||
}
|
||||
ref6 = data.values;
|
||||
for (l = 0, len2 = ref6.length; l < len2; l++) {
|
||||
value = ref6[l];
|
||||
string = prefix(value.name, false, value.prefixes);
|
||||
if (values.indexOf(string) === -1) {
|
||||
values += string;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (useTransition) {
|
||||
props += " * - can be used in transition\n";
|
||||
}
|
||||
if (props !== '') {
|
||||
out += "\nProperties:\n" + props;
|
||||
}
|
||||
if (values !== '') {
|
||||
out += "\nValues:\n" + values;
|
||||
}
|
||||
if (atrules === '' && selectors === '' && props === '' && values === '') {
|
||||
out += '\nAwesome! Your browsers don\'t require any vendor prefixes.' + '\nNow you can remove Autoprefixer from build steps.';
|
||||
}
|
||||
return out;
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
68
node_modules/autoprefixer-core/lib/old-selector.js
generated
vendored
Normal file
68
node_modules/autoprefixer-core/lib/old-selector.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
(function() {
|
||||
var OldSelector;
|
||||
|
||||
OldSelector = (function() {
|
||||
function OldSelector(selector, prefix1) {
|
||||
var i, len, prefix, ref;
|
||||
this.prefix = prefix1;
|
||||
this.prefixed = selector.prefixed(this.prefix);
|
||||
this.regexp = selector.regexp(this.prefix);
|
||||
this.prefixeds = [];
|
||||
ref = selector.possible();
|
||||
for (i = 0, len = ref.length; i < len; i++) {
|
||||
prefix = ref[i];
|
||||
this.prefixeds.push([selector.prefixed(prefix), selector.regexp(prefix)]);
|
||||
}
|
||||
this.unprefixed = selector.name;
|
||||
this.nameRegexp = selector.regexp();
|
||||
}
|
||||
|
||||
OldSelector.prototype.isHack = function(rule) {
|
||||
var before, i, index, len, ref, ref1, regexp, rules, some, string;
|
||||
index = rule.parent.index(rule) + 1;
|
||||
rules = rule.parent.nodes;
|
||||
while (index < rules.length) {
|
||||
before = rules[index].selector;
|
||||
if (!before) {
|
||||
return true;
|
||||
}
|
||||
if (before.indexOf(this.unprefixed) !== -1 && before.match(this.nameRegexp)) {
|
||||
return false;
|
||||
}
|
||||
some = false;
|
||||
ref = this.prefixeds;
|
||||
for (i = 0, len = ref.length; i < len; i++) {
|
||||
ref1 = ref[i], string = ref1[0], regexp = ref1[1];
|
||||
if (before.indexOf(string) !== -1 && before.match(regexp)) {
|
||||
some = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!some) {
|
||||
return true;
|
||||
}
|
||||
index += 1;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
OldSelector.prototype.check = function(rule) {
|
||||
if (rule.selector.indexOf(this.prefixed) === -1) {
|
||||
return false;
|
||||
}
|
||||
if (!rule.selector.match(this.regexp)) {
|
||||
return false;
|
||||
}
|
||||
if (this.isHack(rule)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
return OldSelector;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = OldSelector;
|
||||
|
||||
}).call(this);
|
||||
30
node_modules/autoprefixer-core/lib/old-value.js
generated
vendored
Normal file
30
node_modules/autoprefixer-core/lib/old-value.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
(function() {
|
||||
var OldValue, utils;
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
OldValue = (function() {
|
||||
function OldValue(unprefixed, prefixed, string, regexp) {
|
||||
this.unprefixed = unprefixed;
|
||||
this.prefixed = prefixed;
|
||||
this.string = string;
|
||||
this.regexp = regexp;
|
||||
this.regexp || (this.regexp = utils.regexp(this.prefixed));
|
||||
this.string || (this.string = this.prefixed);
|
||||
}
|
||||
|
||||
OldValue.prototype.check = function(value) {
|
||||
if (value.indexOf(this.string) !== -1) {
|
||||
return !!value.match(this.regexp);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
return OldValue;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = OldValue;
|
||||
|
||||
}).call(this);
|
||||
119
node_modules/autoprefixer-core/lib/prefixer.js
generated
vendored
Normal file
119
node_modules/autoprefixer-core/lib/prefixer.js
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
(function() {
|
||||
var Browsers, Prefixer, clone, utils, vendor,
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Browsers = require('./browsers');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
vendor = require('postcss/lib/vendor');
|
||||
|
||||
clone = function(obj, parent) {
|
||||
var cloned, i, value;
|
||||
if (typeof obj !== 'object') {
|
||||
return obj;
|
||||
}
|
||||
cloned = new obj.constructor();
|
||||
for (i in obj) {
|
||||
if (!hasProp.call(obj, i)) continue;
|
||||
value = obj[i];
|
||||
if (i === 'parent' && typeof value === 'object') {
|
||||
if (parent) {
|
||||
cloned[i] = parent;
|
||||
}
|
||||
} else if (i === 'source') {
|
||||
cloned[i] = value;
|
||||
} else if (value instanceof Array) {
|
||||
cloned[i] = value.map(function(i) {
|
||||
return clone(i, cloned);
|
||||
});
|
||||
} else if (i !== '_autoprefixerPrefix' && i !== '_autoprefixerValues') {
|
||||
cloned[i] = clone(value, cloned);
|
||||
}
|
||||
}
|
||||
return cloned;
|
||||
};
|
||||
|
||||
Prefixer = (function() {
|
||||
Prefixer.hack = function(klass) {
|
||||
var j, len, name, ref, results;
|
||||
this.hacks || (this.hacks = {});
|
||||
ref = klass.names;
|
||||
results = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
name = ref[j];
|
||||
results.push(this.hacks[name] = klass);
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
Prefixer.load = function(name, prefixes, all) {
|
||||
var klass, ref;
|
||||
klass = (ref = this.hacks) != null ? ref[name] : void 0;
|
||||
if (klass) {
|
||||
return new klass(name, prefixes, all);
|
||||
} else {
|
||||
return new this(name, prefixes, all);
|
||||
}
|
||||
};
|
||||
|
||||
Prefixer.clone = function(node, overrides) {
|
||||
var cloned, name;
|
||||
cloned = clone(node);
|
||||
for (name in overrides) {
|
||||
cloned[name] = overrides[name];
|
||||
}
|
||||
return cloned;
|
||||
};
|
||||
|
||||
function Prefixer(name1, prefixes1, all1) {
|
||||
this.name = name1;
|
||||
this.prefixes = prefixes1;
|
||||
this.all = all1;
|
||||
}
|
||||
|
||||
Prefixer.prototype.parentPrefix = function(node) {
|
||||
var prefix;
|
||||
prefix = node._autoprefixerPrefix != null ? node._autoprefixerPrefix : node.type === 'decl' && node.prop[0] === '-' ? vendor.prefix(node.prop) : node.type === 'root' ? false : node.type === 'rule' && node.selector.indexOf(':-') !== -1 ? node.selector.match(/:(-\w+-)/)[1] : node.type === 'atrule' && node.name[0] === '-' ? vendor.prefix(node.name) : this.parentPrefix(node.parent);
|
||||
if (Browsers.prefixes().indexOf(prefix) === -1) {
|
||||
prefix = false;
|
||||
}
|
||||
return node._autoprefixerPrefix = prefix;
|
||||
};
|
||||
|
||||
Prefixer.prototype.process = function(node) {
|
||||
var added, j, k, len, len1, parent, prefix, prefixes, ref;
|
||||
if (!this.check(node)) {
|
||||
return;
|
||||
}
|
||||
parent = this.parentPrefix(node);
|
||||
prefixes = [];
|
||||
ref = this.prefixes;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
prefix = ref[j];
|
||||
if (parent && parent !== utils.removeNote(prefix)) {
|
||||
continue;
|
||||
}
|
||||
prefixes.push(prefix);
|
||||
}
|
||||
added = [];
|
||||
for (k = 0, len1 = prefixes.length; k < len1; k++) {
|
||||
prefix = prefixes[k];
|
||||
if (this.add(node, prefix, added.concat([prefix]))) {
|
||||
added.push(prefix);
|
||||
}
|
||||
}
|
||||
return added;
|
||||
};
|
||||
|
||||
Prefixer.prototype.clone = function(node, overrides) {
|
||||
return Prefixer.clone(node, overrides);
|
||||
};
|
||||
|
||||
return Prefixer;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Prefixer;
|
||||
|
||||
}).call(this);
|
||||
368
node_modules/autoprefixer-core/lib/prefixes.js
generated
vendored
Normal file
368
node_modules/autoprefixer-core/lib/prefixes.js
generated
vendored
Normal file
@@ -0,0 +1,368 @@
|
||||
(function() {
|
||||
var AtRule, Browsers, Declaration, Prefixes, Processor, Resolution, Selector, Supports, Value, declsCache, utils, vendor;
|
||||
|
||||
Declaration = require('./declaration');
|
||||
|
||||
Resolution = require('./resolution');
|
||||
|
||||
Processor = require('./processor');
|
||||
|
||||
Supports = require('./supports');
|
||||
|
||||
Browsers = require('./browsers');
|
||||
|
||||
Selector = require('./selector');
|
||||
|
||||
AtRule = require('./at-rule');
|
||||
|
||||
Value = require('./value');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
vendor = require('postcss/lib/vendor');
|
||||
|
||||
Selector.hack(require('./hacks/fullscreen'));
|
||||
|
||||
Selector.hack(require('./hacks/placeholder'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex'));
|
||||
|
||||
Declaration.hack(require('./hacks/order'));
|
||||
|
||||
Declaration.hack(require('./hacks/filter'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex-flow'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex-grow'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex-wrap'));
|
||||
|
||||
Declaration.hack(require('./hacks/align-self'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex-basis'));
|
||||
|
||||
Declaration.hack(require('./hacks/align-items'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex-shrink'));
|
||||
|
||||
Declaration.hack(require('./hacks/break-inside'));
|
||||
|
||||
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/inline-logical'));
|
||||
|
||||
Declaration.hack(require('./hacks/transform-decl'));
|
||||
|
||||
Declaration.hack(require('./hacks/flex-direction'));
|
||||
|
||||
Declaration.hack(require('./hacks/image-rendering'));
|
||||
|
||||
Declaration.hack(require('./hacks/justify-content'));
|
||||
|
||||
Declaration.hack(require('./hacks/background-size'));
|
||||
|
||||
Value.hack(require('./hacks/gradient'));
|
||||
|
||||
Value.hack(require('./hacks/crisp-edges'));
|
||||
|
||||
Value.hack(require('./hacks/flex-values'));
|
||||
|
||||
Value.hack(require('./hacks/display-flex'));
|
||||
|
||||
Value.hack(require('./hacks/filter-value'));
|
||||
|
||||
Value.hack(require('./hacks/fill-available'));
|
||||
|
||||
Value.hack(require('./hacks/transform-value'));
|
||||
|
||||
declsCache = {};
|
||||
|
||||
Prefixes = (function() {
|
||||
function Prefixes(data1, browsers, options) {
|
||||
var ref;
|
||||
this.data = data1;
|
||||
this.browsers = browsers;
|
||||
this.options = options != null ? options : {};
|
||||
ref = this.preprocess(this.select(this.data)), this.add = ref[0], this.remove = ref[1];
|
||||
this.processor = new Processor(this);
|
||||
}
|
||||
|
||||
Prefixes.prototype.transitionProps = ['transition', 'transition-property'];
|
||||
|
||||
Prefixes.prototype.cleaner = function() {
|
||||
var empty;
|
||||
if (!this.cleanerCache) {
|
||||
if (this.browsers.selected.length) {
|
||||
empty = new Browsers(this.browsers.data, []);
|
||||
this.cleanerCache = new Prefixes(this.data, empty, this.options);
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
return this.cleanerCache;
|
||||
};
|
||||
|
||||
Prefixes.prototype.select = function(list) {
|
||||
var add, all, data, name, notes, selected;
|
||||
selected = {
|
||||
add: {},
|
||||
remove: {}
|
||||
};
|
||||
for (name in list) {
|
||||
data = list[name];
|
||||
add = data.browsers.map(function(i) {
|
||||
var params;
|
||||
params = i.split(' ');
|
||||
return {
|
||||
browser: params[0] + ' ' + params[1],
|
||||
note: params[2]
|
||||
};
|
||||
});
|
||||
notes = add.filter(function(i) {
|
||||
return i.note;
|
||||
}).map((function(_this) {
|
||||
return function(i) {
|
||||
return _this.browsers.prefix(i.browser) + ' ' + i.note;
|
||||
};
|
||||
})(this));
|
||||
notes = utils.uniq(notes);
|
||||
add = add.filter((function(_this) {
|
||||
return function(i) {
|
||||
return _this.browsers.isSelected(i.browser);
|
||||
};
|
||||
})(this)).map((function(_this) {
|
||||
return function(i) {
|
||||
var prefix;
|
||||
prefix = _this.browsers.prefix(i.browser);
|
||||
if (i.note) {
|
||||
return prefix + ' ' + i.note;
|
||||
} else {
|
||||
return prefix;
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
add = this.sort(utils.uniq(add));
|
||||
all = data.browsers.map((function(_this) {
|
||||
return function(i) {
|
||||
return _this.browsers.prefix(i);
|
||||
};
|
||||
})(this));
|
||||
if (data.mistakes) {
|
||||
all = all.concat(data.mistakes);
|
||||
}
|
||||
all = all.concat(notes);
|
||||
all = utils.uniq(all);
|
||||
if (add.length) {
|
||||
selected.add[name] = add;
|
||||
if (add.length < all.length) {
|
||||
selected.remove[name] = all.filter(function(i) {
|
||||
return add.indexOf(i) === -1;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
selected.remove[name] = all;
|
||||
}
|
||||
}
|
||||
return selected;
|
||||
};
|
||||
|
||||
Prefixes.prototype.sort = function(prefixes) {
|
||||
return prefixes.sort(function(a, b) {
|
||||
var aLength, bLength;
|
||||
aLength = utils.removeNote(a).length;
|
||||
bLength = utils.removeNote(b).length;
|
||||
if (aLength === bLength) {
|
||||
return b.length - a.length;
|
||||
} else {
|
||||
return bLength - aLength;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Prefixes.prototype.preprocess = function(selected) {
|
||||
var add, j, k, l, len, len1, len2, len3, len4, len5, len6, m, n, name, o, old, olds, p, prefix, prefixed, prefixes, prop, props, ref, ref1, ref2, remove, selector, value, values;
|
||||
add = {
|
||||
selectors: [],
|
||||
'@supports': new Supports(this)
|
||||
};
|
||||
ref = selected.add;
|
||||
for (name in ref) {
|
||||
prefixes = ref[name];
|
||||
if (name === '@keyframes' || name === '@viewport') {
|
||||
add[name] = new AtRule(name, prefixes, this);
|
||||
} else if (name === '@resolution') {
|
||||
add[name] = new Resolution(name, prefixes, this);
|
||||
} else if (this.data[name].selector) {
|
||||
add.selectors.push(Selector.load(name, prefixes, this));
|
||||
} else {
|
||||
props = this.data[name].transition ? this.transitionProps : this.data[name].props;
|
||||
if (props) {
|
||||
value = Value.load(name, prefixes, this);
|
||||
for (j = 0, len = props.length; j < len; j++) {
|
||||
prop = props[j];
|
||||
if (!add[prop]) {
|
||||
add[prop] = {
|
||||
values: []
|
||||
};
|
||||
}
|
||||
add[prop].values.push(value);
|
||||
}
|
||||
}
|
||||
if (!this.data[name].props) {
|
||||
values = ((ref1 = add[name]) != null ? ref1.values : void 0) || [];
|
||||
add[name] = Declaration.load(name, prefixes, this);
|
||||
add[name].values = values;
|
||||
}
|
||||
}
|
||||
}
|
||||
remove = {
|
||||
selectors: []
|
||||
};
|
||||
ref2 = selected.remove;
|
||||
for (name in ref2) {
|
||||
prefixes = ref2[name];
|
||||
if (this.data[name].selector) {
|
||||
selector = Selector.load(name, prefixes);
|
||||
for (k = 0, len1 = prefixes.length; k < len1; k++) {
|
||||
prefix = prefixes[k];
|
||||
remove.selectors.push(selector.old(prefix));
|
||||
}
|
||||
} else if (name === '@keyframes' || name === '@viewport') {
|
||||
for (l = 0, len2 = prefixes.length; l < len2; l++) {
|
||||
prefix = prefixes[l];
|
||||
prefixed = '@' + prefix + name.slice(1);
|
||||
remove[prefixed] = {
|
||||
remove: true
|
||||
};
|
||||
}
|
||||
} else if (name === '@resolution') {
|
||||
remove[name] = new Resolution(name, prefixes, this);
|
||||
} else {
|
||||
props = this.data[name].transition ? this.transitionProps : this.data[name].props;
|
||||
if (props) {
|
||||
value = Value.load(name, [], this);
|
||||
for (m = 0, len3 = prefixes.length; m < len3; m++) {
|
||||
prefix = prefixes[m];
|
||||
old = value.old(prefix);
|
||||
if (old) {
|
||||
for (n = 0, len4 = props.length; n < len4; n++) {
|
||||
prop = props[n];
|
||||
if (!remove[prop]) {
|
||||
remove[prop] = {};
|
||||
}
|
||||
if (!remove[prop].values) {
|
||||
remove[prop].values = [];
|
||||
}
|
||||
remove[prop].values.push(old);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!this.data[name].props) {
|
||||
for (o = 0, len5 = prefixes.length; o < len5; o++) {
|
||||
prefix = prefixes[o];
|
||||
prop = vendor.unprefixed(name);
|
||||
olds = this.decl(name).old(name, prefix);
|
||||
for (p = 0, len6 = olds.length; p < len6; p++) {
|
||||
prefixed = olds[p];
|
||||
if (!remove[prefixed]) {
|
||||
remove[prefixed] = {};
|
||||
}
|
||||
remove[prefixed].remove = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return [add, remove];
|
||||
};
|
||||
|
||||
Prefixes.prototype.decl = function(prop) {
|
||||
var decl;
|
||||
decl = declsCache[prop];
|
||||
if (decl) {
|
||||
return decl;
|
||||
} else {
|
||||
return declsCache[prop] = Declaration.load(prop);
|
||||
}
|
||||
};
|
||||
|
||||
Prefixes.prototype.unprefixed = function(prop) {
|
||||
prop = vendor.unprefixed(prop);
|
||||
return this.decl(prop).normalize(prop);
|
||||
};
|
||||
|
||||
Prefixes.prototype.prefixed = function(prop, prefix) {
|
||||
prop = vendor.unprefixed(prop);
|
||||
return this.decl(prop).prefixed(prop, prefix);
|
||||
};
|
||||
|
||||
Prefixes.prototype.values = function(type, prop) {
|
||||
var data, global, ref, ref1, values;
|
||||
data = this[type];
|
||||
global = (ref = data['*']) != null ? ref.values : void 0;
|
||||
values = (ref1 = data[prop]) != null ? ref1.values : void 0;
|
||||
if (global && values) {
|
||||
return utils.uniq(global.concat(values));
|
||||
} else {
|
||||
return global || values || [];
|
||||
}
|
||||
};
|
||||
|
||||
Prefixes.prototype.group = function(decl) {
|
||||
var checker, index, length, rule, unprefixed;
|
||||
rule = decl.parent;
|
||||
index = rule.index(decl);
|
||||
length = rule.nodes.length;
|
||||
unprefixed = this.unprefixed(decl.prop);
|
||||
checker = (function(_this) {
|
||||
return function(step, callback) {
|
||||
var other;
|
||||
index += step;
|
||||
while (index >= 0 && index < length) {
|
||||
other = rule.nodes[index];
|
||||
if (other.type === 'decl') {
|
||||
if (step === -1 && other.prop === unprefixed) {
|
||||
if (!Browsers.withPrefix(other.value)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (_this.unprefixed(other.prop) !== unprefixed) {
|
||||
break;
|
||||
} else if (callback(other) === true) {
|
||||
return true;
|
||||
}
|
||||
if (step === +1 && other.prop === unprefixed) {
|
||||
if (!Browsers.withPrefix(other.value)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
index += step;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
})(this);
|
||||
return {
|
||||
up: function(callback) {
|
||||
return checker(-1, callback);
|
||||
},
|
||||
down: function(callback) {
|
||||
return checker(+1, callback);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
return Prefixes;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Prefixes;
|
||||
|
||||
}).call(this);
|
||||
213
node_modules/autoprefixer-core/lib/processor.js
generated
vendored
Normal file
213
node_modules/autoprefixer-core/lib/processor.js
generated
vendored
Normal file
@@ -0,0 +1,213 @@
|
||||
(function() {
|
||||
var Processor, Value, utils, vendor;
|
||||
|
||||
vendor = require('postcss/lib/vendor');
|
||||
|
||||
Value = require('./value');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
Processor = (function() {
|
||||
function Processor(prefixes) {
|
||||
this.prefixes = prefixes;
|
||||
}
|
||||
|
||||
Processor.prototype.add = function(css) {
|
||||
var keyframes, resolution, supports, viewport;
|
||||
resolution = this.prefixes.add['@resolution'];
|
||||
keyframes = this.prefixes.add['@keyframes'];
|
||||
viewport = this.prefixes.add['@viewport'];
|
||||
supports = this.prefixes.add['@supports'];
|
||||
css.eachAtRule((function(_this) {
|
||||
return function(rule) {
|
||||
if (rule.name === 'keyframes') {
|
||||
if (!_this.disabled(rule)) {
|
||||
return keyframes != null ? keyframes.process(rule) : void 0;
|
||||
}
|
||||
} else if (rule.name === 'viewport') {
|
||||
if (!_this.disabled(rule)) {
|
||||
return viewport != null ? viewport.process(rule) : void 0;
|
||||
}
|
||||
} else if (rule.name === 'supports') {
|
||||
if (!_this.disabled(rule)) {
|
||||
return supports.process(rule);
|
||||
}
|
||||
} else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) {
|
||||
if (!_this.disabled(rule)) {
|
||||
return resolution != null ? resolution.process(rule) : void 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
css.eachRule((function(_this) {
|
||||
return function(rule) {
|
||||
var j, len, ref, results, selector;
|
||||
if (_this.disabled(rule)) {
|
||||
return;
|
||||
}
|
||||
ref = _this.prefixes.add.selectors;
|
||||
results = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
selector = ref[j];
|
||||
results.push(selector.process(rule));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
})(this));
|
||||
css.eachDecl((function(_this) {
|
||||
return function(decl) {
|
||||
var prefix;
|
||||
prefix = _this.prefixes.add[decl.prop];
|
||||
if (prefix && prefix.prefixes) {
|
||||
if (!_this.disabled(decl)) {
|
||||
return prefix.process(decl);
|
||||
}
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
return css.eachDecl((function(_this) {
|
||||
return function(decl) {
|
||||
var j, len, ref, unprefixed, value;
|
||||
if (_this.disabled(decl)) {
|
||||
return;
|
||||
}
|
||||
unprefixed = _this.prefixes.unprefixed(decl.prop);
|
||||
ref = _this.prefixes.values('add', unprefixed);
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
value = ref[j];
|
||||
value.process(decl);
|
||||
}
|
||||
return Value.save(_this.prefixes, decl);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Processor.prototype.remove = function(css) {
|
||||
var checker, j, len, ref, resolution;
|
||||
resolution = this.prefixes.remove['@resolution'];
|
||||
css.eachAtRule((function(_this) {
|
||||
return function(rule, i) {
|
||||
if (_this.prefixes.remove['@' + rule.name]) {
|
||||
if (!_this.disabled(rule)) {
|
||||
return rule.parent.remove(i);
|
||||
}
|
||||
} else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) {
|
||||
return resolution != null ? resolution.clean(rule) : void 0;
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
ref = this.prefixes.remove.selectors;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
checker = ref[j];
|
||||
css.eachRule((function(_this) {
|
||||
return function(rule, i) {
|
||||
if (checker.check(rule)) {
|
||||
if (!_this.disabled(rule)) {
|
||||
return rule.parent.remove(i);
|
||||
}
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
}
|
||||
return css.eachDecl((function(_this) {
|
||||
return function(decl, i) {
|
||||
var k, len1, notHack, ref1, ref2, rule, unprefixed;
|
||||
if (_this.disabled(decl)) {
|
||||
return;
|
||||
}
|
||||
rule = decl.parent;
|
||||
unprefixed = _this.prefixes.unprefixed(decl.prop);
|
||||
if ((ref1 = _this.prefixes.remove[decl.prop]) != null ? ref1.remove : void 0) {
|
||||
notHack = _this.prefixes.group(decl).down(function(other) {
|
||||
return other.prop === unprefixed;
|
||||
});
|
||||
if (notHack && !_this.withHackValue(decl)) {
|
||||
if (decl.style('before').indexOf("\n") > -1) {
|
||||
_this.reduceSpaces(decl);
|
||||
}
|
||||
rule.remove(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
ref2 = _this.prefixes.values('remove', unprefixed);
|
||||
for (k = 0, len1 = ref2.length; k < len1; k++) {
|
||||
checker = ref2[k];
|
||||
if (checker.check(decl.value)) {
|
||||
unprefixed = checker.unprefixed;
|
||||
notHack = _this.prefixes.group(decl).down(function(other) {
|
||||
return other.value.indexOf(unprefixed) !== -1;
|
||||
});
|
||||
if (notHack) {
|
||||
rule.remove(i);
|
||||
return;
|
||||
} else if (checker.clean) {
|
||||
checker.clean(decl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Processor.prototype.withHackValue = function(decl) {
|
||||
return decl.prop === '-webkit-background-clip' && decl.value === 'text';
|
||||
};
|
||||
|
||||
Processor.prototype.disabled = function(node) {
|
||||
var status;
|
||||
if (node._autoprefixerDisabled != null) {
|
||||
return node._autoprefixerDisabled;
|
||||
} else if (node.nodes) {
|
||||
status = void 0;
|
||||
node.each(function(i) {
|
||||
if (i.type !== 'comment') {
|
||||
return;
|
||||
}
|
||||
if (i.text === 'autoprefixer: off') {
|
||||
status = false;
|
||||
return false;
|
||||
} else if (i.text === 'autoprefixer: on') {
|
||||
status = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return node._autoprefixerDisabled = status != null ? !status : node.parent ? this.disabled(node.parent) : false;
|
||||
} else {
|
||||
return node._autoprefixerDisabled = this.disabled(node.parent);
|
||||
}
|
||||
};
|
||||
|
||||
Processor.prototype.reduceSpaces = function(decl) {
|
||||
var diff, parts, prevMin, stop;
|
||||
stop = false;
|
||||
this.prefixes.group(decl).up(function(other) {
|
||||
return stop = true;
|
||||
});
|
||||
if (stop) {
|
||||
return;
|
||||
}
|
||||
parts = decl.style('before').split("\n");
|
||||
prevMin = parts[parts.length - 1].length;
|
||||
diff = false;
|
||||
return this.prefixes.group(decl).down(function(other) {
|
||||
var last;
|
||||
parts = other.style('before').split("\n");
|
||||
last = parts.length - 1;
|
||||
if (parts[last].length > prevMin) {
|
||||
if (diff === false) {
|
||||
diff = parts[last].length - prevMin;
|
||||
}
|
||||
parts[last] = parts[last].slice(0, -diff);
|
||||
return other.before = parts.join("\n");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return Processor;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Processor;
|
||||
|
||||
}).call(this);
|
||||
98
node_modules/autoprefixer-core/lib/resolution.js
generated
vendored
Normal file
98
node_modules/autoprefixer-core/lib/resolution.js
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
(function() {
|
||||
var Prefixer, Resolution, n2f, regexp, split, utils,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
Prefixer = require('./prefixer');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
n2f = require('num2fraction');
|
||||
|
||||
regexp = /(min|max)-resolution\s*:\s*\d*\.?\d+(dppx|dpi)/gi;
|
||||
|
||||
split = /(min|max)-resolution(\s*:\s*)(\d*\.?\d+)(dppx|dpi)/i;
|
||||
|
||||
Resolution = (function(superClass) {
|
||||
extend(Resolution, superClass);
|
||||
|
||||
function Resolution() {
|
||||
return Resolution.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Resolution.prototype.prefixName = function(prefix, name) {
|
||||
return name = prefix === '-moz-' ? name + '--moz-device-pixel-ratio' : prefix + name + '-device-pixel-ratio';
|
||||
};
|
||||
|
||||
Resolution.prototype.prefixQuery = function(prefix, name, colon, value, units) {
|
||||
if (units === 'dpi') {
|
||||
value = Number(value / 96);
|
||||
}
|
||||
if (prefix === '-o-') {
|
||||
value = n2f(value);
|
||||
}
|
||||
return this.prefixName(prefix, name) + colon + value;
|
||||
};
|
||||
|
||||
Resolution.prototype.clean = function(rule) {
|
||||
var j, len, prefix, ref;
|
||||
if (!this.bad) {
|
||||
this.bad = [];
|
||||
ref = this.prefixes;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
prefix = ref[j];
|
||||
this.bad.push(this.prefixName(prefix, 'min'));
|
||||
this.bad.push(this.prefixName(prefix, 'max'));
|
||||
}
|
||||
}
|
||||
return rule.params = utils.editList(rule.params, (function(_this) {
|
||||
return function(queries) {
|
||||
return queries.filter(function(query) {
|
||||
return _this.bad.every(function(i) {
|
||||
return query.indexOf(i) === -1;
|
||||
});
|
||||
});
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
Resolution.prototype.process = function(rule) {
|
||||
var parent, prefixes;
|
||||
parent = this.parentPrefix(rule);
|
||||
prefixes = parent ? [parent] : this.prefixes;
|
||||
return rule.params = utils.editList(rule.params, (function(_this) {
|
||||
return function(origin, prefixed) {
|
||||
var j, k, len, len1, prefix, processed, query;
|
||||
for (j = 0, len = origin.length; j < len; j++) {
|
||||
query = origin[j];
|
||||
if (query.indexOf('min-resolution') === -1 && query.indexOf('max-resolution') === -1) {
|
||||
prefixed.push(query);
|
||||
continue;
|
||||
}
|
||||
for (k = 0, len1 = prefixes.length; k < len1; k++) {
|
||||
prefix = prefixes[k];
|
||||
if (prefix === '-moz-' && rule.params.indexOf('dpi') !== -1) {
|
||||
continue;
|
||||
} else {
|
||||
processed = query.replace(regexp, function(str) {
|
||||
var parts;
|
||||
parts = str.match(split);
|
||||
return _this.prefixQuery(prefix, parts[1], parts[2], parts[3], parts[4]);
|
||||
});
|
||||
prefixed.push(processed);
|
||||
}
|
||||
}
|
||||
prefixed.push(query);
|
||||
}
|
||||
return utils.uniq(prefixed);
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
return Resolution;
|
||||
|
||||
})(Prefixer);
|
||||
|
||||
module.exports = Resolution;
|
||||
|
||||
}).call(this);
|
||||
117
node_modules/autoprefixer-core/lib/selector.js
generated
vendored
Normal file
117
node_modules/autoprefixer-core/lib/selector.js
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
(function() {
|
||||
var Browsers, OldSelector, Prefixer, Selector, utils,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
OldSelector = require('./old-selector');
|
||||
|
||||
Prefixer = require('./prefixer');
|
||||
|
||||
Browsers = require('./browsers');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
Selector = (function(superClass) {
|
||||
extend(Selector, superClass);
|
||||
|
||||
function Selector(name1, prefixes, all) {
|
||||
this.name = name1;
|
||||
this.prefixes = prefixes;
|
||||
this.all = all;
|
||||
this.regexpCache = {};
|
||||
}
|
||||
|
||||
Selector.prototype.check = function(rule) {
|
||||
if (rule.selector.indexOf(this.name) !== -1) {
|
||||
return !!rule.selector.match(this.regexp());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Selector.prototype.prefixed = function(prefix) {
|
||||
return this.name.replace(/^([^\w]*)/, '$1' + prefix);
|
||||
};
|
||||
|
||||
Selector.prototype.regexp = function(prefix) {
|
||||
var name;
|
||||
if (this.regexpCache[prefix]) {
|
||||
return this.regexpCache[prefix];
|
||||
}
|
||||
name = prefix ? this.prefixed(prefix) : this.name;
|
||||
return this.regexpCache[prefix] = RegExp("(^|[^:\"'=])" + (utils.escapeRegexp(name)), "gi");
|
||||
};
|
||||
|
||||
Selector.prototype.possible = function() {
|
||||
return Browsers.prefixes();
|
||||
};
|
||||
|
||||
Selector.prototype.prefixeds = function(rule) {
|
||||
var i, len, prefix, prefixeds, ref;
|
||||
if (rule._autoprefixerPrefixeds) {
|
||||
return rule._autoprefixerPrefixeds;
|
||||
}
|
||||
prefixeds = {};
|
||||
ref = this.possible();
|
||||
for (i = 0, len = ref.length; i < len; i++) {
|
||||
prefix = ref[i];
|
||||
prefixeds[prefix] = this.replace(rule.selector, prefix);
|
||||
}
|
||||
return rule._autoprefixerPrefixeds = prefixeds;
|
||||
};
|
||||
|
||||
Selector.prototype.already = function(rule, prefixeds, prefix) {
|
||||
var before, index, key, prefixed, some;
|
||||
index = rule.parent.index(rule) - 1;
|
||||
while (index >= 0) {
|
||||
before = rule.parent.nodes[index];
|
||||
if (before.type !== 'rule') {
|
||||
return false;
|
||||
}
|
||||
some = false;
|
||||
for (key in prefixeds) {
|
||||
prefixed = prefixeds[key];
|
||||
if (before.selector === prefixed) {
|
||||
if (prefix === key) {
|
||||
return true;
|
||||
} else {
|
||||
some = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!some) {
|
||||
return false;
|
||||
}
|
||||
index -= 1;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
Selector.prototype.replace = function(selector, prefix) {
|
||||
return selector.replace(this.regexp(), '$1' + this.prefixed(prefix));
|
||||
};
|
||||
|
||||
Selector.prototype.add = function(rule, prefix) {
|
||||
var cloned, prefixeds;
|
||||
prefixeds = this.prefixeds(rule);
|
||||
if (this.already(rule, prefixeds, prefix)) {
|
||||
return;
|
||||
}
|
||||
cloned = this.clone(rule, {
|
||||
selector: prefixeds[prefix]
|
||||
});
|
||||
return rule.parent.insertBefore(rule, cloned);
|
||||
};
|
||||
|
||||
Selector.prototype.old = function(prefix) {
|
||||
return new OldSelector(this, prefix);
|
||||
};
|
||||
|
||||
return Selector;
|
||||
|
||||
})(Prefixer);
|
||||
|
||||
module.exports = Selector;
|
||||
|
||||
}).call(this);
|
||||
115
node_modules/autoprefixer-core/lib/supports.js
generated
vendored
Normal file
115
node_modules/autoprefixer-core/lib/supports.js
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
(function() {
|
||||
var Prefixes, Supports, Value, findCondition, findDecl, list, postcss, split, utils;
|
||||
|
||||
Prefixes = require('./prefixes');
|
||||
|
||||
Value = require('./value');
|
||||
|
||||
utils = require('./utils');
|
||||
|
||||
postcss = require('postcss');
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
split = /\(\s*([^\(\):]+)\s*:([^\)]+)/;
|
||||
|
||||
findDecl = /\(\s*([^\(\):]+)\s*:\s*(.+)\s*\)/g;
|
||||
|
||||
findCondition = /(not\s*)?\(\s*([^\(\):]+)\s*:\s*(.+?(?!\s*or\s*).+?)\s*\)*\s*\)\s*or\s*/gi;
|
||||
|
||||
Supports = (function() {
|
||||
function Supports(all1) {
|
||||
this.all = all1;
|
||||
}
|
||||
|
||||
Supports.prototype.virtual = function(prop, value) {
|
||||
var rule;
|
||||
rule = postcss.parse('a{}').first;
|
||||
rule.append({
|
||||
prop: prop,
|
||||
value: value,
|
||||
before: ''
|
||||
});
|
||||
return rule;
|
||||
};
|
||||
|
||||
Supports.prototype.prefixed = function(prop, value) {
|
||||
var decl, j, k, len, len1, prefixer, ref, ref1, rule;
|
||||
rule = this.virtual(prop, value);
|
||||
prefixer = this.all.add[prop];
|
||||
if (prefixer != null) {
|
||||
if (typeof prefixer.process === "function") {
|
||||
prefixer.process(rule.first);
|
||||
}
|
||||
}
|
||||
ref = rule.nodes;
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
decl = ref[j];
|
||||
ref1 = this.all.values('add', prop);
|
||||
for (k = 0, len1 = ref1.length; k < len1; k++) {
|
||||
value = ref1[k];
|
||||
value.process(decl);
|
||||
}
|
||||
Value.save(this.all, decl);
|
||||
}
|
||||
return rule.nodes;
|
||||
};
|
||||
|
||||
Supports.prototype.clean = function(params) {
|
||||
return params.replace(findCondition, (function(_this) {
|
||||
return function(all) {
|
||||
var _, check, checker, j, len, prop, ref, ref1, ref2, unprefixed, value;
|
||||
if (all.slice(0, 3).toLowerCase() === 'not') {
|
||||
return all;
|
||||
}
|
||||
ref = all.match(split), _ = ref[0], prop = ref[1], value = ref[2];
|
||||
unprefixed = _this.all.unprefixed(prop);
|
||||
if ((ref1 = _this.all.cleaner().remove[prop]) != null ? ref1.remove : void 0) {
|
||||
check = new RegExp('(\\(|\\s)' + utils.escapeRegexp(unprefixed) + ':');
|
||||
if (check.test(params)) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
ref2 = _this.all.cleaner().values('remove', unprefixed);
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
checker = ref2[j];
|
||||
if (checker.check(value)) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
return all;
|
||||
};
|
||||
})(this)).replace(/\(\s*\((.*)\)\s*\)/g, '($1)');
|
||||
};
|
||||
|
||||
Supports.prototype.process = function(rule) {
|
||||
rule.params = this.clean(rule.params);
|
||||
return rule.params = rule.params.replace(findDecl, (function(_this) {
|
||||
return function(all, prop, value) {
|
||||
var i, stringed;
|
||||
stringed = (function() {
|
||||
var j, len, ref, results;
|
||||
ref = this.prefixed(prop, value);
|
||||
results = [];
|
||||
for (j = 0, len = ref.length; j < len; j++) {
|
||||
i = ref[j];
|
||||
results.push("(" + i.prop + ": " + i.value + ")");
|
||||
}
|
||||
return results;
|
||||
}).call(_this);
|
||||
if (stringed.length === 1) {
|
||||
return stringed[0];
|
||||
} else {
|
||||
return '(' + stringed.join(' or ') + ')';
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
return Supports;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Supports;
|
||||
|
||||
}).call(this);
|
||||
57
node_modules/autoprefixer-core/lib/utils.js
generated
vendored
Normal file
57
node_modules/autoprefixer-core/lib/utils.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
(function() {
|
||||
var list;
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
module.exports = {
|
||||
error: function(text) {
|
||||
var err;
|
||||
err = new Error(text);
|
||||
err.autoprefixer = true;
|
||||
throw err;
|
||||
},
|
||||
uniq: function(array) {
|
||||
var filtered, i, j, len;
|
||||
filtered = [];
|
||||
for (j = 0, len = array.length; j < len; j++) {
|
||||
i = array[j];
|
||||
if (filtered.indexOf(i) === -1) {
|
||||
filtered.push(i);
|
||||
}
|
||||
}
|
||||
return filtered;
|
||||
},
|
||||
removeNote: function(string) {
|
||||
if (string.indexOf(' ') === -1) {
|
||||
return string;
|
||||
} else {
|
||||
return string.split(' ')[0];
|
||||
}
|
||||
},
|
||||
escapeRegexp: function(string) {
|
||||
return string.replace(/[.?*+\^\$\[\]\\(){}|\-]/g, '\\$&');
|
||||
},
|
||||
regexp: function(word, escape) {
|
||||
if (escape == null) {
|
||||
escape = true;
|
||||
}
|
||||
if (escape) {
|
||||
word = this.escapeRegexp(word);
|
||||
}
|
||||
return RegExp("(^|[\\s,(])(" + word + "($|[\\s(,]))", "gi");
|
||||
},
|
||||
editList: function(value, callback) {
|
||||
var changed, join, origin;
|
||||
origin = list.comma(value);
|
||||
changed = callback(origin, []);
|
||||
if (origin === changed) {
|
||||
return value;
|
||||
} else {
|
||||
join = value.match(/,\s*/);
|
||||
join = join ? join[0] : ', ';
|
||||
return changed.join(join);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user