It appears you have a well-structured Git repository with various files, including SVG icons and HTML documents. Here's a brief overview:
This commit is contained in:
20
backend/node_modules/postcss-discard-overridden/LICENSE
generated
vendored
Normal file
20
backend/node_modules/postcss-discard-overridden/LICENSE
generated
vendored
Normal 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.
|
158
backend/node_modules/postcss-discard-overridden/README.md
generated
vendored
Normal file
158
backend/node_modules/postcss-discard-overridden/README.md
generated
vendored
Normal file
@ -0,0 +1,158 @@
|
||||
# PostCSS Discard Overridden
|
||||
|
||||
[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
|
||||
|
||||
```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
|
||||
|
||||
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).
|
37
backend/node_modules/postcss-discard-overridden/package.json
generated
vendored
Normal file
37
backend/node_modules/postcss-discard-overridden/package.json
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "postcss-discard-overridden",
|
||||
"version": "7.0.1",
|
||||
"description": "PostCSS plugin to discard overridden @keyframes or @counter-style.",
|
||||
"main": "src/index.js",
|
||||
"types": "types/index.d.ts",
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"src"
|
||||
],
|
||||
"keywords": [
|
||||
"postcss",
|
||||
"css",
|
||||
"postcss-plugin",
|
||||
"at-rules",
|
||||
"@keyframes",
|
||||
"@counter-style"
|
||||
],
|
||||
"author": "Justineo <justice360@gmail.com>",
|
||||
"license": "MIT",
|
||||
"repository": "cssnano/cssnano",
|
||||
"bugs": {
|
||||
"url": "https://github.com/cssnano/cssnano/issues"
|
||||
},
|
||||
"homepage": "https://github.com/cssnano/cssnano",
|
||||
"engines": {
|
||||
"node": "^18.12.0 || ^20.9.0 || >=22.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"diff": "^7.0.0",
|
||||
"picocolors": "^1.1.1",
|
||||
"postcss": "^8.5.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": "^8.4.32"
|
||||
}
|
||||
}
|
94
backend/node_modules/postcss-discard-overridden/src/index.js
generated
vendored
Normal file
94
backend/node_modules/postcss-discard-overridden/src/index.js
generated
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
'use strict';
|
||||
const OVERRIDABLE_RULES = new Set(['keyframes', 'counter-style']);
|
||||
const SCOPE_RULES = new Set(['media', 'supports']);
|
||||
|
||||
/**
|
||||
* @param {string} prop
|
||||
* @return {string}
|
||||
*/
|
||||
function vendorUnprefixed(prop) {
|
||||
return prop.replace(/^-\w+-/, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {boolean}
|
||||
*/
|
||||
function isOverridable(name) {
|
||||
return OVERRIDABLE_RULES.has(vendorUnprefixed(name.toLowerCase()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {boolean}
|
||||
*/
|
||||
function isScope(name) {
|
||||
return SCOPE_RULES.has(vendorUnprefixed(name.toLowerCase()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('postcss').AtRule} node
|
||||
* @return {string}
|
||||
*/
|
||||
function getScope(node) {
|
||||
/** @type {import('postcss').Container<import('postcss').ChildNode> | import('postcss').Document | undefined} */
|
||||
let current = node.parent;
|
||||
|
||||
const chain = [node.name.toLowerCase(), node.params];
|
||||
|
||||
while (current) {
|
||||
if (
|
||||
current.type === 'atrule' &&
|
||||
isScope(/** @type import('postcss').AtRule */ (current).name)
|
||||
) {
|
||||
chain.unshift(
|
||||
/** @type import('postcss').AtRule */ (current).name +
|
||||
' ' +
|
||||
/** @type import('postcss').AtRule */ (current).params
|
||||
);
|
||||
}
|
||||
current = current.parent;
|
||||
}
|
||||
|
||||
return chain.join('|');
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {import('postcss').PluginCreator<void>}
|
||||
* @return {import('postcss').Plugin}
|
||||
*/
|
||||
function pluginCreator() {
|
||||
return {
|
||||
postcssPlugin: 'postcss-discard-overridden',
|
||||
prepare() {
|
||||
const cache = new Map();
|
||||
/** @type {{node: import('postcss').AtRule, scope: string}[]} */
|
||||
const rules = [];
|
||||
|
||||
return {
|
||||
OnceExit(css) {
|
||||
css.walkAtRules((node) => {
|
||||
if (isOverridable(node.name)) {
|
||||
const scope = getScope(node);
|
||||
|
||||
cache.set(scope, node);
|
||||
rules.push({
|
||||
node,
|
||||
scope,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
rules.forEach((rule) => {
|
||||
if (cache.get(rule.scope) !== rule.node) {
|
||||
rule.node.remove();
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
pluginCreator.postcss = true;
|
||||
module.exports = pluginCreator;
|
Reference in New Issue
Block a user