cssstyle
Version:
CSSStyleDeclaration Object Model implementation
1,486 lines (1,484 loc) • 113 kB
JavaScript
"use strict";
// autogenerated - 2025-07-14
// https://www.w3.org/Style/CSS/all-properties.en.html
var external_dependency_parsers_0 = require("../parsers.js");
var external_dependency_strings_1 = require("../utils/strings.js");
var backgroundImage_export_parse, backgroundImage_export_isValid, backgroundImage_export_definition;
backgroundImage_export_parse = function parse(v) {
if (v === "") {
return v;
}
const values = external_dependency_parsers_0.splitValue(v, {
delimiter: ","
});
const parsedValues = [];
for (const value of values) {
const parsedValue = external_dependency_parsers_0.parseImage(value);
if (parsedValue) {
parsedValues.push(parsedValue);
} else {
return;
}
}
if (parsedValues.length) {
return parsedValues.join(", ");
}
};
backgroundImage_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof backgroundImage_export_parse(v) === "string";
};
backgroundImage_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("background", "");
this._setProperty("background-image", v);
} else {
this._setProperty("background-image", backgroundImage_export_parse(v));
}
},
get() {
return this.getPropertyValue("background-image");
},
enumerable: true,
configurable: true
};
var backgroundPosition_export_parse, backgroundPosition_export_isValid, backgroundPosition_export_definition;
backgroundPosition_export_parse = function parse(v) {
if (v === "") {
return v;
}
const values = external_dependency_parsers_0.splitValue(v, {
delimiter: ","
});
const keyX = ["left", "right"];
const keyY = ["top", "bottom"];
const keywordsX = ["center", ...keyX];
const keywordsY = ["center", ...keyY];
const keywords = ["center", ...keyX, ...keyY];
const parsedValues = [];
for (const value of values) {
const parts = external_dependency_parsers_0.splitValue(value);
if (!parts.length || parts.length > 4) {
return;
}
let parsedValue = "";
switch (parts.length) {
case 1:
{
const [part] = parts;
const val = external_dependency_parsers_0.parseMeasurement(part) || external_dependency_parsers_0.parseKeyword(part, keywords);
if (val) {
if (val === "center") {
parsedValue = `${val} ${val}`;
} else if (val === "top" || val === "bottom") {
parsedValue = `center ${val}`;
} else {
parsedValue = `${val} center`;
}
}
break;
}
case 2:
{
const [part1, part2] = parts;
const val1 = external_dependency_parsers_0.parseMeasurement(part1) || external_dependency_parsers_0.parseKeyword(part1, keywords);
const val2 = external_dependency_parsers_0.parseMeasurement(part2) || external_dependency_parsers_0.parseKeyword(part2, keywords);
if (val1 && val2) {
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 [part1, part2, part3] = parts;
const val1 = external_dependency_parsers_0.parseKeyword(part1, keywords);
const val2 = external_dependency_parsers_0.parseMeasurement(part2) || external_dependency_parsers_0.parseKeyword(part2, keywords);
const val3 = external_dependency_parsers_0.parseMeasurement(part3) || external_dependency_parsers_0.parseKeyword(part3, keywords);
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:
default:
{
const [part1, part2, part3, part4] = parts;
const val1 = external_dependency_parsers_0.parseKeyword(part1, keywords);
const val2 = external_dependency_parsers_0.parseMeasurement(part2);
const val3 = external_dependency_parsers_0.parseKeyword(part3, keywords);
const val4 = external_dependency_parsers_0.parseMeasurement(part4);
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}`;
}
}
}
}
if (parsedValue) {
parsedValues.push(parsedValue);
} else {
return;
}
}
if (parsedValues.length) {
return parsedValues.join(", ");
}
};
backgroundPosition_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof backgroundPosition_export_parse(v) === "string";
};
backgroundPosition_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("background", "");
this._setProperty("background-position", v);
} else {
this._setProperty("background-position", backgroundPosition_export_parse(v));
}
},
get() {
return this.getPropertyValue("background-position");
},
enumerable: true,
configurable: true
};
var backgroundSize_export_parse, backgroundSize_export_isValid, backgroundSize_export_definition;
backgroundSize_export_parse = function parse(v) {
if (v === "") {
return v;
}
const values = external_dependency_parsers_0.splitValue(v, {
delimiter: ","
});
const keywordsRatio = ["contain", "cover"];
const keywordsRepeat = ["auto"];
const keywords = [...keywordsRatio, ...keywordsRepeat];
const parsedValues = [];
for (const value of values) {
const parts = external_dependency_parsers_0.splitValue(value);
if (!parts.length || parts.length > 2) {
return;
}
let parsedValue = "";
switch (parts.length) {
case 1:
{
const [part] = parts;
const val = external_dependency_parsers_0.parseMeasurement(part, true) || external_dependency_parsers_0.parseKeyword(part, keywords);
if (val) {
parsedValue = val;
}
break;
}
case 2:
default:
{
const [part1, part2] = parts;
const val1 = external_dependency_parsers_0.parseMeasurement(part1, true) || external_dependency_parsers_0.parseKeyword(part1, keywordsRepeat);
const val2 = external_dependency_parsers_0.parseMeasurement(part2, true) || external_dependency_parsers_0.parseKeyword(part2, keywordsRepeat);
if (val1 && val2) {
if (val2 === "auto") {
parsedValue = val1;
} else {
parsedValue = `${val1} ${val2}`;
}
}
}
}
if (parsedValue) {
parsedValues.push(parsedValue);
} else {
return;
}
}
if (parsedValues.length) {
return parsedValues.join(", ");
}
};
backgroundSize_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof backgroundSize_export_parse(v) === "string";
};
backgroundSize_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("background", "");
this._setProperty("background-size", v);
} else {
this._setProperty("background-size", backgroundSize_export_parse(v));
}
},
get() {
return this.getPropertyValue("background-size");
},
enumerable: true,
configurable: true
};
var backgroundRepeat_export_parse, backgroundRepeat_export_isValid, backgroundRepeat_export_definition;
backgroundRepeat_export_parse = function parse(v) {
if (v === "") {
return v;
}
const values = external_dependency_parsers_0.splitValue(v, {
delimiter: ","
});
const keywordsAxis = ["repeat-x", "repeat-y"];
const keywordsRepeat = ["repeat", "no-repeat", "space", "round"];
const keywords = [...keywordsAxis, ...keywordsRepeat];
const parsedValues = [];
for (const value of values) {
const parts = external_dependency_parsers_0.splitValue(value);
if (!parts.length || parts.length > 2) {
return;
}
let parsedValue = "";
switch (parts.length) {
case 1:
{
const [part] = parts;
const val = external_dependency_parsers_0.parseKeyword(part, keywords);
if (val) {
parsedValue = val;
}
break;
}
case 2:
default:
{
const [part1, part2] = parts;
const val1 = external_dependency_parsers_0.parseKeyword(part1, keywordsRepeat);
const val2 = external_dependency_parsers_0.parseKeyword(part2, keywordsRepeat);
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}`;
}
}
}
}
if (parsedValue) {
parsedValues.push(parsedValue);
} else {
return;
}
}
if (parsedValues.length) {
return parsedValues.join(", ");
}
};
backgroundRepeat_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof backgroundRepeat_export_parse(v) === "string";
};
backgroundRepeat_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("background", "");
this._setProperty("background-repeat", v);
} else {
this._setProperty("background-repeat", backgroundRepeat_export_parse(v));
}
},
get() {
return this.getPropertyValue("background-repeat");
},
enumerable: true,
configurable: true
};
var backgroundOrigin_export_parse, backgroundOrigin_export_isValid, backgroundOrigin_export_definition;
backgroundOrigin_export_parse = function parse(v) {
if (v === "") {
return v;
}
const values = external_dependency_parsers_0.splitValue(v, {
delimiter: ","
});
const keywords = ["border-box", "padding-box", "content-box"];
const parsedValues = [];
for (const value of values) {
const parsedValue = external_dependency_parsers_0.parseKeyword(value, keywords);
if (parsedValue) {
parsedValues.push(parsedValue);
} else {
return;
}
}
if (parsedValues.length) {
return parsedValues.join(", ");
}
};
backgroundOrigin_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof backgroundOrigin_export_parse(v) === "string";
};
backgroundOrigin_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("background", "");
this._setProperty("background-origin", v);
} else {
this._setProperty("background-origin", backgroundOrigin_export_parse(v));
}
},
get() {
return this.getPropertyValue("background-origin");
},
enumerable: true,
configurable: true
};
var backgroundClip_export_parse, backgroundClip_export_isValid, backgroundClip_export_definition;
backgroundClip_export_parse = function parse(v) {
if (v === "") {
return v;
}
const values = external_dependency_parsers_0.splitValue(v, {
delimiter: ","
});
const keywords = ["border-box", "padding-box", "content-box"];
const parsedValues = [];
for (const value of values) {
const parsedValue = external_dependency_parsers_0.parseKeyword(value, keywords);
if (parsedValue) {
parsedValues.push(parsedValue);
} else {
return;
}
}
if (parsedValues.length) {
return parsedValues.join(", ");
}
};
backgroundClip_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof backgroundClip_export_parse(v) === "string";
};
backgroundClip_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("background", "");
this._setProperty("background-clip", v);
} else {
this._setProperty("background-clip", backgroundClip_export_parse(v));
}
},
get() {
return this.getPropertyValue("background-clip");
},
enumerable: true,
configurable: true
};
var backgroundAttachment_export_parse, backgroundAttachment_export_isValid, backgroundAttachment_export_definition;
backgroundAttachment_export_parse = function parse(v) {
if (v === "") {
return v;
}
const values = external_dependency_parsers_0.splitValue(v, {
delimiter: ","
});
const keywords = ["fixed", "scroll", "local"];
const parsedValues = [];
for (const value of values) {
const parsedValue = external_dependency_parsers_0.parseKeyword(value, keywords);
if (parsedValue) {
parsedValues.push(parsedValue);
} else {
return;
}
}
if (parsedValues.length) {
return parsedValues.join(", ");
}
};
backgroundAttachment_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof backgroundAttachment_export_parse(v) === "string";
};
backgroundAttachment_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("background", "");
this._setProperty("background-attachment", v);
} else {
this._setProperty("background-attachment", backgroundAttachment_export_parse(v));
}
},
get() {
return this.getPropertyValue("background-attachment");
},
enumerable: true,
configurable: true
};
var backgroundColor_export_parse, backgroundColor_export_isValid, backgroundColor_export_definition;
backgroundColor_export_parse = function parse(v) {
const val = external_dependency_parsers_0.parseColor(v);
if (val) {
return val;
}
return external_dependency_parsers_0.parseKeyword(v);
};
backgroundColor_export_isValid = function isValid(v) {
if (v === "" || typeof external_dependency_parsers_0.parseKeyword(v) === "string") {
return true;
}
return external_dependency_parsers_0.isValidColor(v);
};
backgroundColor_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("background", "");
this._setProperty("background-color", v);
} else {
this._setProperty("background-color", backgroundColor_export_parse(v));
}
},
get() {
return this.getPropertyValue("background-color");
},
enumerable: true,
configurable: true
};
var background_export_shorthandFor, background_export_parse, background_export_definition;
background_export_shorthandFor = new Map([["background-image", {
parse: backgroundImage_export_parse,
isValid: backgroundImage_export_isValid,
definition: backgroundImage_export_definition
}], ["background-position", {
parse: backgroundPosition_export_parse,
isValid: backgroundPosition_export_isValid,
definition: backgroundPosition_export_definition
}], ["background-size", {
parse: backgroundSize_export_parse,
isValid: backgroundSize_export_isValid,
definition: backgroundSize_export_definition
}], ["background-repeat", {
parse: backgroundRepeat_export_parse,
isValid: backgroundRepeat_export_isValid,
definition: backgroundRepeat_export_definition
}], ["background-origin", {
parse: backgroundOrigin_export_parse,
isValid: backgroundOrigin_export_isValid,
definition: backgroundOrigin_export_definition
}], ["background-clip", {
parse: backgroundClip_export_parse,
isValid: backgroundClip_export_isValid,
definition: backgroundClip_export_definition
}], ["background-attachment", {
parse: backgroundAttachment_export_parse,
isValid: backgroundAttachment_export_isValid,
definition: backgroundAttachment_export_definition
}], ["background-color", {
parse: backgroundColor_export_parse,
isValid: backgroundColor_export_isValid,
definition: backgroundColor_export_definition
}]]);
const background_local_var_initialValues = new Map([["background-image", "none"], ["background-position", "0% 0%"], ["background-size", "auto"], ["background-repeat", "repeat"], ["background-origin", "padding-box"], ["background-clip", "border-box"], ["background-attachment", "scroll"], ["background-color", "transparent"]]);
background_export_parse = function parse(v) {
const values = external_dependency_parsers_0.splitValue(v, {
delimiter: ","
});
const bgValues = [];
const l = values.length;
for (let i = 0; i < l; i++) {
let bg = {
"background-image": background_local_var_initialValues.get("background-image"),
"background-position": background_local_var_initialValues.get("background-position"),
"background-size": background_local_var_initialValues.get("background-size"),
"background-repeat": background_local_var_initialValues.get("background-repeat"),
"background-origin": background_local_var_initialValues.get("background-origin"),
"background-clip": background_local_var_initialValues.get("background-clip"),
"background-attachment": background_local_var_initialValues.get("background-attachment"),
"background-color": background_local_var_initialValues.get("background-color")
};
if (l > 1 && i !== l - 1) {
bg = {
"background-image": background_local_var_initialValues.get("background-image"),
"background-position": background_local_var_initialValues.get("background-position"),
"background-size": background_local_var_initialValues.get("background-size"),
"background-repeat": background_local_var_initialValues.get("background-repeat"),
"background-origin": background_local_var_initialValues.get("background-origin"),
"background-clip": background_local_var_initialValues.get("background-clip"),
"background-attachment": background_local_var_initialValues.get("background-attachment")
};
}
const bgPosition = [];
const bgSize = [];
const bgRepeat = [];
const bgBox = [];
const bgParts = external_dependency_parsers_0.splitValue(values[i], {
delimiter: "/"
});
if (!bgParts.length || bgParts.length > 2) {
return;
}
const [bgPart1, bgPart2 = ""] = bgParts;
const parts1 = external_dependency_parsers_0.splitValue(bgPart1);
for (const part of parts1) {
let partValid = false;
for (const [property, value] of background_export_shorthandFor) {
if (value.isValid(part)) {
partValid = true;
switch (property) {
case "background-clip":
case "background-origin":
{
const parsedValue = value.parse(part);
if (parsedValue) {
bgBox.push(parsedValue);
}
break;
}
case "background-color":
{
if (i !== values.length - 1) {
return;
}
const parsedValue = value.parse(part);
if (parsedValue) {
bg[property] = parsedValue;
}
break;
}
case "background-position":
{
const parsedValue = value.parse(part);
if (parsedValue) {
bgPosition.push(parsedValue);
}
break;
}
case "background-repeat":
{
const parsedValue = value.parse(part);
if (parsedValue) {
bgRepeat.push(parsedValue);
}
break;
}
case "background-size":
{
break;
}
default:
{
const parsedValue = value.parse(part);
if (parsedValue) {
bg[property] = parsedValue;
}
}
}
}
}
if (!partValid) {
return;
}
}
if (bgPart2) {
const parts2 = external_dependency_parsers_0.splitValue(bgPart2);
for (const part of parts2) {
let partValid = false;
for (const [property, value] of background_export_shorthandFor) {
if (value.isValid(part)) {
partValid = true;
switch (property) {
case "background-clip":
case "background-origin":
{
const parsedValue = value.parse(part);
if (parsedValue) {
bgBox.push(parsedValue);
}
break;
}
case "background-color":
{
if (i !== l - 1) {
return;
}
const parsedValue = value.parse(part);
if (parsedValue) {
bg[property] = parsedValue;
}
break;
}
case "background-position":
{
break;
}
case "background-repeat":
{
const parsedValue = value.parse(part);
if (parsedValue) {
bgRepeat.push(parsedValue);
}
break;
}
case "background-size":
{
const parsedValue = value.parse(part);
if (parsedValue) {
bgSize.push(parsedValue);
}
break;
}
default:
{
const parsedValue = value.parse(part);
if (parsedValue) {
bg[property] = parsedValue;
}
}
}
}
}
if (!partValid) {
return;
}
}
}
if (bgPosition.length) {
const {
parse: parser
} = background_export_shorthandFor.get("background-position");
const value = parser(bgPosition.join(" "));
if (value) {
bg["background-position"] = value;
}
}
if (bgSize.length) {
const {
parse: parser
} = background_export_shorthandFor.get("background-size");
const value = parser(bgSize.join(" "));
if (value) {
bg["background-size"] = value;
}
}
if (bgRepeat.length) {
const {
parse: parser
} = background_export_shorthandFor.get("background-repeat");
const value = parser(bgRepeat.join(" "));
if (value) {
bg["background-repeat"] = value;
}
}
if (bgBox.length) {
switch (bgBox.length) {
case 1:
{
const [value] = bgBox;
bg["background-origin"] = value;
bg["background-clip"] = value;
break;
}
case 2:
{
const [value1, value2] = bgBox;
bg["background-origin"] = value1;
bg["background-clip"] = value2;
break;
}
default:
{
return;
}
}
}
bgValues.push(bg);
}
return bgValues;
};
background_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (v === "" || external_dependency_parsers_0.hasVarFunc(v)) {
for (const [key] of background_export_shorthandFor) {
this._setProperty(key, "");
}
this._setProperty("background", v);
} else {
const bgValues = background_export_parse(v);
if (!Array.isArray(bgValues)) {
return;
}
const bgMap = new Map([["background-image", []], ["background-position", []], ["background-size", []], ["background-repeat", []], ["background-origin", []], ["background-clip", []], ["background-attachment", []], ["background-color", []]]);
const backgrounds = [];
for (const bgValue of bgValues) {
const bg = [];
for (const [property, value] of Object.entries(bgValue)) {
if (value) {
const arr = bgMap.get(property);
arr.push(value);
bgMap.set(property, arr);
if (value !== background_local_var_initialValues.get(property)) {
if (property === "background-size") {
bg.push(`/ ${value}`);
} else {
bg.push(value);
}
} else if (property === "background-image") {
if (v === "none") {
bg.push(value);
}
} else if (property === "background-color") {
if (v === "transparent") {
bg.push(value);
}
}
}
}
backgrounds.push(bg.join(" "));
}
for (const [property, value] of bgMap) {
this._setProperty(property, value.join(", "));
}
this._setProperty("background", backgrounds.join(", "));
}
},
get() {
const v = this.getPropertyValue("background");
if (external_dependency_parsers_0.hasVarFunc(v)) {
return v;
}
const bgMap = new Map();
let l = 0;
for (const [property] of background_export_shorthandFor) {
const val = this.getPropertyValue(property);
if (property === "background-image") {
if (val === "none" && v === "none" && this.getPropertyValue("background-color") === "transparent") {
return val;
}
if (val !== background_local_var_initialValues.get(property)) {
const imgValues = external_dependency_parsers_0.splitValue(val, {
delimiter: ","
});
l = imgValues.length;
bgMap.set(property, imgValues);
}
} else if (property === "background-color") {
if (val !== background_local_var_initialValues.get(property) || v.includes(val)) {
bgMap.set(property, [val]);
}
} else if (val !== background_local_var_initialValues.get(property)) {
bgMap.set(property, external_dependency_parsers_0.splitValue(val, {
delimiter: ","
}));
}
}
if (l === 0) {
const [background] = bgMap.get("background-color");
if (background) {
return background;
}
return "";
}
const bgValues = [];
for (let i = 0; i < l; i++) {
bgValues[i] = [];
}
for (const [property, values] of bgMap) {
for (let i = 0; i < l; i++) {
switch (property) {
case "background-color":
{
if (i === l - 1) {
const value = values[0];
if (external_dependency_parsers_0.hasVarFunc(value)) {
return "";
}
if (value && value !== background_local_var_initialValues.get(property)) {
const bgValue = bgValues[i];
bgValue.push(value);
}
}
break;
}
case "background-size":
{
const value = values[i];
if (external_dependency_parsers_0.hasVarFunc(value)) {
return "";
}
if (value && value !== background_local_var_initialValues.get(property)) {
const bgValue = bgValues[i];
bgValue.push(`/ ${value}`);
}
break;
}
default:
{
const value = values[i];
if (external_dependency_parsers_0.hasVarFunc(value)) {
return "";
}
if (value && value !== background_local_var_initialValues.get(property)) {
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
};
var borderWidth_export_parse, borderWidth_export_isValid, borderWidth_export_definition;
borderWidth_export_parse = function parse(v) {
const keywords = ["thin", "medium", "thick"];
const key = external_dependency_parsers_0.parseKeyword(v, keywords);
if (key) {
return key;
}
return external_dependency_parsers_0.parseLength(v, true);
};
borderWidth_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof borderWidth_export_parse(v) === "string";
};
borderWidth_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("border", "");
this._setProperty("border-width", v);
} else {
const positions = ["top", "right", "bottom", "left"];
this._implicitSetter("border", "width", v, borderWidth_export_isValid, borderWidth_export_parse, positions);
}
},
get() {
return this.getPropertyValue("border-width");
},
enumerable: true,
configurable: true
};
var borderStyle_export_parse, borderStyle_export_isValid, borderStyle_export_definition;
borderStyle_export_parse = function parse(v) {
const keywords = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"];
return external_dependency_parsers_0.parseKeyword(v, keywords);
};
borderStyle_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof borderStyle_export_parse(v) === "string";
};
borderStyle_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (/^none$/i.test(v)) {
v = "";
}
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("border", "");
this._setProperty("border-style", v);
return;
}
const positions = ["top", "right", "bottom", "left"];
this._implicitSetter("border", "style", v, borderStyle_export_isValid, borderStyle_export_parse, positions);
},
get() {
return this.getPropertyValue("border-style");
},
enumerable: true,
configurable: true
};
var borderColor_export_parse, borderColor_export_isValid, borderColor_export_definition;
borderColor_export_parse = function parse(v) {
const val = external_dependency_parsers_0.parseColor(v);
if (val) {
return val;
}
return external_dependency_parsers_0.parseKeyword(v);
};
borderColor_export_isValid = function isValid(v) {
if (v === "" || typeof external_dependency_parsers_0.parseKeyword(v) === "string") {
return true;
}
return external_dependency_parsers_0.isValidColor(v);
};
borderColor_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("border", "");
this._setProperty("border-color", v);
} else {
const positions = ["top", "right", "bottom", "left"];
this._implicitSetter("border", "color", v, borderColor_export_isValid, borderColor_export_parse, positions);
}
},
get() {
return this.getPropertyValue("border-color");
},
enumerable: true,
configurable: true
};
var border_export_shorthandFor, border_export_definition;
border_export_shorthandFor = new Map([["border-width", {
parse: borderWidth_export_parse,
isValid: borderWidth_export_isValid,
definition: borderWidth_export_definition
}], ["border-style", {
parse: borderStyle_export_parse,
isValid: borderStyle_export_isValid,
definition: borderStyle_export_definition
}], ["border-color", {
parse: borderColor_export_parse,
isValid: borderColor_export_isValid,
definition: borderColor_export_definition
}]]);
border_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (/^none$/i.test(v)) {
v = "";
}
if (external_dependency_parsers_0.hasVarFunc(v)) {
for (const [key] of border_export_shorthandFor) {
this._setProperty(key, "");
}
this._setProperty("border", v);
} else {
this._midShorthandSetter("border", v, border_export_shorthandFor, ["top", "right", "bottom", "left"]);
}
},
get() {
let val = this.getPropertyValue("border");
if (external_dependency_parsers_0.hasVarFunc(val)) {
return val;
}
val = this._shorthandGetter("border", border_export_shorthandFor);
if (external_dependency_parsers_0.hasVarFunc(val)) {
return "";
}
return val;
},
enumerable: true,
configurable: true
};
var borderTopWidth_export_parse, borderTopWidth_export_isValid, borderTopWidth_export_definition;
borderTopWidth_export_parse = function parse(v) {
const keywords = ["thin", "medium", "thick"];
const key = external_dependency_parsers_0.parseKeyword(v, keywords);
if (key) {
return key;
}
return external_dependency_parsers_0.parseLength(v, true);
};
borderTopWidth_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof borderTopWidth_export_parse(v) === "string";
};
borderTopWidth_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("border", "");
this._setProperty("border-top", "");
this._setProperty("border-width", "");
}
this._setProperty("border-top-width", borderTopWidth_export_parse(v));
},
get() {
return this.getPropertyValue("border-top-width");
},
enumerable: true,
configurable: true
};
var borderTopStyle_export_parse, borderTopStyle_export_isValid, borderTopStyle_export_definition;
borderTopStyle_export_parse = function parse(v) {
const keywords = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"];
return external_dependency_parsers_0.parseKeyword(v, keywords);
};
borderTopStyle_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof borderTopStyle_export_parse(v) === "string";
};
borderTopStyle_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
const val = borderTopStyle_export_parse(v);
if (val === "none" || val === "hidden" || v === "") {
this._setProperty("border-top-style", "");
this._setProperty("border-top-color", "");
this._setProperty("border-top-width", "");
return;
}
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("border", "");
this._setProperty("border-top", "");
this._setProperty("border-style", "");
}
this._setProperty("border-top-style", val);
},
get() {
return this.getPropertyValue("border-top-style");
},
enumerable: true,
configurable: true
};
var borderTopColor_export_parse, borderTopColor_export_isValid, borderTopColor_export_definition;
borderTopColor_export_parse = function parse(v) {
const val = external_dependency_parsers_0.parseColor(v);
if (val) {
return val;
}
return external_dependency_parsers_0.parseKeyword(v);
};
borderTopColor_export_isValid = function isValid(v) {
if (v === "" || typeof external_dependency_parsers_0.parseKeyword(v) === "string") {
return true;
}
return external_dependency_parsers_0.isValidColor(v);
};
borderTopColor_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("border", "");
this._setProperty("border-top", "");
this._setProperty("border-color", "");
}
this._setProperty("border-top-color", borderTopColor_export_parse(v));
},
get() {
return this.getPropertyValue("border-top-color");
},
enumerable: true,
configurable: true
};
var borderBottom_export_shorthandFor, borderBottom_export_definition;
borderBottom_export_shorthandFor = new Map([["border-bottom-width", {
parse: borderTopWidth_export_parse,
isValid: borderTopWidth_export_isValid,
definition: borderTopWidth_export_definition
}], ["border-bottom-style", {
parse: borderTopStyle_export_parse,
isValid: borderTopStyle_export_isValid,
definition: borderTopStyle_export_definition
}], ["border-bottom-color", {
parse: borderTopColor_export_parse,
isValid: borderTopColor_export_isValid,
definition: borderTopColor_export_definition
}]]);
borderBottom_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
for (const [key] of borderBottom_export_shorthandFor) {
this._setProperty(key, "");
}
this._setProperty("border", "");
this._setProperty("border-bottom", v);
} else {
this._shorthandSetter("border-bottom", v, borderBottom_export_shorthandFor);
}
},
get() {
let val = this.getPropertyValue("border-bottom");
if (external_dependency_parsers_0.hasVarFunc(val)) {
return val;
}
val = this._shorthandGetter("border-bottom", borderBottom_export_shorthandFor);
if (external_dependency_parsers_0.hasVarFunc(val)) {
return "";
}
return val;
},
enumerable: true,
configurable: true
};
var borderBottomColor_export_parse, borderBottomColor_export_isValid, borderBottomColor_export_definition;
borderBottomColor_export_parse = function parse(v) {
const val = external_dependency_parsers_0.parseColor(v);
if (val) {
return val;
}
return external_dependency_parsers_0.parseKeyword(v);
};
borderBottomColor_export_isValid = function isValid(v) {
if (v === "" || typeof external_dependency_parsers_0.parseKeyword(v) === "string") {
return true;
}
return external_dependency_parsers_0.isValidColor(v);
};
borderBottomColor_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("border", "");
this._setProperty("border-bottom", "");
this._setProperty("border-color", "");
}
this._setProperty("border-bottom-color", borderBottomColor_export_parse(v));
},
get() {
return this.getPropertyValue("border-bottom-color");
},
enumerable: true,
configurable: true
};
var borderBottomStyle_export_parse, borderBottomStyle_export_isValid, borderBottomStyle_export_definition;
borderBottomStyle_export_parse = function parse(v) {
const keywords = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"];
return external_dependency_parsers_0.parseKeyword(v, keywords);
};
borderBottomStyle_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof borderBottomStyle_export_parse(v) === "string";
};
borderBottomStyle_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
const val = borderBottomStyle_export_parse(v);
if (val === "none" || val === "hidden") {
this._setProperty("border-bottom-style", "");
this._setProperty("border-bottom-color", "");
this._setProperty("border-bottom-width", "");
return;
}
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("border", "");
this._setProperty("border-bottom", "");
this._setProperty("border-style", "");
}
this._setProperty("border-bottom-style", val);
},
get() {
return this.getPropertyValue("border-bottom-style");
},
enumerable: true,
configurable: true
};
var borderBottomWidth_export_parse, borderBottomWidth_export_isValid, borderBottomWidth_export_definition;
borderBottomWidth_export_parse = function parse(v) {
const keywords = ["thin", "medium", "thick"];
const key = external_dependency_parsers_0.parseKeyword(v, keywords);
if (key) {
return key;
}
return external_dependency_parsers_0.parseLength(v, true);
};
borderBottomWidth_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof borderBottomWidth_export_parse(v) === "string";
};
borderBottomWidth_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("border", "");
this._setProperty("border-bottom", "");
this._setProperty("border-width", "");
}
this._setProperty("border-bottom-width", borderBottomWidth_export_parse(v));
},
get() {
return this.getPropertyValue("border-bottom-width");
},
enumerable: true,
configurable: true
};
var borderCollapse_export_parse, borderCollapse_export_isValid, borderCollapse_export_definition;
borderCollapse_export_parse = function parse(v) {
return external_dependency_parsers_0.parseKeyword(v, ["collapse", "separate"]);
};
borderCollapse_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof borderCollapse_export_parse(v) === "string";
};
borderCollapse_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
this._setProperty("border-collapse", borderCollapse_export_parse(v));
},
get() {
return this.getPropertyValue("border-collapse");
},
enumerable: true,
configurable: true
};
var borderLeft_export_shorthandFor, borderLeft_export_definition;
borderLeft_export_shorthandFor = new Map([["border-left-width", {
parse: borderTopWidth_export_parse,
isValid: borderTopWidth_export_isValid,
definition: borderTopWidth_export_definition
}], ["border-left-style", {
parse: borderTopStyle_export_parse,
isValid: borderTopStyle_export_isValid,
definition: borderTopStyle_export_definition
}], ["border-left-color", {
parse: borderTopColor_export_parse,
isValid: borderTopColor_export_isValid,
definition: borderTopColor_export_definition
}]]);
borderLeft_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
for (const [key] of borderLeft_export_shorthandFor) {
this._setProperty(key, "");
}
this._setProperty("border", "");
this._setProperty("border-left", v);
} else {
this._shorthandSetter("border-left", v, borderLeft_export_shorthandFor);
}
},
get() {
let val = this.getPropertyValue("border-left");
if (external_dependency_parsers_0.hasVarFunc(val)) {
return val;
}
val = this._shorthandGetter("border-left", borderLeft_export_shorthandFor);
if (external_dependency_parsers_0.hasVarFunc(val)) {
return "";
}
return val;
},
enumerable: true,
configurable: true
};
var borderLeftColor_export_parse, borderLeftColor_export_isValid, borderLeftColor_export_definition;
borderLeftColor_export_parse = function parse(v) {
const val = external_dependency_parsers_0.parseColor(v);
if (val) {
return val;
}
return external_dependency_parsers_0.parseKeyword(v);
};
borderLeftColor_export_isValid = function isValid(v) {
if (v === "" || typeof external_dependency_parsers_0.parseKeyword(v) === "string") {
return true;
}
return external_dependency_parsers_0.isValidColor(v);
};
borderLeftColor_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("border", "");
this._setProperty("border-left", "");
this._setProperty("border-color", "");
}
this._setProperty("border-left-color", borderLeftColor_export_parse(v));
},
get() {
return this.getPropertyValue("border-left-color");
},
enumerable: true,
configurable: true
};
var borderLeftStyle_export_parse, borderLeftStyle_export_isValid, borderLeftStyle_export_definition;
borderLeftStyle_export_parse = function parse(v) {
const keywords = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"];
return external_dependency_parsers_0.parseKeyword(v, keywords);
};
borderLeftStyle_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof borderLeftStyle_export_parse(v) === "string";
};
borderLeftStyle_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
const val = borderLeftStyle_export_parse(v);
if (val === "none" || val === "hidden") {
this._setProperty("border-left-style", "");
this._setProperty("border-left-color", "");
this._setProperty("border-left-width", "");
return;
}
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("border", "");
this._setProperty("border-left", "");
this._setProperty("border-style", "");
}
this._setProperty("border-left-style", val);
},
get() {
return this.getPropertyValue("border-left-style");
},
enumerable: true,
configurable: true
};
var borderLeftWidth_export_parse, borderLeftWidth_export_isValid, borderLeftWidth_export_definition;
borderLeftWidth_export_parse = function parse(v) {
const keywords = ["thin", "medium", "thick"];
const key = external_dependency_parsers_0.parseKeyword(v, keywords);
if (key) {
return key;
}
return external_dependency_parsers_0.parseLength(v, true);
};
borderLeftWidth_export_isValid = function isValid(v) {
if (v === "") {
return true;
}
return typeof borderLeftWidth_export_parse(v) === "string";
};
borderLeftWidth_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
this._setProperty("border", "");
this._setProperty("border-left", "");
this._setProperty("border-width", "");
}
this._setProperty("border-left-width", borderLeftWidth_export_parse(v));
},
get() {
return this.getPropertyValue("border-left-width");
},
enumerable: true,
configurable: true
};
var borderRight_export_shorthandFor, borderRight_export_definition;
borderRight_export_shorthandFor = new Map([["border-right-width", {
parse: borderTopWidth_export_parse,
isValid: borderTopWidth_export_isValid,
definition: borderTopWidth_export_definition
}], ["border-right-style", {
parse: borderTopStyle_export_parse,
isValid: borderTopStyle_export_isValid,
definition: borderTopStyle_export_definition
}], ["border-right-color", {
parse: borderTopColor_export_parse,
isValid: borderTopColor_export_isValid,
definition: borderTopColor_export_definition
}]]);
borderRight_export_definition = {
set(v) {
v = external_dependency_parsers_0.prepareValue(v, this._global);
if (external_dependency_parsers_0.hasVarFunc(v)) {
for (const [key] of borderRight_export_shorthandFor) {
this._setProperty(key, "");
}
this._setProperty("border", "");
this._setProperty("border-right", v);
} else {
this._shorthandSetter("border-right", v, borderRight_export_shorthandFor);
}
},
get() {
let val = this.getPropertyValue("border-right");