Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cssstyle

Package Overview
Dependencies
Maintainers
0
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssstyle - npm Package Compare versions

Comparing version 4.0.1 to 4.1.0

44

lib/allProperties.js
'use strict';
// autogenerated - 2024-09-07
// https://www.w3.org/Style/CSS/all-properties.en.html
// autogenerated - 1/22/2023
/*
*
* https://www.w3.org/Style/CSS/all-properties.en.html
*/
module.exports = new Set([

@@ -18,6 +13,7 @@ '-webkit-line-clamp',

'all',
'anchor-name',
'anchor-scope',
'animation',
'animation-composition',
'animation-delay',
'animation-delay-end',
'animation-delay-start',
'animation-direction',

@@ -30,2 +26,5 @@ 'animation-duration',

'animation-range',
'animation-range-end',
'animation-range-start',
'animation-timeline',
'animation-timing-function',

@@ -127,3 +126,2 @@ 'appearance',

'caret-shape',
'chains',
'clear',

@@ -182,3 +180,2 @@ 'clip',

'flood-opacity',
'flow',
'flow-from',

@@ -198,2 +195,3 @@ 'flow-into',

'font-synthesis',
'font-synthesis-position',
'font-synthesis-small-caps',

@@ -212,2 +210,3 @@ 'font-synthesis-style',

'font-weight',
'font-width',
'footnote-display',

@@ -250,2 +249,3 @@ 'footnote-policy',

'inset',
'inset-area',
'inset-block',

@@ -261,3 +261,2 @@ 'inset-block-end',

'justify-self',
'leading-trim',
'left',

@@ -268,2 +267,3 @@ 'letter-spacing',

'line-clamp',
'line-fit-edge',
'line-grid',

@@ -383,2 +383,6 @@ 'line-height',

'position',
'position-anchor',
'position-try',
'position-try-options',
'position-try-order',
'print-color-adjust',

@@ -453,2 +457,6 @@ 'quotes',

'text-align-last',
'text-autospace',
'text-box',
'text-box-edge',
'text-box-trim',
'text-combine-upright',

@@ -466,3 +474,2 @@ 'text-decoration',

'text-decoration-thickness',
'text-edge',
'text-emphasis',

@@ -479,5 +486,4 @@ 'text-emphasis-color',

'text-shadow',
'text-space-collapse',
'text-space-trim',
'text-spacing',
'text-spacing-trim',
'text-transform',

@@ -487,2 +493,5 @@ 'text-underline-offset',

'text-wrap',
'text-wrap-mode',
'text-wrap-style',
'timeline-scope',
'top',

@@ -518,8 +527,9 @@ 'transform',

'white-space',
'white-space-collapse',
'white-space-trim',
'widows',
'width',
'will-change',
'word-boundary-detection',
'word-boundary-expansion',
'word-break',
'word-space-transform',
'word-spacing',

@@ -526,0 +536,0 @@ 'word-wrap',

@@ -0,90 +1,86 @@

'use strict';
// autogenerated - 2024-09-07
// https://www.w3.org/Style/CSS/all-properties.en.html
// autogenerated - 12/28/2023
/*
*
* https://www.w3.org/Style/CSS/all-properties.en.html
*/
var implementedProperties = new Set();
implementedProperties.add("azimuth");
implementedProperties.add("background");
implementedProperties.add("background-attachment");
implementedProperties.add("background-color");
implementedProperties.add("background-image");
implementedProperties.add("background-position");
implementedProperties.add("background-repeat");
implementedProperties.add("border");
implementedProperties.add("border-bottom");
implementedProperties.add("border-bottom-color");
implementedProperties.add("border-bottom-style");
implementedProperties.add("border-bottom-width");
implementedProperties.add("border-collapse");
implementedProperties.add("border-color");
implementedProperties.add("border-left");
implementedProperties.add("border-left-color");
implementedProperties.add("border-left-style");
implementedProperties.add("border-left-width");
implementedProperties.add("border-right");
implementedProperties.add("border-right-color");
implementedProperties.add("border-right-style");
implementedProperties.add("border-right-width");
implementedProperties.add("border-spacing");
implementedProperties.add("border-style");
implementedProperties.add("border-top");
implementedProperties.add("border-top-color");
implementedProperties.add("border-top-style");
implementedProperties.add("border-top-width");
implementedProperties.add("border-width");
implementedProperties.add("bottom");
implementedProperties.add("clear");
implementedProperties.add("clip");
implementedProperties.add("color");
implementedProperties.add("css-float");
implementedProperties.add("flex");
implementedProperties.add("flex-basis");
implementedProperties.add("flex-grow");
implementedProperties.add("flex-shrink");
implementedProperties.add("float");
implementedProperties.add("flood-color");
implementedProperties.add("font");
implementedProperties.add("font-family");
implementedProperties.add("font-size");
implementedProperties.add("font-style");
implementedProperties.add("font-variant");
implementedProperties.add("font-weight");
implementedProperties.add("height");
implementedProperties.add("left");
implementedProperties.add("lighting-color");
implementedProperties.add("line-height");
implementedProperties.add("margin");
implementedProperties.add("margin-bottom");
implementedProperties.add("margin-left");
implementedProperties.add("margin-right");
implementedProperties.add("margin-top");
implementedProperties.add("opacity");
implementedProperties.add("outline-color");
implementedProperties.add("padding");
implementedProperties.add("padding-bottom");
implementedProperties.add("padding-left");
implementedProperties.add("padding-right");
implementedProperties.add("padding-top");
implementedProperties.add("right");
implementedProperties.add("stop-color");
implementedProperties.add("text-line-through-color");
implementedProperties.add("text-overline-color");
implementedProperties.add("text-underline-color");
implementedProperties.add("top");
implementedProperties.add("webkit-border-after-color");
implementedProperties.add("webkit-border-before-color");
implementedProperties.add("webkit-border-end-color");
implementedProperties.add("webkit-border-start-color");
implementedProperties.add("webkit-column-rule-color");
implementedProperties.add("webkit-match-nearest-mail-blockquote-color");
implementedProperties.add("webkit-tap-highlight-color");
implementedProperties.add("webkit-text-emphasis-color");
implementedProperties.add("webkit-text-fill-color");
implementedProperties.add("webkit-text-stroke-color");
implementedProperties.add("width");
module.exports = implementedProperties;
module.exports = new Set([
"azimuth",
"background",
"background-attachment",
"background-color",
"background-image",
"background-position",
"background-repeat",
"border",
"border-bottom",
"border-bottom-color",
"border-bottom-style",
"border-bottom-width",
"border-collapse",
"border-color",
"border-left",
"border-left-color",
"border-left-style",
"border-left-width",
"border-right",
"border-right-color",
"border-right-style",
"border-right-width",
"border-spacing",
"border-style",
"border-top",
"border-top-color",
"border-top-style",
"border-top-width",
"border-width",
"bottom",
"clear",
"clip",
"color",
"css-float",
"flex",
"flex-basis",
"flex-grow",
"flex-shrink",
"float",
"flood-color",
"font",
"font-family",
"font-size",
"font-style",
"font-variant",
"font-weight",
"height",
"left",
"lighting-color",
"line-height",
"margin",
"margin-bottom",
"margin-left",
"margin-right",
"margin-top",
"opacity",
"outline-color",
"padding",
"padding-bottom",
"padding-left",
"padding-right",
"padding-top",
"right",
"stop-color",
"text-line-through-color",
"text-overline-color",
"text-underline-color",
"top",
"webkit-border-after-color",
"webkit-border-before-color",
"webkit-border-end-color",
"webkit-border-start-color",
"webkit-column-rule-color",
"webkit-match-nearest-mail-blockquote-color",
"webkit-tap-highlight-color",
"webkit-text-emphasis-color",
"webkit-text-fill-color",
"webkit-text-stroke-color",
"width"
]);
'use strict';
// autogenerated - 12/28/2023
// autogenerated - 9/7/2024

@@ -11,5 +11,3 @@ /*

var external_dependency_parsers_0 = require("./parsers.js");
var external_dependency_constants_1 = require("./constants.js");
var azimuth_export_definition;

@@ -19,18 +17,13 @@ azimuth_export_definition = {

var valueType = external_dependency_parsers_0.valueType(v);
if (valueType === external_dependency_parsers_0.TYPES.ANGLE) {
return this._setProperty('azimuth', external_dependency_parsers_0.parseAngle(v));
}
if (valueType === external_dependency_parsers_0.TYPES.KEYWORD) {
var keywords = v.toLowerCase().trim().split(/\s+/);
var hasBehind = false;
if (keywords.length > 2) {
return;
}
var behindIndex = keywords.indexOf('behind');
hasBehind = behindIndex !== -1;
if (keywords.length === 2) {

@@ -40,6 +33,4 @@ if (!hasBehind) {

}
keywords.splice(behindIndex, 1);
}
if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') {

@@ -49,38 +40,26 @@ if (hasBehind) {

}
return this._setProperty('azimuth', keywords[0]);
}
if (keywords[0] === 'behind') {
return this._setProperty('azimuth', '180deg');
}
switch (keywords[0]) {
case 'left-side':
return this._setProperty('azimuth', '270deg');
case 'far-left':
return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg');
case 'left':
return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg');
case 'center-left':
return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg');
case 'center':
return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg');
case 'center-right':
return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg');
case 'right':
return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg');
case 'far-right':
return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg');
case 'right-side':
return this._setProperty('azimuth', '90deg');
default:

@@ -98,29 +77,21 @@ return;

var backgroundColor_export_isValid, backgroundColor_export_definition;
var backgroundColor_local_var_parse = function parse(v) {
var parsed = external_dependency_parsers_0.parseColor(v);
if (parsed !== undefined) {
return parsed;
}
if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'transparent' || v.toLowerCase() === 'inherit')) {
return v;
}
return undefined;
};
backgroundColor_export_isValid = function isValid(v) {
return backgroundColor_local_var_parse(v) !== undefined;
};
backgroundColor_export_definition = {
set: function (v) {
var parsed = backgroundColor_local_var_parse(v);
if (parsed === undefined) {
return;
}
this._setProperty('background-color', parsed);

@@ -135,21 +106,15 @@ },

var backgroundImage_export_isValid, backgroundImage_export_definition;
var backgroundImage_local_var_parse = function parse(v) {
var parsed = external_dependency_parsers_0.parseUrl(v);
if (parsed !== undefined) {
return parsed;
}
if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit')) {
return v;
}
return undefined;
};
backgroundImage_export_isValid = function isValid(v) {
return backgroundImage_local_var_parse(v) !== undefined;
};
backgroundImage_export_definition = {

@@ -166,3 +131,2 @@ set: function (v) {

var backgroundRepeat_export_isValid, backgroundRepeat_export_definition;
var backgroundRepeat_local_var_parse = function parse(v) {

@@ -172,10 +136,7 @@ if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'repeat' || v.toLowerCase() === 'repeat-x' || v.toLowerCase() === 'repeat-y' || v.toLowerCase() === 'no-repeat' || v.toLowerCase() === 'inherit')) {

}
return undefined;
};
backgroundRepeat_export_isValid = function isValid(v) {
return backgroundRepeat_local_var_parse(v) !== undefined;
};
backgroundRepeat_export_definition = {

@@ -192,7 +153,5 @@ set: function (v) {

var backgroundAttachment_export_isValid, backgroundAttachment_export_definition;
var backgroundAttachment_local_var_isValid = backgroundAttachment_export_isValid = function isValid(v) {
return external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit');
};
backgroundAttachment_export_definition = {

@@ -203,3 +162,2 @@ set: function (v) {

}
this._setProperty('background-attachment', v);

@@ -215,3 +173,2 @@ },

var backgroundPosition_local_var_valid_keywords = ['top', 'center', 'bottom', 'left', 'right'];
var backgroundPosition_local_var_parse = function parse(v) {

@@ -221,9 +178,6 @@ if (v === '' || v === null) {

}
var parts = v.split(/\s+/);
if (parts.length > 2 || parts.length < 1) {
return undefined;
}
var types = [];

@@ -233,3 +187,2 @@ parts.forEach(function (part, index) {

});
if (parts.length === 1) {

@@ -239,3 +192,2 @@ if (types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) {

}
if (types[0] === external_dependency_parsers_0.TYPES.KEYWORD) {

@@ -246,25 +198,18 @@ if (backgroundPosition_local_var_valid_keywords.indexOf(v.toLowerCase()) !== -1 || v.toLowerCase() === 'inherit') {

}
return undefined;
}
if ((types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) && (types[1] === external_dependency_parsers_0.TYPES.LENGTH || types[1] === external_dependency_parsers_0.TYPES.PERCENT)) {
return v;
}
if (types[0] !== external_dependency_parsers_0.TYPES.KEYWORD || types[1] !== external_dependency_parsers_0.TYPES.KEYWORD) {
return undefined;
}
if (backgroundPosition_local_var_valid_keywords.indexOf(parts[0]) !== -1 && backgroundPosition_local_var_valid_keywords.indexOf(parts[1]) !== -1) {
return v;
}
return undefined;
};
backgroundPosition_export_isValid = function isValid(v) {
return backgroundPosition_local_var_parse(v) !== undefined;
};
backgroundPosition_export_definition = {

@@ -312,43 +257,30 @@ set: function (v) {

var borderWidth_local_var_widths = ['thin', 'medium', 'thick'];
borderWidth_export_isValid = function parse(v) {
var length = external_dependency_parsers_0.parseLength(v);
if (length !== undefined) {
return true;
}
if (typeof v !== 'string') {
return false;
}
if (v === '') {
return true;
}
v = v.toLowerCase();
if (borderWidth_local_var_widths.indexOf(v) === -1) {
return false;
}
return true;
};
var borderWidth_local_var_isValid = borderWidth_export_isValid;
var borderWidth_local_var_parser = function (v) {
var length = external_dependency_parsers_0.parseLength(v);
if (length !== undefined) {
return length;
}
if (borderWidth_local_var_isValid(v)) {
return v.toLowerCase();
}
return undefined;
};
borderWidth_export_definition = {

@@ -365,9 +297,6 @@ set: external_dependency_parsers_0.implicitSetter('border', 'width', borderWidth_local_var_isValid, borderWidth_local_var_parser),

var borderStyle_local_var_styles = ['none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset'];
borderStyle_export_isValid = function parse(v) {
return typeof v === 'string' && (v === '' || borderStyle_local_var_styles.indexOf(v) !== -1);
};
var borderStyle_local_var_isValid = borderStyle_export_isValid;
var borderStyle_local_var_parser = function (v) {

@@ -377,6 +306,4 @@ if (borderStyle_local_var_isValid(v)) {

}
return undefined;
};
borderStyle_export_definition = {

@@ -391,3 +318,2 @@ set: external_dependency_parsers_0.implicitSetter('border', 'style', borderStyle_local_var_isValid, borderStyle_local_var_parser),

var borderColor_export_isValid, borderColor_export_definition;
borderColor_export_isValid = function parse(v) {

@@ -397,8 +323,5 @@ if (typeof v !== 'string') {

}
return v === '' || v.toLowerCase() === 'transparent' || external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.COLOR;
};
var borderColor_local_var_isValid = borderColor_export_isValid;
var borderColor_local_var_parser = function (v) {

@@ -408,6 +331,4 @@ if (borderColor_local_var_isValid(v)) {

}
return undefined;
};
borderColor_export_definition = {

@@ -443,3 +364,2 @@ set: external_dependency_parsers_0.implicitSetter('border', 'color', borderColor_local_var_isValid, borderColor_local_var_parser),

}
border_local_var_myShorthandSetter.call(this, v);

@@ -482,3 +402,2 @@ this.removeProperty('border-top');

}
this._setProperty('border-bottom-style', v);

@@ -529,3 +448,2 @@ }

var borderCollapse_export_definition;
var borderCollapse_local_var_parse = function parse(v) {

@@ -535,6 +453,4 @@ if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) {

}
return undefined;
};
borderCollapse_export_definition = {

@@ -573,3 +489,2 @@ set: function (v) {

}
this._setProperty('border-left-style', v);

@@ -642,3 +557,2 @@ }

}
this._setProperty('border-right-style', v);

@@ -689,6 +603,6 @@ }

var borderSpacing_export_definition;
// <length> <length>? | inherit
// if one, it applies to both horizontal and verical spacing
// if two, the first applies to the horizontal and the second applies to vertical spacing
var borderSpacing_local_var_parse = function parse(v) {

@@ -698,17 +612,12 @@ if (v === '' || v === null) {

}
if (v === 0) {
return '0px';
}
if (v.toLowerCase() === 'inherit') {
return v;
}
var parts = v.split(/\s+/);
if (parts.length !== 1 && parts.length !== 2) {
return undefined;
}
parts.forEach(function (part) {

@@ -721,3 +630,2 @@ if (external_dependency_parsers_0.valueType(part) !== external_dependency_parsers_0.TYPES.LENGTH) {

};
borderSpacing_export_definition = {

@@ -756,3 +664,2 @@ set: function (v) {

}
this._setProperty('border-top-style', v);

@@ -827,3 +734,2 @@ }

var clip_local_var_shape_regex = /^rect\((.*)\)$/i;
var clip_local_var_parse = function (val) {

@@ -833,25 +739,17 @@ if (val === '' || val === null) {

}
if (typeof val !== 'string') {
return undefined;
}
val = val.toLowerCase();
if (val === 'auto' || val === 'inherit') {
return val;
}
var matches = val.match(clip_local_var_shape_regex);
if (!matches) {
return undefined;
}
var parts = matches[1].split(/\s*,\s*/);
if (parts.length !== 4) {
return undefined;
}
var valid = parts.every(function (part, index) {

@@ -862,11 +760,8 @@ var measurement = external_dependency_parsers_0.parseMeasurement(part);

});
if (!valid) {
return undefined;
}
parts = parts.join(', ');
return val.replace(matches[1], parts);
};
clip_export_definition = {

@@ -905,7 +800,5 @@ set: function (v) {

var flexGrow_export_isValid, flexGrow_export_definition;
flexGrow_export_isValid = function isValid(v, positionAtFlexShorthand) {
return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.first;
};
flexGrow_export_definition = {

@@ -922,7 +815,5 @@ set: function (v) {

var flexShrink_export_isValid, flexShrink_export_definition;
flexShrink_export_isValid = function isValid(v, positionAtFlexShorthand) {
return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.second;
};
flexShrink_export_definition = {

@@ -939,3 +830,2 @@ set: function (v) {

var flexBasis_export_isValid, flexBasis_export_definition;
function flexBasis_local_fn_parse(v) {

@@ -945,14 +835,10 @@ if (String(v).toLowerCase() === 'auto') {

}
if (String(v).toLowerCase() === 'inherit') {
return 'inherit';
}
return external_dependency_parsers_0.parseMeasurement(v);
}
flexBasis_export_isValid = function isValid(v) {
return flexBasis_local_fn_parse(v) !== undefined;
};
flexBasis_export_definition = {

@@ -984,11 +870,8 @@ set: function (v) {

var flex_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('flex', flex_local_var_shorthand_for);
flex_export_isValid = function isValid(v) {
return external_dependency_parsers_0.shorthandParser(v, flex_local_var_shorthand_for) !== undefined;
};
flex_export_definition = {
set: function (v) {
var normalizedValue = String(v).trim().toLowerCase();
if (normalizedValue === 'none') {

@@ -998,3 +881,2 @@ flex_local_var_myShorthandSetter.call(this, '0 0 auto');

}
if (normalizedValue === 'initial') {

@@ -1004,3 +886,2 @@ flex_local_var_myShorthandSetter.call(this, '0 1 auto');

}
if (normalizedValue === 'auto') {

@@ -1012,3 +893,2 @@ this.removeProperty('flex-grow');

}
flex_local_var_myShorthandSetter.call(this, v);

@@ -1044,3 +924,2 @@ },

var fontFamily_local_var_partsRegEx = /\s*,\s*/;
fontFamily_export_isValid = function isValid(v) {

@@ -1050,3 +929,2 @@ if (v === '' || v === null) {

}
var parts = v.split(fontFamily_local_var_partsRegEx);

@@ -1056,6 +934,4 @@ var len = parts.length;

var type;
for (i = 0; i < len; i++) {
type = external_dependency_parsers_0.valueType(parts[i]);
if (type === external_dependency_parsers_0.TYPES.STRING || type === external_dependency_parsers_0.TYPES.KEYWORD) {

@@ -1065,6 +941,4 @@ return true;

}
return false;
};
fontFamily_export_definition = {

@@ -1083,3 +957,2 @@ set: function (v) {

var fontSize_local_var_relativeSizes = ['larger', 'smaller'];
fontSize_export_isValid = function (v) {

@@ -1089,3 +962,2 @@ var type = external_dependency_parsers_0.valueType(v.toLowerCase());

};
function fontSize_local_fn_parse(v) {

@@ -1097,3 +969,2 @@ const valueAsString = String(v).toLowerCase();

}
fontSize_export_definition = {

@@ -1111,7 +982,5 @@ set: function (v) {

var fontStyle_local_var_valid_styles = ['normal', 'italic', 'oblique', 'inherit'];
fontStyle_export_isValid = function (v) {
return fontStyle_local_var_valid_styles.indexOf(v.toLowerCase()) !== -1;
};
fontStyle_export_definition = {

@@ -1129,7 +998,5 @@ set: function (v) {

var fontVariant_local_var_valid_variants = ['normal', 'small-caps', 'inherit'];
fontVariant_export_isValid = function isValid(v) {
return fontVariant_local_var_valid_variants.indexOf(v.toLowerCase()) !== -1;
};
fontVariant_export_definition = {

@@ -1147,7 +1014,5 @@ set: function (v) {

var fontWeight_local_var_valid_weights = ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'inherit'];
fontWeight_export_isValid = function isValid(v) {
return fontWeight_local_var_valid_weights.indexOf(v.toLowerCase()) !== -1;
};
fontWeight_export_definition = {

@@ -1164,3 +1029,2 @@ set: function (v) {

var lineHeight_export_isValid, lineHeight_export_definition;
lineHeight_export_isValid = function isValid(v) {

@@ -1170,3 +1034,2 @@ var type = external_dependency_parsers_0.valueType(v);

};
lineHeight_export_definition = {

@@ -1214,7 +1077,5 @@ set: function (v) {

var short = external_dependency_parsers_0.shorthandParser(v, font_local_var_shorthand_for);
if (short !== undefined) {
return font_local_var_setter.call(this, v);
}
if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && font_local_var_static_fonts.indexOf(v.toLowerCase()) !== -1) {

@@ -1229,3 +1090,2 @@ this._setProperty('font', v);

var height_export_definition;
function height_local_fn_parse(v) {

@@ -1235,10 +1095,7 @@ if (String(v).toLowerCase() === 'auto') {

}
if (String(v).toLowerCase() === 'inherit') {
return 'inherit';
}
return external_dependency_parsers_0.parseMeasurement(v);
}
height_export_definition = {

@@ -1278,3 +1135,2 @@ set: function (v) {

var margin_local_var_TYPES = external_dependency_parsers_0.TYPES;
var margin_local_var_isValid = function (v) {

@@ -1284,17 +1140,12 @@ if (v.toLowerCase() === 'auto') {

}
var type = external_dependency_parsers_0.valueType(v);
return type === margin_local_var_TYPES.NULL_OR_EMPTY_STR || type === margin_local_var_TYPES.LENGTH || type === margin_local_var_TYPES.PERCENT || type === margin_local_var_TYPES.INTEGER && (v === '0' || v === 0);
return type === margin_local_var_TYPES.NULL_OR_EMPTY_STR || type === margin_local_var_TYPES.LENGTH || type === margin_local_var_TYPES.PERCENT || type === margin_local_var_TYPES.CALC || type === margin_local_var_TYPES.INTEGER && (v === '0' || v === 0);
};
var margin_local_var_parser = function (v) {
var V = v.toLowerCase();
if (V === 'auto') {
return V;
}
return external_dependency_parsers_0.parseMeasurement(v);
};
var margin_local_var_mySetter = external_dependency_parsers_0.implicitSetter('margin', '', margin_local_var_isValid, margin_local_var_parser);

@@ -1311,13 +1162,9 @@ var margin_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('margin', '', function () {

}
if (v === null) {
v = '';
}
if (typeof v !== 'string') {
return;
}
var V = v.toLowerCase();
switch (V) {

@@ -1330,3 +1177,2 @@ case 'inherit':

break;
default:

@@ -1437,12 +1283,9 @@ margin_local_var_mySetter.call(this, v);

var padding_local_var_TYPES = external_dependency_parsers_0.TYPES;
var padding_local_var_isValid = function (v) {
var type = external_dependency_parsers_0.valueType(v);
return type === padding_local_var_TYPES.NULL_OR_EMPTY_STR || type === padding_local_var_TYPES.LENGTH || type === padding_local_var_TYPES.PERCENT || type === padding_local_var_TYPES.INTEGER && (v === '0' || v === 0);
return type === padding_local_var_TYPES.NULL_OR_EMPTY_STR || type === padding_local_var_TYPES.LENGTH || type === padding_local_var_TYPES.PERCENT || type === padding_local_var_TYPES.CALC || type === padding_local_var_TYPES.INTEGER && (v === '0' || v === 0);
};
var padding_local_var_parser = function (v) {
return external_dependency_parsers_0.parseMeasurement(v);
};
var padding_local_var_mySetter = external_dependency_parsers_0.implicitSetter('padding', '', padding_local_var_isValid, padding_local_var_parser);

@@ -1459,13 +1302,9 @@ var padding_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('padding', '', function () {

}
if (v === null) {
v = '';
}
if (typeof v !== 'string') {
return;
}
var V = v.toLowerCase();
switch (V) {

@@ -1478,3 +1317,2 @@ case 'inherit':

break;
default:

@@ -1738,3 +1576,2 @@ padding_local_var_mySetter.call(this, v);

var width_export_definition;
function width_local_fn_parse(v) {

@@ -1744,10 +1581,7 @@ if (String(v).toLowerCase() === 'auto') {

}
if (String(v).toLowerCase() === 'inherit') {
return 'inherit';
}
return external_dependency_parsers_0.parseMeasurement(v);
}
width_export_definition = {

@@ -1763,3 +1597,2 @@ set: function (v) {

};
module.exports = function (prototype) {

@@ -1766,0 +1599,0 @@ Object.defineProperties(prototype, {

@@ -15,2 +15,3 @@ 'use strict';

type === TYPES.PERCENT ||
type === TYPES.CALC ||
(type === TYPES.INTEGER && (v === '0' || v === 0))

@@ -17,0 +18,0 @@ );

@@ -12,2 +12,3 @@ 'use strict';

type === TYPES.PERCENT ||
type === TYPES.CALC ||
(type === TYPES.INTEGER && (v === '0' || v === 0))

@@ -14,0 +15,0 @@ );

@@ -9,3 +9,3 @@ {

],
"version": "4.0.1",
"version": "4.1.0",
"homepage": "https://github.com/jsdom/cssstyle",

@@ -41,26 +41,26 @@ "maintainers": [

"dependencies": {
"rrweb-cssom": "^0.6.0"
"rrweb-cssom": "^0.7.1"
},
"devDependencies": {
"babel-generator": "^6.26.1",
"babel-traverse": "^6.26.0",
"babel-types": "^6.26.0",
"babylon": "^6.18.0",
"eslint": "^8.56.0",
"@babel/generator": "^7.25.6",
"@babel/parser": "^7.25.6",
"@babel/traverse": "^7.25.6",
"@babel/types": "^7.25.6",
"eslint": "^9.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.2",
"jest": "^29.7.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.9.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.1.1",
"prettier": "^3.3.3",
"resolve": "^1.22.1"
},
"scripts": {
"download": "node ./scripts/download_latest_properties.js && eslint lib/allProperties.js --fix",
"download": "node ./scripts/downloadLatestProperties.mjs && eslint lib/allProperties.js --fix",
"generate": "run-p generate:*",
"generate:implemented_properties": "node ./scripts/generate_implemented_properties.js",
"generate:implemented_properties": "node ./scripts/generateImplementedProperties.mjs",
"generate:properties": "node ./scripts/generate_properties.js",
"lint": "npm run generate && eslint . --max-warnings 0",
"lint:fix": "eslint . --fix --max-warnings 0",
"lint": "npm run generate && eslint --max-warnings 0",
"lint:fix": "eslint --fix --max-warnings 0",
"prepublishOnly": "npm run lint && npm run test",
"test": "npm run generate && jest",
"test": "npm run generate && node --test",
"test-ci": "npm run lint && npm run test",

@@ -67,0 +67,0 @@ "update-authors": "git log --format=\"%aN <%aE>\" | sort -f | uniq > AUTHORS"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc