aboutsummaryrefslogtreecommitdiffstats
path: root/vanilla/node_modules/cssstyle/lib/properties
diff options
context:
space:
mode:
Diffstat (limited to 'vanilla/node_modules/cssstyle/lib/properties')
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/background.js406
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/backgroundAttachment.js61
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/backgroundClip.js61
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/backgroundColor.js50
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/backgroundImage.js63
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/backgroundOrigin.js61
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/backgroundPosition.js204
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/backgroundRepeat.js93
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/backgroundSize.js126
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/border.js107
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderBottom.js100
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderBottomColor.js54
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderBottomStyle.js54
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderBottomWidth.js57
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderCollapse.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderColor.js110
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderLeft.js100
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderLeftColor.js54
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderLeftStyle.js54
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderLeftWidth.js57
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderRight.js100
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderRightColor.js54
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderRightStyle.js54
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderRightWidth.js57
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderSpacing.js65
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderStyle.js110
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderTop.js100
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderTopColor.js54
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderTopStyle.js54
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderTopWidth.js57
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/borderWidth.js111
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/bottom.js47
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/clear.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/clip.js73
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/color.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/display.js210
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/flex.js178
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/flexBasis.js52
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/flexGrow.js52
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/flexShrink.js52
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/float.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/floodColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/font.js302
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/fontFamily.js98
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/fontSize.js53
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/fontStyle.js69
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/fontVariant.js66
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/fontWeight.js57
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/height.js48
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/left.js47
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/lightingColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/lineHeight.js52
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/margin.js77
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/marginBottom.js54
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/marginLeft.js54
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/marginRight.js54
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/marginTop.js54
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/opacity.js47
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/outlineColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/padding.js78
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/paddingBottom.js55
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/paddingLeft.js55
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/paddingRight.js55
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/paddingTop.js55
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/right.js47
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/stopColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/top.js47
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/webkitTextFillColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js45
-rw-r--r--vanilla/node_modules/cssstyle/lib/properties/width.js48
77 files changed, 0 insertions, 5689 deletions
diff --git a/vanilla/node_modules/cssstyle/lib/properties/background.js b/vanilla/node_modules/cssstyle/lib/properties/background.js
deleted file mode 100644
index cf4acb4..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/background.js
+++ /dev/null
@@ -1,406 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const backgroundImage = require("./backgroundImage");
-const backgroundPosition = require("./backgroundPosition");
-const backgroundSize = require("./backgroundSize");
-const backgroundRepeat = require("./backgroundRepeat");
-const backgroundOrigin = require("./backgroundOrigin");
-const backgroundClip = require("./backgroundClip");
-const backgroundAttachment = require("./backgroundAttachment");
-const backgroundColor = require("./backgroundColor");
-
-const property = "background";
-
-module.exports.initialValues = new Map([
- [backgroundImage.property, "none"],
- [backgroundPosition.property, "0% 0%"],
- [backgroundSize.property, "auto"],
- [backgroundRepeat.property, "repeat"],
- [backgroundOrigin.property, "padding-box"],
- [backgroundClip.property, "border-box"],
- [backgroundAttachment.property, "scroll"],
- [backgroundColor.property, "transparent"]
-]);
-
-module.exports.shorthandFor = new Map([
- [backgroundImage.property, backgroundImage],
- [backgroundPosition.property, backgroundPosition],
- [backgroundSize.property, backgroundSize],
- [backgroundRepeat.property, backgroundRepeat],
- [backgroundOrigin.property, backgroundOrigin],
- [backgroundClip.property, backgroundClip],
- [backgroundAttachment.property, backgroundAttachment],
- [backgroundColor.property, backgroundColor]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- } else if (parsers.hasCalcFunc(v)) {
- v = parsers.resolveCalc(v);
- }
- if (!parsers.isValidPropertyValue(property, v)) {
- return;
- }
- const values = parsers.splitValue(v, {
- delimiter: ","
- });
- const bgValues = [];
- const l = values.length;
- for (let i = 0; i < l; i++) {
- let bg = {
- [backgroundImage.property]: module.exports.initialValues.get(backgroundImage.property),
- [backgroundPosition.property]: module.exports.initialValues.get(backgroundPosition.property),
- [backgroundSize.property]: module.exports.initialValues.get(backgroundSize.property),
- [backgroundRepeat.property]: module.exports.initialValues.get(backgroundRepeat.property),
- [backgroundOrigin.property]: module.exports.initialValues.get(backgroundOrigin.property),
- [backgroundClip.property]: module.exports.initialValues.get(backgroundClip.property),
- [backgroundAttachment.property]: module.exports.initialValues.get(
- backgroundAttachment.property
- ),
- [backgroundColor.property]: module.exports.initialValues.get(backgroundColor.property)
- };
- if (l > 1 && i !== l - 1) {
- bg = {
- [backgroundImage.property]: module.exports.initialValues.get(backgroundImage.property),
- [backgroundPosition.property]: module.exports.initialValues.get(
- backgroundPosition.property
- ),
- [backgroundSize.property]: module.exports.initialValues.get(backgroundSize.property),
- [backgroundRepeat.property]: module.exports.initialValues.get(backgroundRepeat.property),
- [backgroundOrigin.property]: module.exports.initialValues.get(backgroundOrigin.property),
- [backgroundClip.property]: module.exports.initialValues.get(backgroundClip.property),
- [backgroundAttachment.property]: module.exports.initialValues.get(
- backgroundAttachment.property
- )
- };
- }
- const bgPosition = [];
- const bgSize = [];
- const bgRepeat = [];
- const bgBox = [];
- const bgParts = parsers.splitValue(values[i], {
- delimiter: "/"
- });
- if (!bgParts.length || bgParts.length > 2) {
- return;
- }
- const [bgPart1, bgPart2 = ""] = bgParts;
- const parts1 = parsers.splitValue(bgPart1);
- for (const part of parts1) {
- let partValid = false;
- for (const [longhand, value] of module.exports.shorthandFor) {
- if (parsers.isValidPropertyValue(longhand, part)) {
- partValid = true;
- switch (longhand) {
- case backgroundClip.property:
- case backgroundOrigin.property: {
- const parsedValue = value.parse(part, { globalObject });
- if (parsedValue) {
- bgBox.push(parsedValue);
- }
- break;
- }
- case backgroundColor.property: {
- if (i !== values.length - 1) {
- return;
- }
- const parsedValue = value.parse(part, { globalObject });
- if (parsedValue) {
- bg[longhand] = parsedValue;
- }
- break;
- }
- case backgroundPosition.property: {
- const parsedValue = value.parse(part, { globalObject });
- if (parsedValue) {
- bgPosition.push(parsedValue);
- }
- break;
- }
- case backgroundRepeat.property: {
- const parsedValue = value.parse(part, { globalObject });
- if (parsedValue) {
- bgRepeat.push(parsedValue);
- }
- break;
- }
- case backgroundSize.property: {
- break;
- }
- default: {
- const parsedValue = value.parse(part, { globalObject });
- if (parsedValue) {
- bg[longhand] = parsedValue;
- }
- }
- }
- }
- }
- if (!partValid) {
- return;
- }
- }
- if (bgPart2) {
- const parts2 = parsers.splitValue(bgPart2);
- for (const part of parts2) {
- let partValid = false;
- for (const [longhand, value] of module.exports.shorthandFor) {
- if (parsers.isValidPropertyValue(longhand, part)) {
- partValid = true;
- switch (longhand) {
- case backgroundClip.property:
- case backgroundOrigin.property: {
- const parsedValue = value.parse(part, { globalObject });
- if (parsedValue) {
- bgBox.push(parsedValue);
- }
- break;
- }
- case backgroundColor.property: {
- if (i !== l - 1) {
- return;
- }
- const parsedValue = value.parse(part, { globalObject });
- if (parsedValue) {
- bg[longhand] = parsedValue;
- }
- break;
- }
- case backgroundPosition.property: {
- break;
- }
- case backgroundRepeat.property: {
- const parsedValue = value.parse(part, { globalObject });
- if (parsedValue) {
- bgRepeat.push(parsedValue);
- }
- break;
- }
- case backgroundSize.property: {
- const parsedValue = value.parse(part, { globalObject });
- if (parsedValue) {
- bgSize.push(parsedValue);
- }
- break;
- }
- default: {
- const parsedValue = value.parse(part, { globalObject });
- if (parsedValue) {
- bg[longhand] = parsedValue;
- }
- }
- }
- }
- }
- if (!partValid) {
- return;
- }
- }
- }
- if (bgPosition.length) {
- const { parse: parser } = module.exports.shorthandFor.get(backgroundPosition.property);
- const value = parser(bgPosition.join(" "), { globalObject });
- if (value) {
- bg[backgroundPosition.property] = value;
- }
- }
- if (bgSize.length) {
- const { parse: parser } = module.exports.shorthandFor.get(backgroundSize.property);
- const value = parser(bgSize.join(" "), { globalObject });
- if (value) {
- bg[backgroundSize.property] = value;
- }
- }
- if (bgRepeat.length) {
- const { parse: parser } = module.exports.shorthandFor.get(backgroundRepeat.property);
- const value = parser(bgRepeat.join(" "), { globalObject });
- if (value) {
- bg[backgroundRepeat.property] = value;
- }
- }
- if (bgBox.length) {
- switch (bgBox.length) {
- case 1: {
- const [value] = bgBox;
- bg[backgroundOrigin.property] = value;
- bg[backgroundClip.property] = value;
- break;
- }
- case 2: {
- const [value1, value2] = bgBox;
- bg[backgroundOrigin.property] = value1;
- bg[backgroundClip.property] = value2;
- break;
- }
- default: {
- return;
- }
- }
- }
- bgValues.push(bg);
- }
- return bgValues;
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (v === "" || parsers.hasVarFunc(v)) {
- for (const [key] of module.exports.shorthandFor) {
- this._setProperty(key, "");
- }
- this._setProperty(property, v);
- } else {
- const bgValues = module.exports.parse(v, {
- globalObject: this._global
- });
- if (!Array.isArray(bgValues)) {
- return;
- }
- const bgMap = new Map([
- [backgroundImage.property, []],
- [backgroundPosition.property, []],
- [backgroundSize.property, []],
- [backgroundRepeat.property, []],
- [backgroundOrigin.property, []],
- [backgroundClip.property, []],
- [backgroundAttachment.property, []],
- [backgroundColor.property, []]
- ]);
- const backgrounds = [];
- for (const bgValue of bgValues) {
- const bg = [];
- for (const [longhand, value] of Object.entries(bgValue)) {
- if (value) {
- const arr = bgMap.get(longhand);
- arr.push(value);
- bgMap.set(longhand, arr);
- if (value !== module.exports.initialValues.get(longhand)) {
- if (longhand === backgroundSize.property) {
- bg.push(`/ ${value}`);
- } else {
- bg.push(value);
- }
- } else if (longhand === backgroundImage.property) {
- if (v === "none") {
- bg.push(value);
- }
- } else if (longhand === backgroundColor.property) {
- if (v === "transparent") {
- bg.push(value);
- }
- }
- }
- }
- backgrounds.push(bg.join(" "));
- }
- const priority = this._priorities.get(property) ?? "";
- for (const [longhand, value] of bgMap) {
- this._setProperty(longhand, value.join(", "), priority);
- }
- this._setProperty(property, backgrounds.join(", "), priority);
- }
- },
- get() {
- const v = this.getPropertyValue(property);
- if (parsers.hasVarFunc(v)) {
- return v;
- }
- const bgMap = new Map();
- let l = 0;
- for (const [longhand] of module.exports.shorthandFor) {
- const val = this.getPropertyValue(longhand);
- if (longhand === backgroundImage.property) {
- if (
- val === "none" &&
- v === "none" &&
- this.getPropertyValue(backgroundColor.property) === "transparent"
- ) {
- return val;
- }
- if (val !== module.exports.initialValues.get(longhand)) {
- const imgValues = parsers.splitValue(val, {
- delimiter: ","
- });
- l = imgValues.length;
- bgMap.set(longhand, imgValues);
- }
- } else if (longhand === backgroundColor.property) {
- if (val !== module.exports.initialValues.get(longhand) || v.includes(val)) {
- bgMap.set(longhand, [val]);
- }
- } else if (val !== module.exports.initialValues.get(longhand)) {
- bgMap.set(
- longhand,
- parsers.splitValue(val, {
- delimiter: ","
- })
- );
- }
- }
- if (l === 0) {
- const bgColArr = bgMap.get(backgroundColor.property);
- const background = bgColArr ? bgColArr[0] : null;
- if (background) {
- return background;
- }
- return "";
- }
- const bgValues = [];
- for (let i = 0; i < l; i++) {
- bgValues[i] = [];
- }
- for (const [longhand, values] of bgMap) {
- for (let i = 0; i < l; i++) {
- switch (longhand) {
- case backgroundColor.property: {
- if (i === l - 1) {
- const value = values[0];
- if (parsers.hasVarFunc(value)) {
- return "";
- }
- if (value && value !== module.exports.initialValues.get(longhand)) {
- const bgValue = bgValues[i];
- bgValue.push(value);
- }
- }
- break;
- }
- case backgroundSize.property: {
- const value = values[i];
- if (parsers.hasVarFunc(value)) {
- return "";
- }
- if (value && value !== module.exports.initialValues.get(longhand)) {
- const bgValue = bgValues[i];
- bgValue.push(`/ ${value}`);
- }
- break;
- }
- default: {
- const value = values[i];
- if (parsers.hasVarFunc(value)) {
- return "";
- }
- if (value && value !== module.exports.initialValues.get(longhand)) {
- const bgValue = bgValues[i];
- bgValue.push(value);
- }
- }
- }
- }
- }
- const backgrounds = [];
- for (const bgValue of bgValues) {
- backgrounds.push(bgValue.join(" "));
- }
- return backgrounds.join(", ");
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/backgroundAttachment.js b/vanilla/node_modules/cssstyle/lib/properties/backgroundAttachment.js
deleted file mode 100644
index 32b3aff..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/backgroundAttachment.js
+++ /dev/null
@@ -1,61 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "background-attachment";
-const shorthand = "background";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.splitValue(v, { delimiter: "," });
- const parsedValues = [];
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const parsedValue = parsers.resolveKeywordValue(value);
- if (!parsedValue) {
- return;
- }
- parsedValues.push(parsedValue);
- } else if (typeof value === "string") {
- parsedValues.push(value);
- }
- }
- if (parsedValues.length) {
- return parsedValues.join(", ");
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/backgroundClip.js b/vanilla/node_modules/cssstyle/lib/properties/backgroundClip.js
deleted file mode 100644
index 80407bc..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/backgroundClip.js
+++ /dev/null
@@ -1,61 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "background-clip";
-const shorthand = "background";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.splitValue(v, { delimiter: "," });
- const parsedValues = [];
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const parsedValue = parsers.resolveKeywordValue(value);
- if (!parsedValue) {
- return;
- }
- parsedValues.push(parsedValue);
- } else if (typeof value === "string") {
- parsedValues.push(value);
- }
- }
- if (parsedValues.length) {
- return parsedValues.join(", ");
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/backgroundColor.js b/vanilla/node_modules/cssstyle/lib/properties/backgroundColor.js
deleted file mode 100644
index 7d3bf99..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/backgroundColor.js
+++ /dev/null
@@ -1,50 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "background-color";
-const shorthand = "background";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/backgroundImage.js b/vanilla/node_modules/cssstyle/lib/properties/backgroundImage.js
deleted file mode 100644
index 8959685..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/backgroundImage.js
+++ /dev/null
@@ -1,63 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "background-image";
-const shorthand = "background";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.splitValue(v, { delimiter: "," });
- const parsedValues = [];
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const parsedValue = parsers.resolveGradientUrlValue(value);
- if (!parsedValue) {
- return;
- }
- parsedValues.push(parsedValue);
- } else if (typeof value === "string") {
- parsedValues.push(value);
- } else {
- return;
- }
- }
- if (parsedValues.length) {
- return parsedValues.join(", ");
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/backgroundOrigin.js b/vanilla/node_modules/cssstyle/lib/properties/backgroundOrigin.js
deleted file mode 100644
index a1fe9ac..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/backgroundOrigin.js
+++ /dev/null
@@ -1,61 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "background-origin";
-const shorthand = "background";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.splitValue(v, { delimiter: "," });
- const parsedValues = [];
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const parsedValue = parsers.resolveKeywordValue(value);
- if (!parsedValue) {
- return;
- }
- parsedValues.push(parsedValue);
- } else if (typeof value === "string") {
- parsedValues.push(value);
- }
- }
- if (parsedValues.length) {
- return parsedValues.join(", ");
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/backgroundPosition.js b/vanilla/node_modules/cssstyle/lib/properties/backgroundPosition.js
deleted file mode 100644
index 23c6c68..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/backgroundPosition.js
+++ /dev/null
@@ -1,204 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "background-position";
-const shorthand = "background";
-const keyX = ["left", "right"];
-const keyY = ["top", "bottom"];
-const keywordsX = ["center", ...keyX];
-const keywordsY = ["center", ...keyY];
-const keywords = ["center", ...keyX, ...keyY];
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const { AST_TYPES } = parsers;
- const values = parsers.splitValue(v, {
- delimiter: ","
- });
- const parsedValues = [];
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length) {
- const [part1, part2, part3, part4] = value;
- let parsedValue = "";
- switch (value.length) {
- case 1: {
- const val1 =
- part1.type === AST_TYPES.IDENTIFIER
- ? part1.name
- : parsers.resolveNumericValue([part1], { type: "length" });
- if (val1) {
- if (val1 === "center") {
- parsedValue = `${val1} ${val1}`;
- } else if (val1 === "top" || val1 === "bottom") {
- parsedValue = `center ${val1}`;
- } else {
- parsedValue = `${val1} center`;
- }
- }
- break;
- }
- case 2: {
- const val1 =
- part1.type === AST_TYPES.IDENTIFIER
- ? part1.name
- : parsers.resolveNumericValue([part1], { type: "length" });
- const val2 =
- part2.type === AST_TYPES.IDENTIFIER
- ? part2.name
- : parsers.resolveNumericValue([part2], { type: "length" });
- if (val1 && val2) {
- if (keywordsX.includes(val1) && keywordsY.includes(val2)) {
- parsedValue = `${val1} ${val2}`;
- } else if (keywordsY.includes(val1) && keywordsX.includes(val2)) {
- parsedValue = `${val2} ${val1}`;
- } else if (keywordsX.includes(val1)) {
- if (val2 === "center" || !keywordsX.includes(val2)) {
- parsedValue = `${val1} ${val2}`;
- }
- } else if (keywordsY.includes(val2)) {
- if (!keywordsY.includes(val1)) {
- parsedValue = `${val1} ${val2}`;
- }
- } else if (!keywordsY.includes(val1) && !keywordsX.includes(val2)) {
- parsedValue = `${val1} ${val2}`;
- }
- }
- break;
- }
- case 3: {
- const val1 = part1.type === AST_TYPES.IDENTIFIER && part1.name;
- const val2 =
- part2.type === AST_TYPES.IDENTIFIER
- ? part2.name
- : parsers.resolveNumericValue([part2], { type: "length" });
- const val3 =
- part3.type === AST_TYPES.IDENTIFIER
- ? part3.name
- : parsers.resolveNumericValue([part3], { type: "length" });
- if (val1 && val2 && val3) {
- let posX = "";
- let offX = "";
- let posY = "";
- let offY = "";
- if (keywordsX.includes(val1)) {
- if (keyY.includes(val2)) {
- if (!keywords.includes(val3)) {
- posX = val1;
- posY = val2;
- offY = val3;
- }
- } else if (keyY.includes(val3)) {
- if (!keywords.includes(val2)) {
- posX = val1;
- offX = val2;
- posY = val3;
- }
- }
- } else if (keywordsY.includes(val1)) {
- if (keyX.includes(val2)) {
- if (!keywords.includes(val3)) {
- posX = val2;
- offX = val3;
- posY = val1;
- }
- } else if (keyX.includes(val3)) {
- if (!keywords.includes(val2)) {
- posX = val3;
- posY = val1;
- offY = val2;
- }
- }
- }
- if (posX && posY) {
- if (offX) {
- parsedValue = `${posX} ${offX} ${posY}`;
- } else if (offY) {
- parsedValue = `${posX} ${posY} ${offY}`;
- }
- }
- }
- break;
- }
- case 4: {
- const val1 = part1.type === AST_TYPES.IDENTIFIER && part1.name;
- const val2 = parsers.resolveNumericValue([part2], { type: "length" });
- const val3 = part3.type === AST_TYPES.IDENTIFIER && part3.name;
- const val4 = parsers.resolveNumericValue([part4], { type: "length" });
- if (val1 && val2 && val3 && val4) {
- let posX = "";
- let offX = "";
- let posY = "";
- let offY = "";
- if (keywordsX.includes(val1) && keyY.includes(val3)) {
- posX = val1;
- offX = val2;
- posY = val3;
- offY = val4;
- } else if (keyX.includes(val1) && keywordsY.includes(val3)) {
- posX = val1;
- offX = val2;
- posY = val3;
- offY = val4;
- } else if (keyY.includes(val1) && keywordsX.includes(val3)) {
- posX = val3;
- offX = val4;
- posY = val1;
- offY = val2;
- }
- if (posX && offX && posY && offY) {
- parsedValue = `${posX} ${offX} ${posY} ${offY}`;
- }
- }
- break;
- }
- default:
- }
- if (parsedValue) {
- parsedValues.push(parsedValue);
- } else {
- return;
- }
- } else if (typeof value === "string") {
- parsedValues.push(value);
- }
- }
- if (parsedValues.length) {
- return parsedValues.join(", ");
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/backgroundRepeat.js b/vanilla/node_modules/cssstyle/lib/properties/backgroundRepeat.js
deleted file mode 100644
index 6bb9ddd..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/backgroundRepeat.js
+++ /dev/null
@@ -1,93 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "background-repeat";
-const shorthand = "background";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const { AST_TYPES } = parsers;
- const values = parsers.splitValue(v, {
- delimiter: ","
- });
- const parsedValues = [];
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length) {
- let parsedValue = "";
- switch (value.length) {
- case 1: {
- const [part1] = value;
- const val1 = part1.type === AST_TYPES.IDENTIFIER && part1.name;
- if (val1) {
- parsedValue = val1;
- }
- break;
- }
- case 2: {
- const [part1, part2] = value;
- const val1 = part1.type === AST_TYPES.IDENTIFIER && part1.name;
- const val2 = part2.type === AST_TYPES.IDENTIFIER && part2.name;
- if (val1 && val2) {
- if (val1 === "repeat" && val2 === "no-repeat") {
- parsedValue = "repeat-x";
- } else if (val1 === "no-repeat" && val2 === "repeat") {
- parsedValue = "repeat-y";
- } else if (val1 === val2) {
- parsedValue = val1;
- } else {
- parsedValue = `${val1} ${val2}`;
- }
- }
- break;
- }
- default:
- }
- if (parsedValue) {
- parsedValues.push(parsedValue);
- } else {
- return;
- }
- } else if (typeof value === "string") {
- parsedValues.push(value);
- }
- }
- if (parsedValues.length) {
- return parsedValues.join(", ");
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/backgroundSize.js b/vanilla/node_modules/cssstyle/lib/properties/backgroundSize.js
deleted file mode 100644
index be31044..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/backgroundSize.js
+++ /dev/null
@@ -1,126 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "background-size";
-const shorthand = "background";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const { AST_TYPES } = parsers;
- const values = parsers.splitValue(v, {
- delimiter: ","
- });
- const parsedValues = [];
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length) {
- if (value.length === 1) {
- const [{ isNumber, name, type, value: itemValue }] = value;
- switch (type) {
- case AST_TYPES.CALC: {
- if (isNumber) {
- return;
- }
- parsedValues.push(`${name}(${itemValue})`);
- break;
- }
- case AST_TYPES.GLOBAL_KEYWORD:
- case AST_TYPES.IDENTIFIER: {
- parsedValues.push(name);
- break;
- }
- default: {
- const parsedValue = parsers.resolveNumericValue(value, {
- type: "length"
- });
- if (!parsedValue) {
- return;
- }
- parsedValues.push(parsedValue);
- }
- }
- } else {
- const [val1, val2] = value;
- const parts = [];
- if (val1.type === AST_TYPES.CALC && !val1.isNumber) {
- parts.push(`${val1.name}(${val1.value})`);
- } else if (val1.type === AST_TYPES.IDENTIFIER) {
- parts.push(val1.name);
- } else if (val1.type === AST_TYPES.DIMENSION) {
- parts.push(`${val1.value}${val1.unit}`);
- } else if (val1.type === AST_TYPES.PERCENTAGE) {
- parts.push(`${val1.value}%`);
- } else {
- return;
- }
- switch (val2.type) {
- case AST_TYPES.CALC: {
- if (val2.isNumber) {
- return;
- }
- parts.push(`${val2.name}(${val2.value})`);
- break;
- }
- case AST_TYPES.DIMENSION: {
- parts.push(`${val2.value}${val2.unit}`);
- break;
- }
- case AST_TYPES.IDENTIFIER: {
- if (val2.name !== "auto") {
- parts.push(val2.name);
- }
- break;
- }
- case AST_TYPES.PERCENTAGE: {
- parts.push(`${val2.value}%`);
- break;
- }
- default: {
- return;
- }
- }
- parsedValues.push(parts.join(" "));
- }
- } else if (typeof value === "string") {
- parsedValues.push(value);
- }
- }
- if (parsedValues.length) {
- return parsedValues.join(", ");
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/border.js b/vanilla/node_modules/cssstyle/lib/properties/border.js
deleted file mode 100644
index 889bd5a..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/border.js
+++ /dev/null
@@ -1,107 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const borderWidth = require("./borderWidth");
-const borderStyle = require("./borderStyle");
-const borderColor = require("./borderColor");
-const borderTop = require("./borderTop");
-const borderRight = require("./borderRight");
-const borderBottom = require("./borderBottom");
-const borderLeft = require("./borderLeft");
-
-const property = "border";
-
-const subProps = {
- width: borderWidth.property,
- style: borderStyle.property,
- color: borderColor.property
-};
-
-module.exports.initialValues = new Map([
- [borderWidth.property, "medium"],
- [borderStyle.property, "none"],
- [borderColor.property, "currentcolor"]
-]);
-
-module.exports.shorthandFor = new Map([
- [borderWidth.property, borderWidth],
- [borderStyle.property, borderStyle],
- [borderColor.property, borderColor]
-]);
-
-module.exports.positionShorthandFor = new Map([
- [borderTop.property, borderTop],
- [borderRight.property, borderRight],
- [borderBottom.property, borderBottom],
- [borderLeft.property, borderLeft]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "" || parsers.hasVarFunc(v)) {
- return v;
- }
- const values = parsers.splitValue(v);
- const parsedValues = new Map();
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const parsedValue = parsers.resolveBorderShorthandValue(value, subProps, parsedValues);
- if (typeof parsedValue === "string") {
- return parsedValue;
- } else if (Array.isArray(parsedValue)) {
- const [key, resolvedVal] = parsedValue;
- parsedValues.set(key, resolvedVal);
- } else {
- return;
- }
- } else {
- return;
- }
- }
- if (parsedValues.size) {
- const keys = module.exports.shorthandFor.keys();
- const obj = {
- [borderWidth.property]: "medium"
- };
- for (const key of keys) {
- if (parsedValues.has(key)) {
- const parsedValue = parsedValues.get(key);
- if (parsedValue !== module.exports.initialValues.get(key)) {
- obj[key] = parsedValues.get(key);
- if (obj[borderWidth.property] && obj[borderWidth.property] === "medium") {
- delete obj[borderWidth.property];
- }
- }
- }
- }
- return obj;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (val || typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderBottom.js b/vanilla/node_modules/cssstyle/lib/properties/borderBottom.js
deleted file mode 100644
index 7cb2892..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderBottom.js
+++ /dev/null
@@ -1,100 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const borderBottomWidth = require("./borderBottomWidth");
-const borderBottomStyle = require("./borderBottomStyle");
-const borderBottomColor = require("./borderBottomColor");
-
-const property = "border-bottom";
-const shorthand = "border";
-
-const subProps = {
- width: borderBottomWidth.property,
- style: borderBottomStyle.property,
- color: borderBottomColor.property
-};
-
-module.exports.initialValues = new Map([
- [borderBottomWidth.property, "medium"],
- [borderBottomStyle.property, "none"],
- [borderBottomColor.property, "currentcolor"]
-]);
-
-module.exports.shorthandFor = new Map([
- [borderBottomWidth.property, borderBottomWidth],
- [borderBottomStyle.property, borderBottomStyle],
- [borderBottomColor.property, borderBottomColor]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.splitValue(v);
- const parsedValues = new Map();
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const parsedValue = parsers.resolveBorderShorthandValue(value, subProps, parsedValues);
- if (typeof parsedValue === "string") {
- return parsedValue;
- } else if (Array.isArray(parsedValue)) {
- const [key, resolvedVal] = parsedValue;
- parsedValues.set(key, resolvedVal);
- } else {
- return;
- }
- } else {
- return;
- }
- }
- if (parsedValues.size) {
- const keys = module.exports.shorthandFor.keys();
- const obj = {
- [borderBottomWidth.property]: "medium"
- };
- for (const key of keys) {
- if (parsedValues.has(key)) {
- const parsedValue = parsedValues.get(key);
- if (parsedValue !== module.exports.initialValues.get(key)) {
- obj[key] = parsedValues.get(key);
- if (obj[borderBottomWidth.property] && obj[borderBottomWidth.property] === "medium") {
- delete obj[borderBottomWidth.property];
- }
- }
- }
- }
- return obj;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (val || typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderBottomColor.js b/vanilla/node_modules/cssstyle/lib/properties/borderBottomColor.js
deleted file mode 100644
index b458fd4..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderBottomColor.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-bottom-color";
-const lineShorthand = "border-color";
-const positionShorthand = "border-bottom";
-const shorthand = "border";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const shorthandPriority = this._priorities.get(shorthand);
- const linePriority = this._priorities.get(lineShorthand);
- const positionPriority = this._priorities.get(positionShorthand);
- const priority =
- !(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderBottomStyle.js b/vanilla/node_modules/cssstyle/lib/properties/borderBottomStyle.js
deleted file mode 100644
index b54b6a9..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderBottomStyle.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-bottom-style";
-const lineShorthand = "border-style";
-const positionShorthand = "border-bottom";
-const shorthand = "border";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveKeywordValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const shorthandPriority = this._priorities.get(shorthand);
- const linePriority = this._priorities.get(lineShorthand);
- const positionPriority = this._priorities.get(positionShorthand);
- const priority =
- !(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderBottomWidth.js b/vanilla/node_modules/cssstyle/lib/properties/borderBottomWidth.js
deleted file mode 100644
index 3200365..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderBottomWidth.js
+++ /dev/null
@@ -1,57 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-bottom-width";
-const lineShorthand = "border-width";
-const positionShorthand = "border-bottom";
-const shorthand = "border";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0,
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const shorthandPriority = this._priorities.get(shorthand);
- const linePriority = this._priorities.get(lineShorthand);
- const positionPriority = this._priorities.get(positionShorthand);
- const priority =
- !(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderCollapse.js b/vanilla/node_modules/cssstyle/lib/properties/borderCollapse.js
deleted file mode 100644
index f77c445..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderCollapse.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-collapse";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveKeywordValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderColor.js b/vanilla/node_modules/cssstyle/lib/properties/borderColor.js
deleted file mode 100644
index 232d34c..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderColor.js
+++ /dev/null
@@ -1,110 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const borderTopColor = require("./borderTopColor");
-const borderRightColor = require("./borderRightColor");
-const borderBottomColor = require("./borderBottomColor");
-const borderLeftColor = require("./borderLeftColor");
-
-const property = "border-color";
-const shorthand = "border";
-
-module.exports.shorthandFor = new Map([
- [borderTopColor.property, borderTopColor],
- [borderRightColor.property, borderRightColor],
- [borderBottomColor.property, borderBottomColor],
- [borderLeftColor.property, borderLeftColor]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- const parsedValues = [];
- if (Array.isArray(values) && values.length) {
- if (values.length > 4) {
- return;
- }
- for (const value of values) {
- const parsedValue = parsers.resolveColorValue([value], {
- length: values.length
- });
- if (!parsedValue) {
- return;
- }
- parsedValues.push(parsedValue);
- }
- } else if (typeof values === "string") {
- parsedValues.push(values);
- }
- if (parsedValues.length) {
- switch (parsedValues.length) {
- case 1: {
- return parsedValues;
- }
- case 2: {
- const [val1, val2] = parsedValues;
- if (val1 === val2) {
- return [val1];
- }
- return parsedValues;
- }
- case 3: {
- const [val1, val2, val3] = parsedValues;
- if (val1 === val3) {
- if (val1 === val2) {
- return [val1];
- }
- return [val1, val2];
- }
- return parsedValues;
- }
- case 4: {
- const [val1, val2, val3, val4] = parsedValues;
- if (val2 === val4) {
- if (val1 === val3) {
- if (val1 === val2) {
- return [val1];
- }
- return [val1, val2];
- }
- return [val1, val2, val3];
- }
- return parsedValues;
- }
- default:
- }
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (Array.isArray(val) || typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderLeft.js b/vanilla/node_modules/cssstyle/lib/properties/borderLeft.js
deleted file mode 100644
index 7c40f58..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderLeft.js
+++ /dev/null
@@ -1,100 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const borderLeftWidth = require("./borderLeftWidth");
-const borderLeftStyle = require("./borderLeftStyle");
-const borderLeftColor = require("./borderLeftColor");
-
-const property = "border-left";
-const shorthand = "border";
-
-const subProps = {
- width: borderLeftWidth.property,
- style: borderLeftStyle.property,
- color: borderLeftColor.property
-};
-
-module.exports.initialValues = new Map([
- [borderLeftWidth.property, "medium"],
- [borderLeftStyle.property, "none"],
- [borderLeftColor.property, "currentcolor"]
-]);
-
-module.exports.shorthandFor = new Map([
- [borderLeftWidth.property, borderLeftWidth],
- [borderLeftStyle.property, borderLeftStyle],
- [borderLeftColor.property, borderLeftColor]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.splitValue(v);
- const parsedValues = new Map();
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const parsedValue = parsers.resolveBorderShorthandValue(value, subProps, parsedValues);
- if (typeof parsedValue === "string") {
- return parsedValue;
- } else if (Array.isArray(parsedValue)) {
- const [key, resolvedVal] = parsedValue;
- parsedValues.set(key, resolvedVal);
- } else {
- return;
- }
- } else {
- return;
- }
- }
- if (parsedValues.size) {
- const keys = module.exports.shorthandFor.keys();
- const obj = {
- [borderLeftWidth.property]: "medium"
- };
- for (const key of keys) {
- if (parsedValues.has(key)) {
- const parsedValue = parsedValues.get(key);
- if (parsedValue !== module.exports.initialValues.get(key)) {
- obj[key] = parsedValues.get(key);
- if (obj[borderLeftWidth.property] && obj[borderLeftWidth.property] === "medium") {
- delete obj[borderLeftWidth.property];
- }
- }
- }
- }
- return obj;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (val || typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderLeftColor.js b/vanilla/node_modules/cssstyle/lib/properties/borderLeftColor.js
deleted file mode 100644
index 7cb630e..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderLeftColor.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-left-color";
-const lineShorthand = "border-color";
-const positionShorthand = "border-left";
-const shorthand = "border";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const shorthandPriority = this._priorities.get(shorthand);
- const linePriority = this._priorities.get(lineShorthand);
- const positionPriority = this._priorities.get(positionShorthand);
- const priority =
- !(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderLeftStyle.js b/vanilla/node_modules/cssstyle/lib/properties/borderLeftStyle.js
deleted file mode 100644
index 8fa5761..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderLeftStyle.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-left-style";
-const lineShorthand = "border-style";
-const positionShorthand = "border-left";
-const shorthand = "border";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveKeywordValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const shorthandPriority = this._priorities.get(shorthand);
- const linePriority = this._priorities.get(lineShorthand);
- const positionPriority = this._priorities.get(positionShorthand);
- const priority =
- !(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderLeftWidth.js b/vanilla/node_modules/cssstyle/lib/properties/borderLeftWidth.js
deleted file mode 100644
index 74dd03f..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderLeftWidth.js
+++ /dev/null
@@ -1,57 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-left-width";
-const lineShorthand = "border-width";
-const positionShorthand = "border-left";
-const shorthand = "border";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0,
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const shorthandPriority = this._priorities.get(shorthand);
- const linePriority = this._priorities.get(lineShorthand);
- const positionPriority = this._priorities.get(positionShorthand);
- const priority =
- !(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderRight.js b/vanilla/node_modules/cssstyle/lib/properties/borderRight.js
deleted file mode 100644
index 43c2878..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderRight.js
+++ /dev/null
@@ -1,100 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const borderRightWidth = require("./borderRightWidth");
-const borderRightStyle = require("./borderRightStyle");
-const borderRightColor = require("./borderRightColor");
-
-const property = "border-right";
-const shorthand = "border";
-
-const subProps = {
- width: borderRightWidth.property,
- style: borderRightStyle.property,
- color: borderRightColor.property
-};
-
-module.exports.initialValues = new Map([
- [borderRightWidth.property, "medium"],
- [borderRightStyle.property, "none"],
- [borderRightColor.property, "currentcolor"]
-]);
-
-module.exports.shorthandFor = new Map([
- [borderRightWidth.property, borderRightWidth],
- [borderRightStyle.property, borderRightStyle],
- [borderRightColor.property, borderRightColor]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.splitValue(v);
- const parsedValues = new Map();
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const parsedValue = parsers.resolveBorderShorthandValue(value, subProps, parsedValues);
- if (typeof parsedValue === "string") {
- return parsedValue;
- } else if (Array.isArray(parsedValue)) {
- const [key, resolvedVal] = parsedValue;
- parsedValues.set(key, resolvedVal);
- } else {
- return;
- }
- } else {
- return;
- }
- }
- if (parsedValues.size) {
- const keys = module.exports.shorthandFor.keys();
- const obj = {
- [borderRightWidth.property]: "medium"
- };
- for (const key of keys) {
- if (parsedValues.has(key)) {
- const parsedValue = parsedValues.get(key);
- if (parsedValue !== module.exports.initialValues.get(key)) {
- obj[key] = parsedValues.get(key);
- if (obj[borderRightWidth.property] && obj[borderRightWidth.property] === "medium") {
- delete obj[borderRightWidth.property];
- }
- }
- }
- }
- return obj;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (val || typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderRightColor.js b/vanilla/node_modules/cssstyle/lib/properties/borderRightColor.js
deleted file mode 100644
index 9071c50..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderRightColor.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-right-color";
-const lineShorthand = "border-color";
-const positionShorthand = "border-right";
-const shorthand = "border";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const shorthandPriority = this._priorities.get(shorthand);
- const linePriority = this._priorities.get(lineShorthand);
- const positionPriority = this._priorities.get(positionShorthand);
- const priority =
- !(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderRightStyle.js b/vanilla/node_modules/cssstyle/lib/properties/borderRightStyle.js
deleted file mode 100644
index 09ffe48..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderRightStyle.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-right-style";
-const lineShorthand = "border-style";
-const positionShorthand = "border-right";
-const shorthand = "border";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveKeywordValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const shorthandPriority = this._priorities.get(shorthand);
- const linePriority = this._priorities.get(lineShorthand);
- const positionPriority = this._priorities.get(positionShorthand);
- const priority =
- !(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderRightWidth.js b/vanilla/node_modules/cssstyle/lib/properties/borderRightWidth.js
deleted file mode 100644
index b56ab28..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderRightWidth.js
+++ /dev/null
@@ -1,57 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-right-width";
-const lineShorthand = "border-width";
-const positionShorthand = "border-right";
-const shorthand = "border";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0,
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const shorthandPriority = this._priorities.get(shorthand);
- const linePriority = this._priorities.get(lineShorthand);
- const positionPriority = this._priorities.get(positionShorthand);
- const priority =
- !(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderSpacing.js b/vanilla/node_modules/cssstyle/lib/properties/borderSpacing.js
deleted file mode 100644
index 3bba0be..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderSpacing.js
+++ /dev/null
@@ -1,65 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-spacing";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length) {
- switch (value.length) {
- case 1: {
- return parsers.resolveNumericValue(value, {
- type: "length"
- });
- }
- case 2: {
- const [part1, part2] = value;
- const val1 = parsers.resolveNumericValue([part1], {
- type: "length"
- });
- const val2 = parsers.resolveNumericValue([part2], {
- type: "length"
- });
- if (val1 && val2) {
- return `${val1} ${val2}`;
- }
- break;
- }
- default:
- }
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderStyle.js b/vanilla/node_modules/cssstyle/lib/properties/borderStyle.js
deleted file mode 100644
index 2cf8836..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderStyle.js
+++ /dev/null
@@ -1,110 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const borderTopStyle = require("./borderTopStyle");
-const borderRightStyle = require("./borderRightStyle");
-const borderBottomStyle = require("./borderBottomStyle");
-const borderLeftStyle = require("./borderLeftStyle");
-
-const property = "border-style";
-const shorthand = "border";
-
-module.exports.shorthandFor = new Map([
- [borderTopStyle.property, borderTopStyle],
- [borderRightStyle.property, borderRightStyle],
- [borderBottomStyle.property, borderBottomStyle],
- [borderLeftStyle.property, borderLeftStyle]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- const parsedValues = [];
- if (Array.isArray(values) && values.length) {
- if (values.length > 4) {
- return;
- }
- for (const value of values) {
- const parsedValue = parsers.resolveKeywordValue([value], {
- length: values.length
- });
- if (!parsedValue) {
- return;
- }
- parsedValues.push(parsedValue);
- }
- } else if (typeof values === "string") {
- parsedValues.push(values);
- }
- if (parsedValues.length) {
- switch (parsedValues.length) {
- case 1: {
- return parsedValues;
- }
- case 2: {
- const [val1, val2] = parsedValues;
- if (val1 === val2) {
- return [val1];
- }
- return parsedValues;
- }
- case 3: {
- const [val1, val2, val3] = parsedValues;
- if (val1 === val3) {
- if (val1 === val2) {
- return [val1];
- }
- return [val1, val2];
- }
- return parsedValues;
- }
- case 4: {
- const [val1, val2, val3, val4] = parsedValues;
- if (val2 === val4) {
- if (val1 === val3) {
- if (val1 === val2) {
- return [val1];
- }
- return [val1, val2];
- }
- return [val1, val2, val3];
- }
- return parsedValues;
- }
- default:
- }
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (Array.isArray(val) || typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderTop.js b/vanilla/node_modules/cssstyle/lib/properties/borderTop.js
deleted file mode 100644
index 29f649d..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderTop.js
+++ /dev/null
@@ -1,100 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const borderTopWidth = require("./borderTopWidth");
-const borderTopStyle = require("./borderTopStyle");
-const borderTopColor = require("./borderTopColor");
-
-const property = "border-top";
-const shorthand = "border";
-
-const subProps = {
- width: borderTopWidth.property,
- style: borderTopStyle.property,
- color: borderTopColor.property
-};
-
-module.exports.initialValues = new Map([
- [borderTopWidth.property, "medium"],
- [borderTopStyle.property, "none"],
- [borderTopColor.property, "currentcolor"]
-]);
-
-module.exports.shorthandFor = new Map([
- [borderTopWidth.property, borderTopWidth],
- [borderTopStyle.property, borderTopStyle],
- [borderTopColor.property, borderTopColor]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.splitValue(v);
- const parsedValues = new Map();
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const parsedValue = parsers.resolveBorderShorthandValue(value, subProps, parsedValues);
- if (typeof parsedValue === "string") {
- return parsedValue;
- } else if (Array.isArray(parsedValue)) {
- const [key, resolvedVal] = parsedValue;
- parsedValues.set(key, resolvedVal);
- } else {
- return;
- }
- } else {
- return;
- }
- }
- if (parsedValues.size) {
- const keys = module.exports.shorthandFor.keys();
- const obj = {
- [borderTopWidth.property]: "medium"
- };
- for (const key of keys) {
- if (parsedValues.has(key)) {
- const parsedValue = parsedValues.get(key);
- if (parsedValue !== module.exports.initialValues.get(key)) {
- obj[key] = parsedValues.get(key);
- if (obj[borderTopWidth.property] && obj[borderTopWidth.property] === "medium") {
- delete obj[borderTopWidth.property];
- }
- }
- }
- }
- return obj;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (val || typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderTopColor.js b/vanilla/node_modules/cssstyle/lib/properties/borderTopColor.js
deleted file mode 100644
index 3c22b90..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderTopColor.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-top-color";
-const lineShorthand = "border-color";
-const positionShorthand = "border-top";
-const shorthand = "border";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const shorthandPriority = this._priorities.get(shorthand);
- const linePriority = this._priorities.get(lineShorthand);
- const positionPriority = this._priorities.get(positionShorthand);
- const priority =
- !(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderTopStyle.js b/vanilla/node_modules/cssstyle/lib/properties/borderTopStyle.js
deleted file mode 100644
index c0bdf0e..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderTopStyle.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-top-style";
-const lineShorthand = "border-style";
-const positionShorthand = "border-top";
-const shorthand = "border";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveKeywordValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const shorthandPriority = this._priorities.get(shorthand);
- const linePriority = this._priorities.get(lineShorthand);
- const positionPriority = this._priorities.get(positionShorthand);
- const priority =
- !(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderTopWidth.js b/vanilla/node_modules/cssstyle/lib/properties/borderTopWidth.js
deleted file mode 100644
index 177fe83..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderTopWidth.js
+++ /dev/null
@@ -1,57 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "border-top-width";
-const lineShorthand = "border-width";
-const positionShorthand = "border-top";
-const shorthand = "border";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0,
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const shorthandPriority = this._priorities.get(shorthand);
- const linePriority = this._priorities.get(lineShorthand);
- const positionPriority = this._priorities.get(positionShorthand);
- const priority =
- !(shorthandPriority || linePriority || positionPriority) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/borderWidth.js b/vanilla/node_modules/cssstyle/lib/properties/borderWidth.js
deleted file mode 100644
index 1306f2e..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/borderWidth.js
+++ /dev/null
@@ -1,111 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const borderTopWidth = require("./borderTopWidth");
-const borderRightWidth = require("./borderRightWidth");
-const borderBottomWidth = require("./borderBottomWidth");
-const borderLeftWidth = require("./borderLeftWidth");
-
-const property = "border-width";
-const shorthand = "border";
-
-module.exports.shorthandFor = new Map([
- [borderTopWidth.property, borderTopWidth],
- [borderRightWidth.property, borderRightWidth],
- [borderBottomWidth.property, borderBottomWidth],
- [borderLeftWidth.property, borderLeftWidth]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- const parsedValues = [];
- if (Array.isArray(values) && values.length) {
- if (values.length > 4) {
- return;
- }
- for (const value of values) {
- const parsedValue = parsers.resolveNumericValue([value], {
- length: values.length,
- type: "length"
- });
- if (!parsedValue) {
- return;
- }
- parsedValues.push(parsedValue);
- }
- } else if (typeof values === "string") {
- parsedValues.push(values);
- }
- if (parsedValues.length) {
- switch (parsedValues.length) {
- case 1: {
- return parsedValues;
- }
- case 2: {
- const [val1, val2] = parsedValues;
- if (val1 === val2) {
- return [val1];
- }
- return parsedValues;
- }
- case 3: {
- const [val1, val2, val3] = parsedValues;
- if (val1 === val3) {
- if (val1 === val2) {
- return [val1];
- }
- return [val1, val2];
- }
- return parsedValues;
- }
- case 4: {
- const [val1, val2, val3, val4] = parsedValues;
- if (val2 === val4) {
- if (val1 === val3) {
- if (val1 === val2) {
- return [val1];
- }
- return [val1, val2];
- }
- return [val1, val2, val3];
- }
- return parsedValues;
- }
- default:
- }
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._borderSetter(property, v, "");
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (Array.isArray(val) || typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._borderSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/bottom.js b/vanilla/node_modules/cssstyle/lib/properties/bottom.js
deleted file mode 100644
index af7bc58..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/bottom.js
+++ /dev/null
@@ -1,47 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "bottom";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/clear.js b/vanilla/node_modules/cssstyle/lib/properties/clear.js
deleted file mode 100644
index 28e9ef3..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/clear.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "clear";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveKeywordValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/clip.js b/vanilla/node_modules/cssstyle/lib/properties/clip.js
deleted file mode 100644
index a3db772..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/clip.js
+++ /dev/null
@@ -1,73 +0,0 @@
-"use strict";
-// deprecated
-// @see https://drafts.csswg.org/css-masking-1/#clip-property
-
-const parsers = require("../parsers");
-
-const property = "clip";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const { AST_TYPES } = parsers;
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const [{ name, type, value: itemValue }] = value;
- switch (type) {
- case AST_TYPES.FUNCTION: {
- const values = parsers.splitValue(itemValue, {
- delimiter: ","
- });
- const parsedValues = [];
- for (const item of values) {
- const parsedValue = parsers.parseCSS(item, { context: "value" }, true);
- const val = parsers.resolveNumericValue(parsedValue.children, {
- type: "length"
- });
- if (val) {
- parsedValues.push(val);
- } else {
- return;
- }
- }
- return `${name}(${parsedValues.join(", ")})`;
- }
- case AST_TYPES.GLOBAL_KEYWORD:
- case AST_TYPES.IDENTIFIER: {
- return name;
- }
- default:
- }
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/color.js b/vanilla/node_modules/cssstyle/lib/properties/color.js
deleted file mode 100644
index d0ad35c..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/color.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/display.js b/vanilla/node_modules/cssstyle/lib/properties/display.js
deleted file mode 100644
index d331d54..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/display.js
+++ /dev/null
@@ -1,210 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "display";
-
-/* keywords */
-const displayOutside = ["block", "inline", "run-in"];
-const displayFlow = ["flow", "flow-root"];
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const { AST_TYPES } = parsers;
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length) {
- switch (value.length) {
- case 1: {
- const [{ name, type }] = value;
- switch (type) {
- case AST_TYPES.GLOBAL_KEYWORD: {
- return name;
- }
- case AST_TYPES.IDENTIFIER: {
- if (name === "flow") {
- return "block";
- }
- return name;
- }
- default:
- }
- break;
- }
- case 2: {
- const [part1, part2] = value;
- const val1 = part1.type === AST_TYPES.IDENTIFIER && part1.name;
- const val2 = part2.type === AST_TYPES.IDENTIFIER && part2.name;
- if (val1 && val2) {
- let outerValue = "";
- let innerValue = "";
- if (val1 === "list-item") {
- outerValue = val2;
- innerValue = val1;
- } else if (val2 === "list-item") {
- outerValue = val1;
- innerValue = val2;
- } else if (displayOutside.includes(val1)) {
- outerValue = val1;
- innerValue = val2;
- } else if (displayOutside.includes(val2)) {
- outerValue = val2;
- innerValue = val1;
- }
- if (innerValue === "list-item") {
- switch (outerValue) {
- case "block":
- case "flow": {
- return innerValue;
- }
- case "flow-root":
- case "inline":
- case "run-in": {
- return `${outerValue} ${innerValue}`;
- }
- default:
- }
- } else if (outerValue === "block") {
- switch (innerValue) {
- case "flow": {
- return outerValue;
- }
- case "flow-root":
- case "flex":
- case "grid":
- case "table": {
- return innerValue;
- }
- case "ruby": {
- return `${outerValue} ${innerValue}`;
- }
- default:
- }
- } else if (outerValue === "inline") {
- switch (innerValue) {
- case "flow": {
- return outerValue;
- }
- case "flow-root": {
- return `${outerValue}-block`;
- }
- case "flex":
- case "grid":
- case "table": {
- return `${outerValue}-${innerValue}`;
- }
- case "ruby": {
- return innerValue;
- }
- default:
- }
- } else if (outerValue === "run-in") {
- switch (innerValue) {
- case "flow": {
- return outerValue;
- }
- case "flow-root":
- case "flex":
- case "grid":
- case "table":
- case "ruby": {
- return `${outerValue} ${innerValue}`;
- }
- default:
- }
- }
- }
- break;
- }
- case 3: {
- const [part1, part2, part3] = value;
- const val1 = part1.type === AST_TYPES.IDENTIFIER && part1.name;
- const val2 = part2.type === AST_TYPES.IDENTIFIER && part2.name;
- const val3 = part3.type === AST_TYPES.IDENTIFIER && part3.name;
- if (val1 && val2 && part3) {
- let outerValue = "";
- let flowValue = "";
- let listItemValue = "";
- if (val1 === "list-item") {
- listItemValue = val1;
- if (displayFlow.includes(val2)) {
- flowValue = val2;
- outerValue = val3;
- } else if (displayFlow.includes(val3)) {
- flowValue = val3;
- outerValue = val2;
- }
- } else if (val2 === "list-item") {
- listItemValue = val2;
- if (displayFlow.includes(val1)) {
- flowValue = val1;
- outerValue = val3;
- } else if (displayFlow.includes(val3)) {
- flowValue = val3;
- outerValue = val1;
- }
- } else if (val3 === "list-item") {
- listItemValue = val3;
- if (displayFlow.includes(val1)) {
- flowValue = val1;
- outerValue = val2;
- } else if (displayFlow.includes(val2)) {
- flowValue = val2;
- outerValue = val1;
- }
- }
- if (outerValue && flowValue && listItemValue) {
- switch (outerValue) {
- case "block": {
- if (flowValue === "flow") {
- return listItemValue;
- }
- return `${flowValue} ${listItemValue}`;
- }
- case "inline":
- case "run-in": {
- if (flowValue === "flow") {
- return `${outerValue} ${listItemValue}`;
- }
- return `${outerValue} ${flowValue} ${listItemValue}`;
- }
- }
- }
- }
- break;
- }
- default:
- }
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/flex.js b/vanilla/node_modules/cssstyle/lib/properties/flex.js
deleted file mode 100644
index 084e99d..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/flex.js
+++ /dev/null
@@ -1,178 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const flexGrow = require("./flexGrow");
-const flexShrink = require("./flexShrink");
-const flexBasis = require("./flexBasis");
-
-const property = "flex";
-
-module.exports.initialValues = new Map([
- [flexGrow.property, "0"],
- [flexShrink.property, "1"],
- [flexBasis.property, "auto"]
-]);
-
-module.exports.shorthandFor = new Map([
- [flexGrow.property, flexGrow],
- [flexShrink.property, flexShrink],
- [flexBasis.property, flexBasis]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const { AST_TYPES } = parsers;
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length) {
- const flex = {
- [flexGrow.property]: "1",
- [flexShrink.property]: "1",
- [flexBasis.property]: "0%"
- };
- if (value.length === 1) {
- const [{ isNumber, name, type, unit, value: itemValue }] = value;
- switch (type) {
- case AST_TYPES.CALC: {
- if (isNumber) {
- flex[flexGrow.property] = `${name}(${itemValue})`;
- return flex;
- }
- flex[flexBasis.property] = `${name}(${itemValue})`;
- return flex;
- }
- case AST_TYPES.DIMENSION: {
- flex[flexBasis.property] = `${itemValue}${unit}`;
- return flex;
- }
- case AST_TYPES.GLOBAL_KEYWORD: {
- return name;
- }
- case AST_TYPES.IDENTIFIER: {
- if (name === "none") {
- return {
- [flexGrow.property]: "0",
- [flexShrink.property]: "0",
- [flexBasis.property]: "auto"
- };
- }
- flex[flexBasis.property] = name;
- return flex;
- }
- case AST_TYPES.NUMBER: {
- flex[flexGrow.property] = itemValue;
- return flex;
- }
- case AST_TYPES.PERCENTAGE: {
- flex[flexBasis.property] = `${itemValue}%`;
- return flex;
- }
- default:
- }
- } else {
- const [val1, val2, val3] = value;
- if (val1.type === AST_TYPES.CALC && val1.isNumber) {
- flex[flexGrow.property] = `${val1.name}(${val1.value})`;
- } else if (val1.type === AST_TYPES.NUMBER) {
- flex[flexGrow.property] = val1.value;
- } else {
- return;
- }
- if (val3) {
- if (val2.type === AST_TYPES.CALC && val2.isNumber) {
- flex[flexShrink.property] = `${val2.name}(${val2.value})`;
- } else if (val2.type === AST_TYPES.NUMBER) {
- flex[flexShrink.property] = val2.value;
- } else {
- return;
- }
- if (val3.type === AST_TYPES.GLOBAL_KEYWORD || val3.type === AST_TYPES.IDENTIFIER) {
- flex[flexBasis.property] = val3.name;
- } else if (val3.type === AST_TYPES.CALC && !val3.isNumber) {
- flex[flexBasis.property] = `${val3.name}(${val3.value})`;
- } else if (val3.type === AST_TYPES.DIMENSION) {
- flex[flexBasis.property] = `${val3.value}${val3.unit}`;
- } else if (val3.type === AST_TYPES.PERCENTAGE) {
- flex[flexBasis.property] = `${val3.value}%`;
- } else {
- return;
- }
- } else {
- switch (val2.type) {
- case AST_TYPES.CALC: {
- if (val2.isNumber) {
- flex[flexShrink.property] = `${val2.name}(${val2.value})`;
- } else {
- flex[flexBasis.property] = `${val2.name}(${val2.value})`;
- }
- break;
- }
- case AST_TYPES.DIMENSION: {
- flex[flexBasis.property] = `${val2.value}${val2.unit}`;
- break;
- }
- case AST_TYPES.NUMBER: {
- flex[flexShrink.property] = val2.value;
- break;
- }
- case AST_TYPES.PERCENTAGE: {
- flex[flexBasis.property] = `${val2.value}%`;
- break;
- }
- case AST_TYPES.IDENTIFIER: {
- flex[flexBasis.property] = val2.name;
- break;
- }
- default: {
- return;
- }
- }
- }
- return flex;
- }
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- for (const [longhand] of module.exports.shorthandFor) {
- this._setProperty(longhand, "");
- }
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- const priority = this._priorities.get(property) ?? "";
- if (typeof val === "string") {
- for (const [longhand] of module.exports.shorthandFor) {
- this._setProperty(longhand, val, priority);
- }
- this._setProperty(property, val, priority);
- } else if (val) {
- const values = [];
- for (const [longhand, value] of Object.entries(val)) {
- values.push(value);
- this._setProperty(longhand, value, priority);
- }
- this._setProperty(property, values.join(" "), priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/flexBasis.js b/vanilla/node_modules/cssstyle/lib/properties/flexBasis.js
deleted file mode 100644
index 68bebc2..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/flexBasis.js
+++ /dev/null
@@ -1,52 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "flex-basis";
-const shorthand = "flex";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._flexBoxSetter(property, val, priority, shorthand);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/flexGrow.js b/vanilla/node_modules/cssstyle/lib/properties/flexGrow.js
deleted file mode 100644
index 7789021..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/flexGrow.js
+++ /dev/null
@@ -1,52 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "flex-grow";
-const shorthand = "flex";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue("flex-grow", v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._flexBoxSetter(property, val, priority, shorthand);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/flexShrink.js b/vanilla/node_modules/cssstyle/lib/properties/flexShrink.js
deleted file mode 100644
index ed0abb4..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/flexShrink.js
+++ /dev/null
@@ -1,52 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "flex-shrink";
-const shorthand = "flex";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._flexBoxSetter(property, val, priority, shorthand);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/float.js b/vanilla/node_modules/cssstyle/lib/properties/float.js
deleted file mode 100644
index 7080260..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/float.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "float";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveKeywordValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/floodColor.js b/vanilla/node_modules/cssstyle/lib/properties/floodColor.js
deleted file mode 100644
index 7ef4fe8..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/floodColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "flood-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/font.js b/vanilla/node_modules/cssstyle/lib/properties/font.js
deleted file mode 100644
index 17897f3..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/font.js
+++ /dev/null
@@ -1,302 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const fontStyle = require("./fontStyle");
-const fontVariant = require("./fontVariant");
-const fontWeight = require("./fontWeight");
-const fontSize = require("./fontSize");
-const lineHeight = require("./lineHeight");
-const fontFamily = require("./fontFamily");
-
-const property = "font";
-
-module.exports.shorthandFor = new Map([
- [fontStyle.property, fontStyle],
- [fontVariant.property, fontVariant],
- [fontWeight.property, fontWeight],
- [fontSize.property, fontSize],
- [lineHeight.property, lineHeight],
- [fontFamily.property, fontFamily]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- } else if (parsers.hasCalcFunc(v)) {
- v = parsers.resolveCalc(v);
- }
- if (!parsers.isValidPropertyValue(property, v)) {
- return;
- }
- const { AST_TYPES } = parsers;
- const [fontBlock, ...families] = parsers.splitValue(v, {
- delimiter: ","
- });
- const [fontBlockA, fontBlockB] = parsers.splitValue(fontBlock, {
- delimiter: "/"
- });
- const font = {
- [fontStyle.property]: "normal",
- [fontVariant.property]: "normal",
- [fontWeight.property]: "normal"
- };
- const fontFamilies = new Set();
- if (fontBlockB) {
- const [lineB, ...familiesB] = fontBlockB.trim().split(" ");
- if (!lineB || !familiesB.length) {
- return;
- }
- const lineHeightB = lineHeight.parse(lineB, {
- global
- });
- if (typeof lineHeightB !== "string") {
- return;
- }
- const familyB = fontFamily.parse(familiesB.join(" "), {
- globalObject,
- caseSensitive: true
- });
- if (typeof familyB === "string") {
- fontFamilies.add(familyB);
- } else {
- return;
- }
- const parts = parsers.splitValue(fontBlockA.trim());
- const properties = [
- fontStyle.property,
- fontVariant.property,
- fontWeight.property,
- fontSize.property
- ];
- for (const part of parts) {
- if (part === "normal") {
- continue;
- } else {
- for (const longhand of properties) {
- switch (longhand) {
- case fontSize.property: {
- const parsedValue = fontSize.parse(part, {
- globalObject
- });
- if (typeof parsedValue === "string") {
- font[longhand] = parsedValue;
- }
- break;
- }
- case fontStyle.property:
- case fontWeight.property: {
- if (font[longhand] === "normal") {
- const longhandItem = module.exports.shorthandFor.get(longhand);
- const parsedValue = longhandItem.parse(part, {
- globalObject
- });
- if (typeof parsedValue === "string") {
- font[longhand] = parsedValue;
- }
- }
- break;
- }
- case fontVariant.property: {
- if (font[longhand] === "normal") {
- const parsedValue = fontVariant.parse(part, {
- globalObject
- });
- if (typeof parsedValue === "string") {
- if (parsedValue === "small-cap") {
- font[longhand] = parsedValue;
- } else if (parsedValue !== "normal") {
- return;
- }
- }
- }
- break;
- }
- default:
- }
- }
- }
- }
- if (Object.hasOwn(font, fontSize.property)) {
- font[lineHeight.property] = lineHeightB;
- } else {
- return;
- }
- } else {
- const revParts = parsers.splitValue(fontBlockA.trim()).toReversed();
- if (revParts.length === 1) {
- const [part] = revParts;
- const value = parsers.parsePropertyValue(property, part, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const [{ name, type }] = value;
- if (type === AST_TYPES.GLOBAL_KEYWORD) {
- return {
- [fontStyle.property]: name,
- [fontVariant.property]: name,
- [fontWeight.property]: name,
- [fontSize.property]: name,
- [lineHeight.property]: name,
- [fontFamily.property]: name
- };
- }
- }
- return;
- }
- const properties = [
- fontStyle.property,
- fontVariant.property,
- fontWeight.property,
- lineHeight.property
- ];
- for (const longhand of properties) {
- font[longhand] = "normal";
- }
- const revFontFamily = [];
- let fontSizeA;
- for (const part of revParts) {
- if (fontSizeA) {
- if (/^normal$/i.test(part)) {
- continue;
- } else {
- for (const longhand of properties) {
- switch (longhand) {
- case fontStyle.property:
- case fontWeight.property:
- case lineHeight.property: {
- if (font[longhand] === "normal") {
- const longhandItem = module.exports.shorthandFor.get(longhand);
- const parsedValue = longhandItem.parse(part, {
- globalObject
- });
- if (typeof parsedValue === "string") {
- font[longhand] = parsedValue;
- }
- }
- break;
- }
- case fontVariant.property: {
- if (font[longhand] === "normal") {
- const parsedValue = fontVariant.parse(part, {
- globalObject
- });
- if (typeof parsedValue === "string") {
- if (parsedValue === "small-cap") {
- font[longhand] = parsedValue;
- } else if (parsedValue !== "normal") {
- return;
- }
- }
- }
- break;
- }
- default:
- }
- }
- }
- } else {
- const parsedFontSize = fontSize.parse(part, {
- globalObject
- });
- if (typeof parsedFontSize === "string") {
- fontSizeA = parsedFontSize;
- } else {
- const parsedFontFamily = fontFamily.parse(part, {
- globalObject,
- caseSensitive: true
- });
- if (typeof parsedFontFamily === "string") {
- revFontFamily.push(parsedFontFamily);
- } else {
- return;
- }
- }
- }
- }
- const family = fontFamily.parse(revFontFamily.toReversed().join(" "), {
- globalObject,
- caseSensitive: true
- });
- if (fontSizeA && family) {
- font[fontSize.property] = fontSizeA;
- fontFamilies.add(fontFamily.parse(family));
- } else {
- return;
- }
- }
- for (const family of families) {
- const parsedFontFamily = fontFamily.parse(family, {
- globalObject,
- caseSensitive: true
- });
- if (parsedFontFamily) {
- fontFamilies.add(parsedFontFamily);
- } else {
- return;
- }
- }
- font[fontFamily.property] = [...fontFamilies].join(", ");
- return font;
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (v === "" || parsers.hasVarFunc(v)) {
- for (const [key] of module.exports.shorthandFor) {
- this._setProperty(key, "");
- }
- this._setProperty(property, v);
- } else {
- const obj = module.exports.parse(v, {
- globalObject: this._global
- });
- if (!obj) {
- return;
- }
- const priority = this._priorities.get(property) ?? "";
- const str = new Set();
- for (const [key] of module.exports.shorthandFor) {
- const val = obj[key];
- if (typeof val === "string") {
- this._setProperty(key, val, priority);
- if (val && val !== "normal" && !str.has(val)) {
- if (key === lineHeight.property) {
- str.add(`/ ${val}`);
- } else {
- str.add(val);
- }
- }
- }
- }
- this._setProperty(property, [...str].join(" "), priority);
- }
- },
- get() {
- const val = this.getPropertyValue(property);
- if (parsers.hasVarFunc(val)) {
- return val;
- }
- const str = new Set();
- for (const [key] of module.exports.shorthandFor) {
- const v = this.getPropertyValue(key);
- if (parsers.hasVarFunc(v)) {
- return "";
- }
- if (v && v !== "normal" && !str.has(v)) {
- if (key === lineHeight.property) {
- str.add(`/ ${v}`);
- } else {
- str.add(`${v}`);
- }
- }
- }
- return [...str].join(" ");
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/fontFamily.js b/vanilla/node_modules/cssstyle/lib/properties/fontFamily.js
deleted file mode 100644
index e3fc7ee..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/fontFamily.js
+++ /dev/null
@@ -1,98 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "font-family";
-const shorthand = "font";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const { AST_TYPES } = parsers;
- const values = parsers.splitValue(v, {
- delimiter: ","
- });
- const parsedValues = [];
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- caseSensitive: true,
- inArray: true
- });
- if (Array.isArray(value) && value.length) {
- if (value.length === 1) {
- const [{ name, type, value: itemValue }] = value;
- switch (type) {
- case AST_TYPES.FUNCTION: {
- parsedValues.push(`${name}(${itemValue})`);
- break;
- }
- case AST_TYPES.GLOBAL_KEYWORD:
- case AST_TYPES.IDENTIFIER: {
- if (name === "undefined") {
- return;
- }
- parsedValues.push(name);
- break;
- }
- case "String": {
- const parsedValue = itemValue.replaceAll("\\", "").replaceAll('"', '\\"');
- parsedValues.push(`"${parsedValue}"`);
- break;
- }
- default: {
- return;
- }
- }
- } else {
- const parts = [];
- for (const item of value) {
- const { name, type } = item;
- if (type !== AST_TYPES.IDENTIFIER) {
- return;
- }
- parts.push(name);
- }
- const parsedValue = parts.join(" ").replaceAll("\\", "").replaceAll('"', '\\"');
- parsedValues.push(`"${parsedValue}"`);
- }
- } else if (typeof value === "string") {
- parsedValues.push(value);
- } else {
- return;
- }
- }
- if (parsedValues.length) {
- return parsedValues.join(", ");
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/fontSize.js b/vanilla/node_modules/cssstyle/lib/properties/fontSize.js
deleted file mode 100644
index 80b015e..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/fontSize.js
+++ /dev/null
@@ -1,53 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "font-size";
-const shorthand = "font";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0,
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/fontStyle.js b/vanilla/node_modules/cssstyle/lib/properties/fontStyle.js
deleted file mode 100644
index f07a17d..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/fontStyle.js
+++ /dev/null
@@ -1,69 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "font-style";
-const shorthand = "font";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const { AST_TYPES } = parsers;
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length) {
- if (value.length === 1) {
- const [{ name, type }] = value;
- switch (type) {
- case AST_TYPES.GLOBAL_KEYWORD:
- case AST_TYPES.IDENTIFIER: {
- return name;
- }
- default:
- }
- } else if (value.length === 2) {
- const [part1, part2] = value;
- const val1 = part1.type === AST_TYPES.IDENTIFIER && part1.name;
- const val2 = parsers.resolveNumericValue([part2], {
- type: "angle"
- });
- if (val1 && val1 === "oblique" && val2) {
- return `${val1} ${val2}`;
- }
- }
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/fontVariant.js b/vanilla/node_modules/cssstyle/lib/properties/fontVariant.js
deleted file mode 100644
index 515b75e..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/fontVariant.js
+++ /dev/null
@@ -1,66 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "font-variant";
-const shorthand = "font";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.splitValue(v);
- const parsedValues = [];
- for (const val of values) {
- const value = parsers.parsePropertyValue(property, val, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const parsedValue = parsers.resolveFunctionValue(value);
- if (!parsedValue) {
- return;
- }
- parsedValues.push(parsedValue);
- } else if (typeof value === "string") {
- parsedValues.push(value);
- }
- }
- if (parsedValues.length) {
- if (parsedValues.length > 1) {
- if (parsedValues.includes("normal") || parsedValues.includes("none")) {
- return;
- }
- }
- return parsedValues.join(" ");
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/fontWeight.js b/vanilla/node_modules/cssstyle/lib/properties/fontWeight.js
deleted file mode 100644
index 8087e07..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/fontWeight.js
+++ /dev/null
@@ -1,57 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "font-weight";
-const shorthand = "font";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- const parsedValue = parsers.resolveNumericValue(value, {
- min: 1,
- max: 1000
- });
- if (!parsedValue) {
- return;
- }
- return parsedValue;
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/height.js b/vanilla/node_modules/cssstyle/lib/properties/height.js
deleted file mode 100644
index 1e3bd78..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/height.js
+++ /dev/null
@@ -1,48 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "height";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0,
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/left.js b/vanilla/node_modules/cssstyle/lib/properties/left.js
deleted file mode 100644
index 8cea211..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/left.js
+++ /dev/null
@@ -1,47 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "left";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/lightingColor.js b/vanilla/node_modules/cssstyle/lib/properties/lightingColor.js
deleted file mode 100644
index a007bd5..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/lightingColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "lighting-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/lineHeight.js b/vanilla/node_modules/cssstyle/lib/properties/lineHeight.js
deleted file mode 100644
index e1f4b37..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/lineHeight.js
+++ /dev/null
@@ -1,52 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "line-height";
-const shorthand = "font";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/margin.js b/vanilla/node_modules/cssstyle/lib/properties/margin.js
deleted file mode 100644
index ffb8704..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/margin.js
+++ /dev/null
@@ -1,77 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const marginTop = require("./marginTop");
-const marginRight = require("./marginRight");
-const marginBottom = require("./marginBottom");
-const marginLeft = require("./marginLeft");
-
-const property = "margin";
-
-module.exports.position = "edges";
-
-module.exports.shorthandFor = new Map([
- [marginTop.property, marginTop],
- [marginRight.property, marginRight],
- [marginBottom.property, marginBottom],
- [marginLeft.property, marginLeft]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- const parsedValues = [];
- if (Array.isArray(values) && values.length) {
- if (values.length > 4) {
- return;
- }
- for (const value of values) {
- const parsedValue = parsers.resolveNumericValue([value], {
- length: values.length,
- type: "length"
- });
- if (!parsedValue) {
- return;
- }
- parsedValues.push(parsedValue);
- }
- } else if (typeof values === "string") {
- parsedValues.push(values);
- }
- if (parsedValues.length) {
- return parsedValues;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- for (const [longhand] of module.exports.shorthandFor) {
- this._setProperty(longhand, "");
- }
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (Array.isArray(val) || typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._positionShorthandSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/marginBottom.js b/vanilla/node_modules/cssstyle/lib/properties/marginBottom.js
deleted file mode 100644
index c3b1e0b..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/marginBottom.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "margin-bottom";
-const shorthand = "margin";
-
-module.exports.position = "bottom";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._positionLonghandSetter(property, val, priority, shorthand);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/marginLeft.js b/vanilla/node_modules/cssstyle/lib/properties/marginLeft.js
deleted file mode 100644
index f70fe4a..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/marginLeft.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "margin-left";
-const shorthand = "margin";
-
-module.exports.position = "left";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._positionLonghandSetter(property, val, priority, shorthand);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/marginRight.js b/vanilla/node_modules/cssstyle/lib/properties/marginRight.js
deleted file mode 100644
index 8ec0234..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/marginRight.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "margin-right";
-const shorthand = "margin";
-
-module.exports.position = "right";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._positionLonghandSetter(property, val, priority, shorthand);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/marginTop.js b/vanilla/node_modules/cssstyle/lib/properties/marginTop.js
deleted file mode 100644
index af8f842..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/marginTop.js
+++ /dev/null
@@ -1,54 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "margin-top";
-const shorthand = "margin";
-
-module.exports.position = "top";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._positionLonghandSetter(property, val, priority, shorthand);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/opacity.js b/vanilla/node_modules/cssstyle/lib/properties/opacity.js
deleted file mode 100644
index 119fd28..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/opacity.js
+++ /dev/null
@@ -1,47 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "opacity";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- clamp: true
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/outlineColor.js b/vanilla/node_modules/cssstyle/lib/properties/outlineColor.js
deleted file mode 100644
index 6e44b5a..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/outlineColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "outline-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/padding.js b/vanilla/node_modules/cssstyle/lib/properties/padding.js
deleted file mode 100644
index 0168aa6..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/padding.js
+++ /dev/null
@@ -1,78 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-const paddingTop = require("./paddingTop");
-const paddingRight = require("./paddingRight");
-const paddingBottom = require("./paddingBottom");
-const paddingLeft = require("./paddingLeft");
-
-const property = "padding";
-
-module.exports.position = "edges";
-
-module.exports.shorthandFor = new Map([
- [paddingTop.property, paddingTop],
- [paddingRight.property, paddingRight],
- [paddingBottom.property, paddingBottom],
- [paddingLeft.property, paddingLeft]
-]);
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const values = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- const parsedValues = [];
- if (Array.isArray(values) && values.length) {
- if (values.length > 4) {
- return;
- }
- for (const value of values) {
- const parsedValue = parsers.resolveNumericValue([value], {
- length: values.length,
- min: 0,
- type: "length"
- });
- if (!parsedValue) {
- return;
- }
- parsedValues.push(parsedValue);
- }
- } else if (typeof values === "string") {
- parsedValues.push(values);
- }
- if (parsedValues.length) {
- return parsedValues;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- for (const [longhand] of module.exports.shorthandFor) {
- this._setProperty(longhand, "");
- }
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (Array.isArray(val) || typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._positionShorthandSetter(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/paddingBottom.js b/vanilla/node_modules/cssstyle/lib/properties/paddingBottom.js
deleted file mode 100644
index 0b03592..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/paddingBottom.js
+++ /dev/null
@@ -1,55 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "padding-bottom";
-const shorthand = "padding";
-
-module.exports.position = "bottom";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0,
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._positionLonghandSetter(property, val, priority, shorthand);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/paddingLeft.js b/vanilla/node_modules/cssstyle/lib/properties/paddingLeft.js
deleted file mode 100644
index 1b6b13e..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/paddingLeft.js
+++ /dev/null
@@ -1,55 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "padding-left";
-const shorthand = "padding";
-
-module.exports.position = "left";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0,
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._positionLonghandSetter(property, val, priority, shorthand);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/paddingRight.js b/vanilla/node_modules/cssstyle/lib/properties/paddingRight.js
deleted file mode 100644
index f7088bd..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/paddingRight.js
+++ /dev/null
@@ -1,55 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "padding-right";
-const shorthand = "padding";
-
-module.exports.position = "right";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0,
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._positionLonghandSetter(property, val, priority, shorthand);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/paddingTop.js b/vanilla/node_modules/cssstyle/lib/properties/paddingTop.js
deleted file mode 100644
index 32e9f76..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/paddingTop.js
+++ /dev/null
@@ -1,55 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "padding-top";
-const shorthand = "padding";
-
-module.exports.position = "top";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0,
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(shorthand, "");
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority =
- !this._priorities.get(shorthand) && this._priorities.has(property)
- ? this._priorities.get(property)
- : "";
- this._positionLonghandSetter(property, val, priority, shorthand);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/right.js b/vanilla/node_modules/cssstyle/lib/properties/right.js
deleted file mode 100644
index a28687a..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/right.js
+++ /dev/null
@@ -1,47 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "right";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/stopColor.js b/vanilla/node_modules/cssstyle/lib/properties/stopColor.js
deleted file mode 100644
index 4ab8871..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/stopColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "stop-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/top.js b/vanilla/node_modules/cssstyle/lib/properties/top.js
deleted file mode 100644
index 29794a8..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/top.js
+++ /dev/null
@@ -1,47 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "top";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js b/vanilla/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js
deleted file mode 100644
index 7190ec3..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "-webkit-border-after-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js b/vanilla/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js
deleted file mode 100644
index f6008ff..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "-webkit-border-before-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js b/vanilla/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js
deleted file mode 100644
index 3870118..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "-webkit-border-end-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js b/vanilla/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js
deleted file mode 100644
index 96bec13..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "-webkit-border-start-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js b/vanilla/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js
deleted file mode 100644
index 087695f..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "-webkit-column-rule-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js b/vanilla/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js
deleted file mode 100644
index abda140..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "-webkit-tap-highlight-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js b/vanilla/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js
deleted file mode 100644
index 049babe..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "-webkit-text-emphasis-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/webkitTextFillColor.js b/vanilla/node_modules/cssstyle/lib/properties/webkitTextFillColor.js
deleted file mode 100644
index 027835d..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/webkitTextFillColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "-webkit-text-fill-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js b/vanilla/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js
deleted file mode 100644
index e4f7224..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "-webkit-text-stroke-color";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveColorValue(value);
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;
diff --git a/vanilla/node_modules/cssstyle/lib/properties/width.js b/vanilla/node_modules/cssstyle/lib/properties/width.js
deleted file mode 100644
index 91d5a1a..0000000
--- a/vanilla/node_modules/cssstyle/lib/properties/width.js
+++ /dev/null
@@ -1,48 +0,0 @@
-"use strict";
-
-const parsers = require("../parsers");
-
-const property = "width";
-
-module.exports.parse = (v, opt = {}) => {
- const { globalObject } = opt;
- if (v === "") {
- return v;
- }
- const value = parsers.parsePropertyValue(property, v, {
- globalObject,
- inArray: true
- });
- if (Array.isArray(value) && value.length === 1) {
- return parsers.resolveNumericValue(value, {
- min: 0,
- type: "length"
- });
- } else if (typeof value === "string") {
- return value;
- }
-};
-
-module.exports.definition = {
- set(v) {
- v = parsers.prepareValue(v);
- if (parsers.hasVarFunc(v)) {
- this._setProperty(property, v);
- } else {
- const val = module.exports.parse(v, {
- globalObject: this._global
- });
- if (typeof val === "string") {
- const priority = this._priorities.get(property) ?? "";
- this._setProperty(property, val, priority);
- }
- }
- },
- get() {
- return this.getPropertyValue(property);
- },
- enumerable: true,
- configurable: true
-};
-
-module.exports.property = property;