cssstyle 4.3.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CSSStyleDeclaration.js +545 -206
- package/lib/allExtraProperties.js +42 -60
- package/lib/allWebkitProperties.js +107 -187
- package/lib/generated/allProperties.js +615 -0
- package/lib/{implementedProperties.js → generated/implementedProperties.js} +11 -18
- package/lib/generated/properties.js +2574 -0
- package/lib/parsers.js +382 -547
- package/lib/properties/background.js +40 -13
- package/lib/properties/backgroundAttachment.js +23 -15
- package/lib/properties/backgroundColor.js +21 -19
- package/lib/properties/backgroundImage.js +19 -14
- package/lib/properties/backgroundPosition.js +35 -41
- package/lib/properties/backgroundRepeat.js +20 -20
- package/lib/properties/border.js +34 -25
- package/lib/properties/borderBottom.js +34 -11
- package/lib/properties/borderBottomColor.js +27 -8
- package/lib/properties/borderBottomStyle.js +42 -13
- package/lib/properties/borderBottomWidth.js +28 -8
- package/lib/properties/borderCollapse.js +16 -16
- package/lib/properties/borderColor.js +32 -18
- package/lib/properties/borderLeft.js +34 -11
- package/lib/properties/borderLeftColor.js +27 -8
- package/lib/properties/borderLeftStyle.js +42 -13
- package/lib/properties/borderLeftWidth.js +28 -8
- package/lib/properties/borderRight.js +34 -11
- package/lib/properties/borderRightColor.js +27 -8
- package/lib/properties/borderRightStyle.js +42 -13
- package/lib/properties/borderRightWidth.js +28 -8
- package/lib/properties/borderSpacing.js +31 -27
- package/lib/properties/borderStyle.js +43 -27
- package/lib/properties/borderTop.js +34 -11
- package/lib/properties/borderTopColor.js +27 -8
- package/lib/properties/borderTopStyle.js +42 -13
- package/lib/properties/borderTopWidth.js +28 -9
- package/lib/properties/borderWidth.js +32 -34
- package/lib/properties/bottom.js +23 -7
- package/lib/properties/clear.js +32 -8
- package/lib/properties/clip.js +33 -27
- package/lib/properties/color.js +23 -7
- package/lib/properties/flex.js +59 -29
- package/lib/properties/flexBasis.js +21 -16
- package/lib/properties/flexGrow.js +19 -10
- package/lib/properties/flexShrink.js +19 -10
- package/lib/properties/float.js +21 -6
- package/lib/properties/floodColor.js +23 -7
- package/lib/properties/font.js +120 -33
- package/lib/properties/fontFamily.js +59 -21
- package/lib/properties/fontSize.js +37 -28
- package/lib/properties/fontStyle.js +23 -9
- package/lib/properties/fontVariant.js +26 -8
- package/lib/properties/fontWeight.js +26 -23
- package/lib/properties/height.js +21 -14
- package/lib/properties/left.js +23 -7
- package/lib/properties/lightingColor.js +23 -7
- package/lib/properties/lineHeight.js +29 -16
- package/lib/properties/margin.js +42 -57
- package/lib/properties/marginBottom.js +34 -7
- package/lib/properties/marginLeft.js +34 -7
- package/lib/properties/marginRight.js +34 -7
- package/lib/properties/marginTop.js +34 -7
- package/lib/properties/opacity.js +39 -7
- package/lib/properties/outlineColor.js +23 -7
- package/lib/properties/padding.js +43 -51
- package/lib/properties/paddingBottom.js +36 -7
- package/lib/properties/paddingLeft.js +34 -7
- package/lib/properties/paddingRight.js +34 -7
- package/lib/properties/paddingTop.js +34 -7
- package/lib/properties/right.js +23 -7
- package/lib/properties/stopColor.js +23 -7
- package/lib/properties/top.js +23 -7
- package/lib/properties/webkitBorderAfterColor.js +23 -7
- package/lib/properties/webkitBorderBeforeColor.js +23 -7
- package/lib/properties/webkitBorderEndColor.js +23 -7
- package/lib/properties/webkitBorderStartColor.js +23 -7
- package/lib/properties/webkitColumnRuleColor.js +23 -7
- package/lib/properties/webkitTapHighlightColor.js +23 -7
- package/lib/properties/webkitTextEmphasisColor.js +23 -7
- package/lib/properties/webkitTextFillColor.js +23 -7
- package/lib/properties/webkitTextStrokeColor.js +23 -7
- package/lib/properties/width.js +21 -14
- package/lib/utils/camelize.js +35 -0
- package/lib/utils/propertyDescriptors.js +16 -0
- package/package.json +5 -4
- package/lib/allProperties.js +0 -529
- package/lib/constants.js +0 -6
- package/lib/named_colors.json +0 -152
- package/lib/properties/azimuth.js +0 -64
- package/lib/properties/cssFloat.js +0 -12
- package/lib/properties/textLineThroughColor.js +0 -14
- package/lib/properties/textOverlineColor.js +0 -14
- package/lib/properties/textUnderlineColor.js +0 -14
- package/lib/properties/webkitMatchNearestMailBlockquoteColor.js +0 -14
- package/lib/properties.js +0 -1672
- package/lib/utils/getBasicPropertyDescriptor.js +0 -14
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var parsers = require('../parsers');
|
|
4
|
-
|
|
5
|
-
module.exports.definition = {
|
|
6
|
-
set: function (v) {
|
|
7
|
-
var valueType = parsers.valueType(v);
|
|
8
|
-
if (valueType === parsers.TYPES.ANGLE) {
|
|
9
|
-
return this._setProperty('azimuth', parsers.parseAngle(v));
|
|
10
|
-
}
|
|
11
|
-
if (valueType === parsers.TYPES.KEYWORD) {
|
|
12
|
-
var keywords = v.toLowerCase().trim().split(/\s+/);
|
|
13
|
-
var hasBehind = false;
|
|
14
|
-
if (keywords.length > 2) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
var behindIndex = keywords.indexOf('behind');
|
|
18
|
-
hasBehind = behindIndex !== -1;
|
|
19
|
-
|
|
20
|
-
if (keywords.length === 2) {
|
|
21
|
-
if (!hasBehind) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
keywords.splice(behindIndex, 1);
|
|
25
|
-
}
|
|
26
|
-
if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') {
|
|
27
|
-
if (hasBehind) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
return this._setProperty('azimuth', keywords[0]);
|
|
31
|
-
}
|
|
32
|
-
if (keywords[0] === 'behind') {
|
|
33
|
-
return this._setProperty('azimuth', '180deg');
|
|
34
|
-
}
|
|
35
|
-
switch (keywords[0]) {
|
|
36
|
-
case 'left-side':
|
|
37
|
-
return this._setProperty('azimuth', '270deg');
|
|
38
|
-
case 'far-left':
|
|
39
|
-
return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg');
|
|
40
|
-
case 'left':
|
|
41
|
-
return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg');
|
|
42
|
-
case 'center-left':
|
|
43
|
-
return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg');
|
|
44
|
-
case 'center':
|
|
45
|
-
return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg');
|
|
46
|
-
case 'center-right':
|
|
47
|
-
return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg');
|
|
48
|
-
case 'right':
|
|
49
|
-
return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg');
|
|
50
|
-
case 'far-right':
|
|
51
|
-
return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg');
|
|
52
|
-
case 'right-side':
|
|
53
|
-
return this._setProperty('azimuth', '90deg');
|
|
54
|
-
default:
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
get: function () {
|
|
60
|
-
return this.getPropertyValue('azimuth');
|
|
61
|
-
},
|
|
62
|
-
enumerable: true,
|
|
63
|
-
configurable: true,
|
|
64
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var parseColor = require('../parsers').parseColor;
|
|
4
|
-
|
|
5
|
-
module.exports.definition = {
|
|
6
|
-
set: function (v) {
|
|
7
|
-
this._setProperty('text-line-through-color', parseColor(v));
|
|
8
|
-
},
|
|
9
|
-
get: function () {
|
|
10
|
-
return this.getPropertyValue('text-line-through-color');
|
|
11
|
-
},
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var parseColor = require('../parsers').parseColor;
|
|
4
|
-
|
|
5
|
-
module.exports.definition = {
|
|
6
|
-
set: function (v) {
|
|
7
|
-
this._setProperty('text-overline-color', parseColor(v));
|
|
8
|
-
},
|
|
9
|
-
get: function () {
|
|
10
|
-
return this.getPropertyValue('text-overline-color');
|
|
11
|
-
},
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var parseColor = require('../parsers').parseColor;
|
|
4
|
-
|
|
5
|
-
module.exports.definition = {
|
|
6
|
-
set: function (v) {
|
|
7
|
-
this._setProperty('text-underline-color', parseColor(v));
|
|
8
|
-
},
|
|
9
|
-
get: function () {
|
|
10
|
-
return this.getPropertyValue('text-underline-color');
|
|
11
|
-
},
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var parseColor = require('../parsers').parseColor;
|
|
4
|
-
|
|
5
|
-
module.exports.definition = {
|
|
6
|
-
set: function (v) {
|
|
7
|
-
this._setProperty('-webkit-match-nearest-mail-blockquote-color', parseColor(v));
|
|
8
|
-
},
|
|
9
|
-
get: function () {
|
|
10
|
-
return this.getPropertyValue('-webkit-match-nearest-mail-blockquote-color');
|
|
11
|
-
},
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
};
|