style Dashboard

This commit is contained in:
Lieu Le
2019-09-13 11:27:52 +07:00
parent 558fb07261
commit 07322c9084
17151 changed files with 1686347 additions and 103 deletions

8
node_modules/postcss-discard-overridden/.babelrc generated vendored Executable file
View File

@@ -0,0 +1,8 @@
{
"presets": [
"es2015"
],
"plugins": [
"add-module-exports"
]
}

12
node_modules/postcss-discard-overridden/.editorconfig generated vendored Executable file
View File

@@ -0,0 +1,12 @@
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.{json,yml}]
indent_size = 2

7
node_modules/postcss-discard-overridden/.npmignore generated vendored Executable file
View File

@@ -0,0 +1,7 @@
.gitignore
node_modules/
npm-debug.log
test.js
.travis.yml

0
node_modules/postcss-discard-overridden/CHANGELOG.md generated vendored Executable file
View File

20
node_modules/postcss-discard-overridden/LICENSE generated vendored Executable file
View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright 2016 Justineo <justice360@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

159
node_modules/postcss-discard-overridden/README.md generated vendored Executable file
View File

@@ -0,0 +1,159 @@
# PostCSS Discard Overridden [![Build Status][ci-img]][ci]
[PostCSS] plugin to discard overridden `@keyframes` or `@counter-style`.
`@keyframes` or `@counter-style` will be overridden by those who share the same identifiers and appear later in stylesheets. So we can discard all of them except the last one. When defined inside a `@media` or `@supports` rule, `@keyframes` and `@counter-style` rules only override global rules in some of the client browsers so they need handled separately. This plugin has taken care of this and transforms the PostCss AST **safely**.
[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/Justineo/postcss-discard-overridden.svg
[ci]: https://travis-ci.org/Justineo/postcss-discard-overridden
```css
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@media (max-width: 500px) {
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@supports (display: flex) {
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
}
}
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
```
```css
@media (max-width: 500px) {
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@supports (display: flex) {
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
}
}
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
```
## Usage
```js
postcss([ require('postcss-discard-overridden') ])
```
See [PostCSS] docs for examples for your environment.

57
node_modules/postcss-discard-overridden/dist/index.js generated vendored Executable file
View File

@@ -0,0 +1,57 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _postcss = require('postcss');
var _postcss2 = _interopRequireDefault(_postcss);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var OVERRIDABLE_RULES = ['keyframes', 'counter-style'];
var SCOPE_RULES = ['media', 'supports'];
function isOverridable(name) {
return OVERRIDABLE_RULES.indexOf(_postcss2.default.vendor.unprefixed(name)) !== -1;
}
function isScope(name) {
return SCOPE_RULES.indexOf(_postcss2.default.vendor.unprefixed(name)) !== -1;
}
function getScope(node) {
var current = node.parent;
var chain = [node.name, node.params];
do {
if (current.type === 'atrule' && isScope(current.name)) {
chain.unshift(current.name + ' ' + current.params);
}
current = current.parent;
} while (current);
return chain.join('|');
}
exports.default = _postcss2.default.plugin('postcss-discard-overridden', function () {
return function (css) {
var cache = {};
var rules = [];
css.walkAtRules(function (rule) {
if (rule.type === 'atrule' && isOverridable(rule.name)) {
var scope = getScope(rule);
cache[scope] = rule;
rules.push({
node: rule,
scope: scope
});
}
});
rules.forEach(function (rule) {
if (cache[rule.scope] !== rule.node) {
rule.node.remove();
}
});
};
});
module.exports = exports['default'];

46
node_modules/postcss-discard-overridden/index.js generated vendored Executable file
View File

@@ -0,0 +1,46 @@
import postcss from 'postcss';
const OVERRIDABLE_RULES = ['keyframes', 'counter-style'];
const SCOPE_RULES = ['media', 'supports'];
function isOverridable(name) {
return OVERRIDABLE_RULES.indexOf(postcss.vendor.unprefixed(name)) !== -1;
}
function isScope(name) {
return SCOPE_RULES.indexOf(postcss.vendor.unprefixed(name)) !== -1;
}
function getScope(node) {
let current = node.parent;
let chain = [node.name, node.params];
do {
if (current.type === 'atrule' && isScope(current.name)) {
chain.unshift(current.name + ' ' + current.params);
}
current = current.parent;
} while (current);
return chain.join('|');
}
export default postcss.plugin('postcss-discard-overridden', () => {
return css => {
let cache = {};
let rules = [];
css.walkAtRules(rule => {
if (rule.type === 'atrule' && isOverridable(rule.name)) {
let scope = getScope(rule);
cache[scope] = rule;
rules.push({
node: rule,
scope
});
}
});
rules.forEach(rule => {
if (cache[rule.scope] !== rule.node) {
rule.node.remove();
}
});
};
});

82
node_modules/postcss-discard-overridden/package.json generated vendored Executable file
View File

@@ -0,0 +1,82 @@
{
"_args": [
[
"postcss-discard-overridden@0.1.1",
"/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome"
]
],
"_from": "postcss-discard-overridden@0.1.1",
"_id": "postcss-discard-overridden@0.1.1",
"_inBundle": false,
"_integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=",
"_location": "/postcss-discard-overridden",
"_phantomChildren": {
"chalk": "1.1.3",
"js-base64": "2.5.1",
"source-map": "0.5.7"
},
"_requested": {
"type": "version",
"registry": true,
"raw": "postcss-discard-overridden@0.1.1",
"name": "postcss-discard-overridden",
"escapedName": "postcss-discard-overridden",
"rawSpec": "0.1.1",
"saveSpec": null,
"fetchSpec": "0.1.1"
},
"_requiredBy": [
"/cssnano"
],
"_resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz",
"_spec": "0.1.1",
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome",
"author": {
"name": "Justineo",
"email": "justice360@gmail.com"
},
"ava": {
"require": [
"babel-register"
]
},
"bugs": {
"url": "https://github.com/Justineo/postcss-discard-overridden/issues"
},
"dependencies": {
"postcss": "^5.0.16"
},
"description": "PostCSS plugin to discard overridden @keyframes or @counter-style.",
"devDependencies": {
"ava": "^0.14.0",
"babel-cli": "^6.7.7",
"babel-plugin-add-module-exports": "^0.1.4",
"babel-preset-es2015": "^6.6.0",
"babel-register": "^6.7.2",
"eslint": "^2.1.0",
"eslint-config-postcss": "^2.0.0"
},
"eslintConfig": {
"extends": "eslint-config-postcss/es5"
},
"homepage": "https://github.com/Justineo/postcss-discard-overridden",
"keywords": [
"postcss",
"css",
"postcss-plugin",
"at-rules",
"@keyframes",
"@counter-style"
],
"license": "MIT",
"main": "dist/index.js",
"name": "postcss-discard-overridden",
"repository": {
"type": "git",
"url": "git+https://github.com/Justineo/postcss-discard-overridden.git"
},
"scripts": {
"test": "ava && eslint *.js"
},
"version": "0.1.1"
}

84
node_modules/postcss-discard-overridden/test/input.css generated vendored Executable file
View File

@@ -0,0 +1,84 @@
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@media (max-width: 500px) {
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@supports (display: flex) {
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
}
}
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}

52
node_modules/postcss-discard-overridden/test/output.css generated vendored Executable file
View File

@@ -0,0 +1,52 @@
@media (max-width: 500px) {
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 0.8;
}
}
@supports (display: flex) {
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
}
}
@-webkit-keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}