flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
22
BACK_BACK/node_modules/postcss-normalize-display-values/LICENSE-MIT
generated
vendored
Executable file
22
BACK_BACK/node_modules/postcss-normalize-display-values/LICENSE-MIT
generated
vendored
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
44
BACK_BACK/node_modules/postcss-normalize-display-values/README.md
generated
vendored
Executable file
44
BACK_BACK/node_modules/postcss-normalize-display-values/README.md
generated
vendored
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
# [postcss][postcss]-normalize-display-values
|
||||
|
||||
> Normalize display property values with PostCSS.
|
||||
|
||||
## Install
|
||||
|
||||
With [npm](https://npmjs.org/package/postcss-normalize-display-values) do:
|
||||
|
||||
```
|
||||
npm install postcss-normalize-display-values --save
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
### Input
|
||||
|
||||
```css
|
||||
div {
|
||||
display: inline flow-root
|
||||
}
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
```css
|
||||
div {
|
||||
display: inline-block
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
|
||||
examples for your environment.
|
||||
|
||||
## Contributors
|
||||
|
||||
See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Ben Briggs](http://beneb.info)
|
||||
|
||||
[postcss]: https://github.com/postcss/postcss
|
||||
67
BACK_BACK/node_modules/postcss-normalize-display-values/dist/index.js
generated
vendored
Executable file
67
BACK_BACK/node_modules/postcss-normalize-display-values/dist/index.js
generated
vendored
Executable file
|
|
@ -0,0 +1,67 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _postcss = require("postcss");
|
||||
|
||||
var _postcss2 = _interopRequireDefault(_postcss);
|
||||
|
||||
var _postcssValueParser = require("postcss-value-parser");
|
||||
|
||||
var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
|
||||
|
||||
var _cssnanoUtilGetMatch = require("cssnano-util-get-match");
|
||||
|
||||
var _cssnanoUtilGetMatch2 = _interopRequireDefault(_cssnanoUtilGetMatch);
|
||||
|
||||
var _map = require("./lib/map");
|
||||
|
||||
var _map2 = _interopRequireDefault(_map);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const getMatch = (0, _cssnanoUtilGetMatch2.default)(_map2.default);
|
||||
|
||||
function evenValues(list, index) {
|
||||
return index % 2 === 0;
|
||||
}
|
||||
|
||||
exports.default = _postcss2.default.plugin("postcss-normalize-display-values", () => {
|
||||
return css => {
|
||||
const cache = {};
|
||||
|
||||
css.walkDecls(/display/i, decl => {
|
||||
const value = decl.value;
|
||||
|
||||
if (cache[value]) {
|
||||
decl.value = cache[value];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const { nodes } = (0, _postcssValueParser2.default)(value);
|
||||
|
||||
if (nodes.length === 1) {
|
||||
cache[value] = value;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const match = getMatch(nodes.filter(evenValues).map(n => n.value.toLowerCase()));
|
||||
|
||||
if (!match) {
|
||||
cache[value] = value;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const result = match;
|
||||
|
||||
decl.value = result;
|
||||
cache[value] = result;
|
||||
});
|
||||
};
|
||||
});
|
||||
module.exports = exports["default"];
|
||||
32
BACK_BACK/node_modules/postcss-normalize-display-values/dist/lib/map.js
generated
vendored
Executable file
32
BACK_BACK/node_modules/postcss-normalize-display-values/dist/lib/map.js
generated
vendored
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
const block = 'block';
|
||||
const flex = 'flex';
|
||||
const flow = 'flow';
|
||||
const flowRoot = 'flow-root';
|
||||
const grid = 'grid';
|
||||
const inline = 'inline';
|
||||
const inlineBlock = 'inline-block';
|
||||
const inlineFlex = 'inline-flex';
|
||||
const inlineGrid = 'inline-grid';
|
||||
const inlineTable = 'inline-table';
|
||||
const listItem = 'list-item';
|
||||
const ruby = 'ruby';
|
||||
const rubyBase = 'ruby-base';
|
||||
const rubyText = 'ruby-text';
|
||||
const runIn = 'run-in';
|
||||
const table = 'table';
|
||||
const tableCell = 'table-cell';
|
||||
const tableCaption = 'table-caption';
|
||||
|
||||
/**
|
||||
* Specification: https://drafts.csswg.org/css-display/#the-display-properties
|
||||
*/
|
||||
|
||||
exports.default = [[block, [block, flow]], [flowRoot, [block, flowRoot]], [inline, [inline, flow]], [inlineBlock, [inline, flowRoot]], [runIn, [runIn, flow]], [listItem, [listItem, block, flow]], [inline + ' ' + listItem, [inline, flow, listItem]], [flex, [block, flex]], [inlineFlex, [inline, flex]], [grid, [block, grid]], [inlineGrid, [inline, grid]], [ruby, [inline, ruby]],
|
||||
// `block ruby` is same
|
||||
[table, [block, table]], [inlineTable, [inline, table]], [tableCell, [tableCell, flow]], [tableCaption, [tableCaption, flow]], [rubyBase, [rubyBase, flow]], [rubyText, [rubyText, flow]]];
|
||||
module.exports = exports['default'];
|
||||
36
BACK_BACK/node_modules/postcss-normalize-display-values/package.json
generated
vendored
Executable file
36
BACK_BACK/node_modules/postcss-normalize-display-values/package.json
generated
vendored
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"name": "postcss-normalize-display-values",
|
||||
"version": "4.0.2",
|
||||
"description": "Normalize multiple value display syntaxes into single values.",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"prepublish": "cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE-MIT",
|
||||
"dist"
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cssnano-util-get-match": "^4.0.0",
|
||||
"postcss": "^7.0.0",
|
||||
"postcss-value-parser": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.0.0",
|
||||
"cross-env": "^5.0.0"
|
||||
},
|
||||
"author": {
|
||||
"name": "Ben Briggs",
|
||||
"email": "beneb.info@gmail.com",
|
||||
"url": "http://beneb.info"
|
||||
},
|
||||
"repository": "cssnano/cssnano",
|
||||
"bugs": {
|
||||
"url": "https://github.com/cssnano/cssnano/issues"
|
||||
},
|
||||
"homepage": "https://github.com/cssnano/cssnano",
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue