Replace postcss-cssnext with postcss-preset-env
This commit is contained in:
1 parent
461950749f
commit
8a0ebd26d8
4 files changed
+383
-1288
No files matched your search
+8
-2
@@ -28,7 +28,7 @@ import { terser } from "rollup-plugin-terser";
|
|||||||
import webpack from "webpack";
|
import webpack from "webpack";
|
||||||
import postcss from "postcss";
|
import postcss from "postcss";
|
||||||
import postcssImport from "postcss-import";
|
import postcssImport from "postcss-import";
|
||||||
import postcssCssNext from "postcss-cssnext";
|
import postcssPresetEnv from "postcss-preset-env";
|
||||||
import cssnano from "cssnano";
|
import cssnano from "cssnano";
|
||||||
|
|
||||||
const MODE = process.env["NODE_ENV"] || "production";
|
const MODE = process.env["NODE_ENV"] || "production";
|
||||||
@@ -162,7 +162,13 @@ async function generateCss(): Promise<void> {
|
|||||||
const cssIn = fs.readFileSync(cssInPath);
|
const cssIn = fs.readFileSync(cssInPath);
|
||||||
const cssOut = await postcss([
|
const cssOut = await postcss([
|
||||||
postcssImport,
|
postcssImport,
|
||||||
postcssCssNext({ warnForDuplicates: false }),
|
postcssPresetEnv({
|
||||||
|
stage: 3,
|
||||||
|
features: {
|
||||||
|
"nesting-rules": true,
|
||||||
|
"color-mod-function": true
|
||||||
|
}
|
||||||
|
}),
|
||||||
cssnano
|
cssnano
|
||||||
]).process(cssIn, { from: cssInPath, to: cssOutPath });
|
]).process(cssIn, { from: cssInPath, to: cssOutPath });
|
||||||
fs.writeFileSync(cssOutPath, cssOut.css);
|
fs.writeFileSync(cssOutPath, cssOut.css);
|
||||||
|
|||||||
Generated
+366
-1277
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -56,8 +56,8 @@
|
|||||||
"esm": "^3.2.25",
|
"esm": "^3.2.25",
|
||||||
"mithril": "^2.0.0-rc.8",
|
"mithril": "^2.0.0-rc.8",
|
||||||
"postcss": "^7.0.16",
|
"postcss": "^7.0.16",
|
||||||
"postcss-cssnext": "^3.1.0",
|
|
||||||
"postcss-import": "^12.0.1",
|
"postcss-import": "^12.0.1",
|
||||||
|
"postcss-preset-env": "^6.7.0",
|
||||||
"prettier": "^1.17.1",
|
"prettier": "^1.17.1",
|
||||||
"rollup": "^1.13.1",
|
"rollup": "^1.13.1",
|
||||||
"rollup-plugin-json": "^4.0.0",
|
"rollup-plugin-json": "^4.0.0",
|
||||||
|
|||||||
+8
-8
@@ -78,7 +78,7 @@ i {
|
|||||||
|
|
||||||
@keyframes pending-blink {
|
@keyframes pending-blink {
|
||||||
from {
|
from {
|
||||||
background-color: color(var(--status-green) a(90%));
|
background-color: color-mod(var(--status-green) a(90%));
|
||||||
}
|
}
|
||||||
to {
|
to {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
@@ -141,10 +141,10 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
& > .stale.active {
|
& > .stale.active {
|
||||||
background-color: color(var(--status-gray) a(90%));
|
background-color: color-mod(var(--status-gray) a(90%));
|
||||||
}
|
}
|
||||||
& > .fault.active {
|
& > .fault.active {
|
||||||
background-color: color(var(--status-red) a(90%));
|
background-color: color-mod(var(--status-red) a(90%));
|
||||||
}
|
}
|
||||||
& > .queued.active {
|
& > .queued.active {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -183,11 +183,11 @@ body {
|
|||||||
border-radius: 0.4em;
|
border-radius: 0.4em;
|
||||||
}
|
}
|
||||||
& > .stale {
|
& > .stale {
|
||||||
background-color: color(var(--status-gray) a(90%));
|
background-color: color-mod(var(--status-gray) a(90%));
|
||||||
border-radius: 0.4em;
|
border-radius: 0.4em;
|
||||||
}
|
}
|
||||||
& > .fault {
|
& > .fault {
|
||||||
background-color: color(var(--status-red) a(90%));
|
background-color: color-mod(var(--status-red) a(90%));
|
||||||
border-radius: 0.4em;
|
border-radius: 0.4em;
|
||||||
}
|
}
|
||||||
& .parameter {
|
& .parameter {
|
||||||
@@ -227,15 +227,15 @@ body {
|
|||||||
transition: opacity var(--fade), top var(--fade);
|
transition: opacity var(--fade), top var(--fade);
|
||||||
|
|
||||||
&.error {
|
&.error {
|
||||||
background-color: color(var(--status-red) a(90%));
|
background-color: color-mod(var(--status-red) a(90%));
|
||||||
border: 1px solid var(--status-red);
|
border: 1px solid var(--status-red);
|
||||||
}
|
}
|
||||||
&.success {
|
&.success {
|
||||||
background-color: color(var(--status-green) a(90%));
|
background-color: color-mod(var(--status-green) a(90%));
|
||||||
border: 1px solid var(--status-green);
|
border: 1px solid var(--status-green);
|
||||||
}
|
}
|
||||||
&.warning {
|
&.warning {
|
||||||
background-color: color(var(--status-yellow) a(90%));
|
background-color: color-mod(var(--status-yellow) a(90%));
|
||||||
border: 1px solid var(--status-yellow);
|
border: 1px solid var(--status-yellow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user