cssstyle 1.0.0 → 1.2.1
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/.eslintignore +3 -0
- package/.eslintrc.js +50 -0
- package/.npmignore +1 -0
- package/.travis.yml +15 -0
- package/README.md +19 -19
- package/lib/CSSStyleDeclaration.js +224 -202
- package/lib/allExtraProperties.js +248 -0
- package/lib/allProperties.js +457 -0
- package/lib/constants.js +6 -0
- package/lib/implementedProperties.js +90 -0
- package/lib/named_colors.json +150 -0
- package/lib/parsers.js +560 -533
- package/lib/properties/azimuth.js +59 -57
- package/lib/properties/background.js +9 -14
- package/lib/properties/backgroundAttachment.js +17 -15
- package/lib/properties/backgroundColor.js +24 -21
- package/lib/properties/backgroundImage.js +20 -17
- package/lib/properties/backgroundPosition.js +40 -38
- package/lib/properties/backgroundRepeat.js +20 -13
- package/lib/properties/border.js +20 -36
- package/lib/properties/borderBottom.js +7 -13
- package/lib/properties/borderBottomColor.js +11 -11
- package/lib/properties/borderBottomStyle.js +14 -14
- package/lib/properties/borderBottomWidth.js +11 -11
- package/lib/properties/borderCollapse.js +17 -16
- package/lib/properties/borderColor.js +17 -15
- package/lib/properties/borderLeft.js +7 -13
- package/lib/properties/borderLeftColor.js +11 -11
- package/lib/properties/borderLeftStyle.js +14 -14
- package/lib/properties/borderLeftWidth.js +11 -11
- package/lib/properties/borderRight.js +7 -13
- package/lib/properties/borderRightColor.js +11 -11
- package/lib/properties/borderRightStyle.js +14 -14
- package/lib/properties/borderRightWidth.js +11 -11
- package/lib/properties/borderSpacing.js +26 -30
- package/lib/properties/borderStyle.js +24 -13
- package/lib/properties/borderTop.js +7 -12
- package/lib/properties/borderTopColor.js +11 -11
- package/lib/properties/borderTopStyle.js +14 -14
- package/lib/properties/borderTopWidth.js +10 -10
- package/lib/properties/borderWidth.js +29 -30
- package/lib/properties/bottom.js +8 -8
- package/lib/properties/clear.js +9 -9
- package/lib/properties/clip.js +37 -39
- package/lib/properties/color.js +8 -8
- package/lib/properties/cssFloat.js +8 -8
- package/lib/properties/flex.js +45 -0
- package/lib/properties/flexBasis.js +28 -0
- package/lib/properties/flexGrow.js +19 -0
- package/lib/properties/flexShrink.js +19 -0
- package/lib/properties/float.js +12 -0
- package/lib/properties/floodColor.js +8 -8
- package/lib/properties/font.js +27 -24
- package/lib/properties/fontFamily.js +21 -21
- package/lib/properties/fontSize.js +16 -13
- package/lib/properties/fontStyle.js +10 -10
- package/lib/properties/fontVariant.js +9 -9
- package/lib/properties/fontWeight.js +25 -10
- package/lib/properties/height.js +15 -15
- package/lib/properties/left.js +8 -8
- package/lib/properties/lightingColor.js +8 -8
- package/lib/properties/lineHeight.js +16 -11
- package/lib/properties/margin.js +49 -40
- package/lib/properties/marginBottom.js +6 -6
- package/lib/properties/marginLeft.js +6 -6
- package/lib/properties/marginRight.js +6 -6
- package/lib/properties/marginTop.js +6 -6
- package/lib/properties/opacity.js +8 -8
- package/lib/properties/outlineColor.js +8 -8
- package/lib/properties/padding.js +42 -33
- package/lib/properties/paddingBottom.js +6 -6
- package/lib/properties/paddingLeft.js +6 -6
- package/lib/properties/paddingRight.js +6 -6
- package/lib/properties/paddingTop.js +6 -6
- package/lib/properties/right.js +8 -8
- package/lib/properties/stopColor.js +8 -8
- package/lib/properties/textLineThroughColor.js +8 -8
- package/lib/properties/textOverlineColor.js +8 -8
- package/lib/properties/textUnderlineColor.js +8 -8
- package/lib/properties/top.js +8 -8
- package/lib/properties/webkitBorderAfterColor.js +8 -8
- package/lib/properties/webkitBorderBeforeColor.js +8 -8
- package/lib/properties/webkitBorderEndColor.js +8 -8
- package/lib/properties/webkitBorderStartColor.js +8 -8
- package/lib/properties/webkitColumnRuleColor.js +8 -8
- package/lib/properties/webkitMatchNearestMailBlockquoteColor.js +8 -8
- package/lib/properties/webkitTapHighlightColor.js +8 -8
- package/lib/properties/webkitTextEmphasisColor.js +8 -8
- package/lib/properties/webkitTextFillColor.js +8 -8
- package/lib/properties/webkitTextStrokeColor.js +8 -8
- package/lib/properties/width.js +15 -15
- package/lib/properties.js +216 -4342
- package/lib/utils/getBasicPropertyDescriptor.js +14 -0
- package/package-lock.json +3767 -0
- package/package.json +28 -10
- package/scripts/download_latest_properties.js +88 -0
- package/scripts/generate_implemented_properties.js +61 -0
- package/scripts/generate_properties.js +107 -117
- package/tests/tests.js +658 -424
- package/lib/properties/alignContent.js +0 -12
- package/lib/properties/alignItems.js +0 -12
- package/lib/properties/alignmentBaseline.js +0 -12
- package/lib/properties/backgroundClip.js +0 -12
- package/lib/properties/backgroundOrigin.js +0 -12
- package/lib/properties/backgroundPositionX.js +0 -12
- package/lib/properties/backgroundPositionY.js +0 -12
- package/lib/properties/backgroundRepeatX.js +0 -12
- package/lib/properties/backgroundRepeatY.js +0 -12
- package/lib/properties/backgroundSize.js +0 -12
- package/lib/properties/baselineShift.js +0 -12
- package/lib/properties/borderBottomLeftRadius.js +0 -12
- package/lib/properties/borderBottomRightRadius.js +0 -12
- package/lib/properties/borderImage.js +0 -12
- package/lib/properties/borderImageOutset.js +0 -12
- package/lib/properties/borderImageRepeat.js +0 -12
- package/lib/properties/borderImageSlice.js +0 -12
- package/lib/properties/borderImageSource.js +0 -12
- package/lib/properties/borderImageWidth.js +0 -12
- package/lib/properties/borderRadius.js +0 -12
- package/lib/properties/borderTopLeftRadius.js +0 -12
- package/lib/properties/borderTopRightRadius.js +0 -12
- package/lib/properties/boxShadow.js +0 -12
- package/lib/properties/boxSizing.js +0 -12
- package/lib/properties/captionSide.js +0 -12
- package/lib/properties/colorInterpolation.js +0 -12
- package/lib/properties/colorInterpolationFilters.js +0 -12
- package/lib/properties/colorProfile.js +0 -12
- package/lib/properties/colorRendering.js +0 -12
- package/lib/properties/content.js +0 -12
- package/lib/properties/counterIncrement.js +0 -12
- package/lib/properties/counterReset.js +0 -12
- package/lib/properties/cue.js +0 -12
- package/lib/properties/cueAfter.js +0 -12
- package/lib/properties/cueBefore.js +0 -12
- package/lib/properties/cursor.js +0 -12
- package/lib/properties/direction.js +0 -12
- package/lib/properties/display.js +0 -12
- package/lib/properties/dominantBaseline.js +0 -12
- package/lib/properties/elevation.js +0 -12
- package/lib/properties/emptyCells.js +0 -12
- package/lib/properties/enableBackground.js +0 -12
- package/lib/properties/fill.js +0 -12
- package/lib/properties/fillOpacity.js +0 -12
- package/lib/properties/fillRule.js +0 -12
- package/lib/properties/filter.js +0 -12
- package/lib/properties/flexDirection.js +0 -12
- package/lib/properties/flexFlow.js +0 -12
- package/lib/properties/flexWrap.js +0 -12
- package/lib/properties/floodOpacity.js +0 -12
- package/lib/properties/fontSizeAdjust.js +0 -12
- package/lib/properties/fontStretch.js +0 -12
- package/lib/properties/glyphOrientationHorizontal.js +0 -12
- package/lib/properties/glyphOrientationVertical.js +0 -12
- package/lib/properties/imageRendering.js +0 -12
- package/lib/properties/justifyContent.js +0 -12
- package/lib/properties/kerning.js +0 -12
- package/lib/properties/letterSpacing.js +0 -12
- package/lib/properties/listStyle.js +0 -12
- package/lib/properties/listStyleImage.js +0 -12
- package/lib/properties/listStylePosition.js +0 -12
- package/lib/properties/listStyleType.js +0 -12
- package/lib/properties/marker.js +0 -12
- package/lib/properties/markerEnd.js +0 -12
- package/lib/properties/markerMid.js +0 -12
- package/lib/properties/markerOffset.js +0 -12
- package/lib/properties/markerStart.js +0 -12
- package/lib/properties/marks.js +0 -12
- package/lib/properties/mask.js +0 -12
- package/lib/properties/maxHeight.js +0 -12
- package/lib/properties/maxWidth.js +0 -12
- package/lib/properties/minHeight.js +0 -12
- package/lib/properties/minWidth.js +0 -12
- package/lib/properties/orphans.js +0 -12
- package/lib/properties/outline.js +0 -12
- package/lib/properties/outlineOffset.js +0 -12
- package/lib/properties/outlineStyle.js +0 -12
- package/lib/properties/outlineWidth.js +0 -12
- package/lib/properties/overflow.js +0 -12
- package/lib/properties/overflowX.js +0 -12
- package/lib/properties/overflowY.js +0 -12
- package/lib/properties/page.js +0 -12
- package/lib/properties/pageBreakAfter.js +0 -12
- package/lib/properties/pageBreakBefore.js +0 -12
- package/lib/properties/pageBreakInside.js +0 -12
- package/lib/properties/pause.js +0 -12
- package/lib/properties/pauseAfter.js +0 -12
- package/lib/properties/pauseBefore.js +0 -12
- package/lib/properties/pitch.js +0 -12
- package/lib/properties/pitchRange.js +0 -12
- package/lib/properties/playDuring.js +0 -12
- package/lib/properties/pointerEvents.js +0 -12
- package/lib/properties/position.js +0 -12
- package/lib/properties/quotes.js +0 -12
- package/lib/properties/resize.js +0 -12
- package/lib/properties/richness.js +0 -12
- package/lib/properties/shapeRendering.js +0 -12
- package/lib/properties/size.js +0 -12
- package/lib/properties/speak.js +0 -12
- package/lib/properties/speakHeader.js +0 -12
- package/lib/properties/speakNumeral.js +0 -12
- package/lib/properties/speakPunctuation.js +0 -12
- package/lib/properties/speechRate.js +0 -12
- package/lib/properties/src.js +0 -12
- package/lib/properties/stopOpacity.js +0 -12
- package/lib/properties/stress.js +0 -12
- package/lib/properties/stroke.js +0 -12
- package/lib/properties/strokeDasharray.js +0 -12
- package/lib/properties/strokeDashoffset.js +0 -12
- package/lib/properties/strokeLinecap.js +0 -12
- package/lib/properties/strokeLinejoin.js +0 -12
- package/lib/properties/strokeMiterlimit.js +0 -12
- package/lib/properties/strokeOpacity.js +0 -12
- package/lib/properties/strokeWidth.js +0 -12
- package/lib/properties/tableLayout.js +0 -12
- package/lib/properties/textAlign.js +0 -12
- package/lib/properties/textAnchor.js +0 -12
- package/lib/properties/textDecoration.js +0 -12
- package/lib/properties/textIndent.js +0 -12
- package/lib/properties/textLineThrough.js +0 -12
- package/lib/properties/textLineThroughMode.js +0 -12
- package/lib/properties/textLineThroughStyle.js +0 -12
- package/lib/properties/textLineThroughWidth.js +0 -12
- package/lib/properties/textOverflow.js +0 -12
- package/lib/properties/textOverline.js +0 -12
- package/lib/properties/textOverlineMode.js +0 -12
- package/lib/properties/textOverlineStyle.js +0 -12
- package/lib/properties/textOverlineWidth.js +0 -12
- package/lib/properties/textRendering.js +0 -12
- package/lib/properties/textShadow.js +0 -12
- package/lib/properties/textTransform.js +0 -12
- package/lib/properties/textUnderline.js +0 -12
- package/lib/properties/textUnderlineMode.js +0 -12
- package/lib/properties/textUnderlineStyle.js +0 -12
- package/lib/properties/textUnderlineWidth.js +0 -12
- package/lib/properties/transform.js +0 -12
- package/lib/properties/unicodeBidi.js +0 -12
- package/lib/properties/unicodeRange.js +0 -12
- package/lib/properties/vectorEffect.js +0 -12
- package/lib/properties/verticalAlign.js +0 -12
- package/lib/properties/visibility.js +0 -12
- package/lib/properties/voiceFamily.js +0 -12
- package/lib/properties/volume.js +0 -12
- package/lib/properties/webkitAnimation.js +0 -12
- package/lib/properties/webkitAnimationDelay.js +0 -12
- package/lib/properties/webkitAnimationDirection.js +0 -12
- package/lib/properties/webkitAnimationDuration.js +0 -12
- package/lib/properties/webkitAnimationFillMode.js +0 -12
- package/lib/properties/webkitAnimationIterationCount.js +0 -12
- package/lib/properties/webkitAnimationName.js +0 -12
- package/lib/properties/webkitAnimationPlayState.js +0 -12
- package/lib/properties/webkitAnimationTimingFunction.js +0 -12
- package/lib/properties/webkitAppearance.js +0 -12
- package/lib/properties/webkitAspectRatio.js +0 -12
- package/lib/properties/webkitBackfaceVisibility.js +0 -12
- package/lib/properties/webkitBackgroundClip.js +0 -12
- package/lib/properties/webkitBackgroundComposite.js +0 -12
- package/lib/properties/webkitBackgroundOrigin.js +0 -12
- package/lib/properties/webkitBackgroundSize.js +0 -12
- package/lib/properties/webkitBorderAfter.js +0 -12
- package/lib/properties/webkitBorderAfterStyle.js +0 -12
- package/lib/properties/webkitBorderAfterWidth.js +0 -12
- package/lib/properties/webkitBorderBefore.js +0 -12
- package/lib/properties/webkitBorderBeforeStyle.js +0 -12
- package/lib/properties/webkitBorderBeforeWidth.js +0 -12
- package/lib/properties/webkitBorderEnd.js +0 -12
- package/lib/properties/webkitBorderEndStyle.js +0 -12
- package/lib/properties/webkitBorderEndWidth.js +0 -12
- package/lib/properties/webkitBorderFit.js +0 -12
- package/lib/properties/webkitBorderHorizontalSpacing.js +0 -12
- package/lib/properties/webkitBorderImage.js +0 -12
- package/lib/properties/webkitBorderRadius.js +0 -12
- package/lib/properties/webkitBorderStart.js +0 -12
- package/lib/properties/webkitBorderStartStyle.js +0 -12
- package/lib/properties/webkitBorderStartWidth.js +0 -12
- package/lib/properties/webkitBorderVerticalSpacing.js +0 -12
- package/lib/properties/webkitBoxAlign.js +0 -12
- package/lib/properties/webkitBoxDirection.js +0 -12
- package/lib/properties/webkitBoxFlex.js +0 -12
- package/lib/properties/webkitBoxFlexGroup.js +0 -12
- package/lib/properties/webkitBoxLines.js +0 -12
- package/lib/properties/webkitBoxOrdinalGroup.js +0 -12
- package/lib/properties/webkitBoxOrient.js +0 -12
- package/lib/properties/webkitBoxPack.js +0 -12
- package/lib/properties/webkitBoxReflect.js +0 -12
- package/lib/properties/webkitBoxShadow.js +0 -12
- package/lib/properties/webkitColorCorrection.js +0 -12
- package/lib/properties/webkitColumnAxis.js +0 -12
- package/lib/properties/webkitColumnBreakAfter.js +0 -12
- package/lib/properties/webkitColumnBreakBefore.js +0 -12
- package/lib/properties/webkitColumnBreakInside.js +0 -12
- package/lib/properties/webkitColumnCount.js +0 -12
- package/lib/properties/webkitColumnGap.js +0 -12
- package/lib/properties/webkitColumnRule.js +0 -12
- package/lib/properties/webkitColumnRuleStyle.js +0 -12
- package/lib/properties/webkitColumnRuleWidth.js +0 -12
- package/lib/properties/webkitColumnSpan.js +0 -12
- package/lib/properties/webkitColumnWidth.js +0 -12
- package/lib/properties/webkitColumns.js +0 -12
- package/lib/properties/webkitFilter.js +0 -12
- package/lib/properties/webkitFlexAlign.js +0 -12
- package/lib/properties/webkitFlexDirection.js +0 -12
- package/lib/properties/webkitFlexFlow.js +0 -12
- package/lib/properties/webkitFlexItemAlign.js +0 -12
- package/lib/properties/webkitFlexLinePack.js +0 -12
- package/lib/properties/webkitFlexOrder.js +0 -12
- package/lib/properties/webkitFlexPack.js +0 -12
- package/lib/properties/webkitFlexWrap.js +0 -12
- package/lib/properties/webkitFlowFrom.js +0 -12
- package/lib/properties/webkitFlowInto.js +0 -12
- package/lib/properties/webkitFontFeatureSettings.js +0 -12
- package/lib/properties/webkitFontKerning.js +0 -12
- package/lib/properties/webkitFontSizeDelta.js +0 -12
- package/lib/properties/webkitFontSmoothing.js +0 -12
- package/lib/properties/webkitFontVariantLigatures.js +0 -12
- package/lib/properties/webkitHighlight.js +0 -12
- package/lib/properties/webkitHyphenateCharacter.js +0 -12
- package/lib/properties/webkitHyphenateLimitAfter.js +0 -12
- package/lib/properties/webkitHyphenateLimitBefore.js +0 -12
- package/lib/properties/webkitHyphenateLimitLines.js +0 -12
- package/lib/properties/webkitHyphens.js +0 -12
- package/lib/properties/webkitLineAlign.js +0 -12
- package/lib/properties/webkitLineBoxContain.js +0 -12
- package/lib/properties/webkitLineBreak.js +0 -12
- package/lib/properties/webkitLineClamp.js +0 -12
- package/lib/properties/webkitLineGrid.js +0 -12
- package/lib/properties/webkitLineSnap.js +0 -12
- package/lib/properties/webkitLocale.js +0 -12
- package/lib/properties/webkitLogicalHeight.js +0 -12
- package/lib/properties/webkitLogicalWidth.js +0 -12
- package/lib/properties/webkitMarginAfter.js +0 -12
- package/lib/properties/webkitMarginAfterCollapse.js +0 -12
- package/lib/properties/webkitMarginBefore.js +0 -12
- package/lib/properties/webkitMarginBeforeCollapse.js +0 -12
- package/lib/properties/webkitMarginBottomCollapse.js +0 -12
- package/lib/properties/webkitMarginCollapse.js +0 -12
- package/lib/properties/webkitMarginEnd.js +0 -12
- package/lib/properties/webkitMarginStart.js +0 -12
- package/lib/properties/webkitMarginTopCollapse.js +0 -12
- package/lib/properties/webkitMarquee.js +0 -12
- package/lib/properties/webkitMarqueeDirection.js +0 -12
- package/lib/properties/webkitMarqueeIncrement.js +0 -12
- package/lib/properties/webkitMarqueeRepetition.js +0 -12
- package/lib/properties/webkitMarqueeSpeed.js +0 -12
- package/lib/properties/webkitMarqueeStyle.js +0 -12
- package/lib/properties/webkitMask.js +0 -12
- package/lib/properties/webkitMaskAttachment.js +0 -12
- package/lib/properties/webkitMaskBoxImage.js +0 -12
- package/lib/properties/webkitMaskBoxImageOutset.js +0 -12
- package/lib/properties/webkitMaskBoxImageRepeat.js +0 -12
- package/lib/properties/webkitMaskBoxImageSlice.js +0 -12
- package/lib/properties/webkitMaskBoxImageSource.js +0 -12
- package/lib/properties/webkitMaskBoxImageWidth.js +0 -12
- package/lib/properties/webkitMaskClip.js +0 -12
- package/lib/properties/webkitMaskComposite.js +0 -12
- package/lib/properties/webkitMaskImage.js +0 -12
- package/lib/properties/webkitMaskOrigin.js +0 -12
- package/lib/properties/webkitMaskPosition.js +0 -12
- package/lib/properties/webkitMaskPositionX.js +0 -12
- package/lib/properties/webkitMaskPositionY.js +0 -12
- package/lib/properties/webkitMaskRepeat.js +0 -12
- package/lib/properties/webkitMaskRepeatX.js +0 -12
- package/lib/properties/webkitMaskRepeatY.js +0 -12
- package/lib/properties/webkitMaskSize.js +0 -12
- package/lib/properties/webkitMaxLogicalHeight.js +0 -12
- package/lib/properties/webkitMaxLogicalWidth.js +0 -12
- package/lib/properties/webkitMinLogicalHeight.js +0 -12
- package/lib/properties/webkitMinLogicalWidth.js +0 -12
- package/lib/properties/webkitNbspMode.js +0 -12
- package/lib/properties/webkitOverflowScrolling.js +0 -12
- package/lib/properties/webkitPaddingAfter.js +0 -12
- package/lib/properties/webkitPaddingBefore.js +0 -12
- package/lib/properties/webkitPaddingEnd.js +0 -12
- package/lib/properties/webkitPaddingStart.js +0 -12
- package/lib/properties/webkitPerspective.js +0 -12
- package/lib/properties/webkitPerspectiveOrigin.js +0 -12
- package/lib/properties/webkitPerspectiveOriginX.js +0 -12
- package/lib/properties/webkitPerspectiveOriginY.js +0 -12
- package/lib/properties/webkitPrintColorAdjust.js +0 -12
- package/lib/properties/webkitRegionBreakAfter.js +0 -12
- package/lib/properties/webkitRegionBreakBefore.js +0 -12
- package/lib/properties/webkitRegionBreakInside.js +0 -12
- package/lib/properties/webkitRegionOverflow.js +0 -12
- package/lib/properties/webkitRtlOrdering.js +0 -12
- package/lib/properties/webkitSvgShadow.js +0 -12
- package/lib/properties/webkitTextCombine.js +0 -12
- package/lib/properties/webkitTextDecorationsInEffect.js +0 -12
- package/lib/properties/webkitTextEmphasis.js +0 -12
- package/lib/properties/webkitTextEmphasisPosition.js +0 -12
- package/lib/properties/webkitTextEmphasisStyle.js +0 -12
- package/lib/properties/webkitTextOrientation.js +0 -12
- package/lib/properties/webkitTextSecurity.js +0 -12
- package/lib/properties/webkitTextSizeAdjust.js +0 -12
- package/lib/properties/webkitTextStroke.js +0 -12
- package/lib/properties/webkitTextStrokeWidth.js +0 -12
- package/lib/properties/webkitTransform.js +0 -12
- package/lib/properties/webkitTransformOrigin.js +0 -12
- package/lib/properties/webkitTransformOriginX.js +0 -12
- package/lib/properties/webkitTransformOriginY.js +0 -12
- package/lib/properties/webkitTransformOriginZ.js +0 -12
- package/lib/properties/webkitTransformStyle.js +0 -12
- package/lib/properties/webkitTransition.js +0 -12
- package/lib/properties/webkitTransitionDelay.js +0 -12
- package/lib/properties/webkitTransitionDuration.js +0 -12
- package/lib/properties/webkitTransitionProperty.js +0 -12
- package/lib/properties/webkitTransitionTimingFunction.js +0 -12
- package/lib/properties/webkitUserDrag.js +0 -12
- package/lib/properties/webkitUserModify.js +0 -12
- package/lib/properties/webkitUserSelect.js +0 -12
- package/lib/properties/webkitWrap.js +0 -12
- package/lib/properties/webkitWrapFlow.js +0 -12
- package/lib/properties/webkitWrapMargin.js +0 -12
- package/lib/properties/webkitWrapPadding.js +0 -12
- package/lib/properties/webkitWrapShapeInside.js +0 -12
- package/lib/properties/webkitWrapShapeOutside.js +0 -12
- package/lib/properties/webkitWrapThrough.js +0 -12
- package/lib/properties/webkitWritingMode.js +0 -12
- package/lib/properties/whiteSpace.js +0 -12
- package/lib/properties/widows.js +0 -12
- package/lib/properties/wordBreak.js +0 -12
- package/lib/properties/wordSpacing.js +0 -12
- package/lib/properties/wordWrap.js +0 -12
- package/lib/properties/writingMode.js +0 -12
- package/lib/properties/zIndex.js +0 -12
- package/lib/properties/zoom.js +0 -12
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
root: true,
|
|
5
|
+
extends: ['eslint:recommended', 'prettier'],
|
|
6
|
+
parserOptions: {
|
|
7
|
+
ecmaVersion: 2018,
|
|
8
|
+
},
|
|
9
|
+
env: {
|
|
10
|
+
es6: true,
|
|
11
|
+
},
|
|
12
|
+
globals: {
|
|
13
|
+
exports: true,
|
|
14
|
+
module: true,
|
|
15
|
+
require: true,
|
|
16
|
+
window: true,
|
|
17
|
+
},
|
|
18
|
+
plugins: ['prettier'],
|
|
19
|
+
rules: {
|
|
20
|
+
'prettier/prettier': [
|
|
21
|
+
'warn',
|
|
22
|
+
{
|
|
23
|
+
printWidth: 100,
|
|
24
|
+
singleQuote: true,
|
|
25
|
+
trailingComma: 'es5',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
strict: ['warn', 'global'],
|
|
29
|
+
},
|
|
30
|
+
overrides: [
|
|
31
|
+
{
|
|
32
|
+
files: ['lib/implementedProperties.js', 'lib/properties.js'],
|
|
33
|
+
rules: {
|
|
34
|
+
'prettier/prettier': 'off',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
files: 'scripts/**/*',
|
|
39
|
+
rules: {
|
|
40
|
+
'no-console': 'off',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
files: ['scripts/**/*', 'tests/**/*'],
|
|
45
|
+
env: {
|
|
46
|
+
node: true,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
};
|
package/.npmignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
node_module
|
package/.travis.yml
ADDED
package/README.md
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
CSSStyleDeclaration
|
|
2
|
-
|
|
1
|
+
# CSSStyleDeclaration
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/cssstyle) [](https://travis-ci.org/jsakas/CSSStyleDeclaration)
|
|
3
4
|
|
|
4
5
|
CSSStyleDeclaration is a work-a-like to the CSSStyleDeclaration class in Nikita Vasilyev's [CSSOM](https://github.com/NV/CSSOM). I made it so that when using [jQuery in node](https://github.com/tmtk75/node-jquery) setting css attributes via $.fn.css() would work. node-jquery uses [jsdom](https://github.com/tmpvar/jsdom) to create a DOM to use in node. jsdom uses CSSOM for styling, and CSSOM's implementation of the [CSSStyleDeclaration](http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration) doesn't support [CSS2Properties](http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties), which is how jQuery's [$.fn.css()](http://api.jquery.com/css/) operates.
|
|
5
6
|
|
|
7
|
+
### Why not just issue a pull request?
|
|
6
8
|
|
|
7
|
-
Why not just issue a pull request?
|
|
8
|
-
----
|
|
9
9
|
Well, NV wants to keep CSSOM fast (which I can appreciate) and CSS2Properties aren't required by the standard (though every browser has the interface). So I figured the path of least resistance would be to just modify this one class, publish it as a node module (that requires CSSOM) and then make a pull request of jsdom to use it.
|
|
10
10
|
|
|
11
|
-
How do I test this code?
|
|
12
|
-
|
|
11
|
+
### How do I test this code?
|
|
12
|
+
|
|
13
13
|
`npm test` should do the trick, assuming you have the dev dependencies installed:
|
|
14
|
-
> ```
|
|
15
|
-
> $ npm test
|
|
16
|
-
>
|
|
17
|
-
> tests
|
|
18
|
-
> ✔ Verify Has Properties
|
|
19
|
-
> ✔ Verify Has Functions
|
|
20
|
-
> ✔ Verify Has Special Properties
|
|
21
|
-
> ✔ Test From Style String
|
|
22
|
-
> ✔ Test From Properties
|
|
23
|
-
> ✔ Test Shorthand Properties
|
|
24
|
-
> ✔ Test width and height Properties and null and empty strings
|
|
25
|
-
> ✔ Test Implicit Properties
|
|
26
|
-
> ```
|
|
27
14
|
|
|
15
|
+
```
|
|
16
|
+
$ npm test
|
|
17
|
+
|
|
18
|
+
tests
|
|
19
|
+
✔ Verify Has Properties
|
|
20
|
+
✔ Verify Has Functions
|
|
21
|
+
✔ Verify Has Special Properties
|
|
22
|
+
✔ Test From Style String
|
|
23
|
+
✔ Test From Properties
|
|
24
|
+
✔ Test Shorthand Properties
|
|
25
|
+
✔ Test width and height Properties and null and empty strings
|
|
26
|
+
✔ Test Implicit Properties
|
|
27
|
+
```
|
|
@@ -2,232 +2,254 @@
|
|
|
2
2
|
* This is a fork from the CSS Style Declaration part of
|
|
3
3
|
* https://github.com/NV/CSSOM
|
|
4
4
|
********************************************************************/
|
|
5
|
-
|
|
5
|
+
'use strict';
|
|
6
6
|
var CSSOM = require('cssom');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
var
|
|
7
|
+
var allProperties = require('./allProperties');
|
|
8
|
+
var allExtraProperties = require('./allExtraProperties');
|
|
9
|
+
var implementedProperties = require('./implementedProperties');
|
|
10
|
+
var { dashedToCamelCase } = require('./parsers');
|
|
11
|
+
var getBasicPropertyDescriptor = require('./utils/getBasicPropertyDescriptor');
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @constructor
|
|
15
15
|
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration
|
|
16
16
|
*/
|
|
17
17
|
var CSSStyleDeclaration = function CSSStyleDeclaration(onChangeCallback) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
this._values = {};
|
|
19
|
+
this._importants = {};
|
|
20
|
+
this._length = 0;
|
|
21
|
+
this._onChange =
|
|
22
|
+
onChangeCallback ||
|
|
23
|
+
function() {
|
|
24
|
+
return;
|
|
25
|
+
};
|
|
22
26
|
};
|
|
23
27
|
CSSStyleDeclaration.prototype = {
|
|
24
|
-
|
|
28
|
+
constructor: CSSStyleDeclaration,
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @param {string} name
|
|
33
|
+
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue
|
|
34
|
+
* @return {string} the value of the property if it has been explicitly set for this declaration block.
|
|
35
|
+
* Returns the empty string if the property has not been set.
|
|
36
|
+
*/
|
|
37
|
+
getPropertyValue: function(name) {
|
|
38
|
+
if (!this._values.hasOwnProperty(name)) {
|
|
39
|
+
return '';
|
|
40
|
+
}
|
|
41
|
+
return this._values[name].toString();
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @param {string} name
|
|
47
|
+
* @param {string} value
|
|
48
|
+
* @param {string} [priority=null] "important" or null
|
|
49
|
+
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty
|
|
50
|
+
*/
|
|
51
|
+
setProperty: function(name, value, priority) {
|
|
52
|
+
if (value === undefined) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (value === null || value === '') {
|
|
56
|
+
this.removeProperty(name);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
var lowercaseName = name.toLowerCase();
|
|
60
|
+
if (!allProperties.has(lowercaseName) && !allExtraProperties.has(lowercaseName)) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
25
63
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
64
|
+
this[lowercaseName] = value;
|
|
65
|
+
this._importants[lowercaseName] = priority;
|
|
66
|
+
},
|
|
67
|
+
_setProperty: function(name, value, priority) {
|
|
68
|
+
if (value === undefined) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (value === null || value === '') {
|
|
72
|
+
this.removeProperty(name);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (this._values[name]) {
|
|
76
|
+
// Property already exist. Overwrite it.
|
|
77
|
+
var index = Array.prototype.indexOf.call(this, name);
|
|
78
|
+
if (index < 0) {
|
|
79
|
+
this[this._length] = name;
|
|
80
|
+
this._length++;
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
// New property.
|
|
84
|
+
this[this._length] = name;
|
|
85
|
+
this._length++;
|
|
86
|
+
}
|
|
87
|
+
this._values[name] = value;
|
|
88
|
+
this._importants[name] = priority;
|
|
89
|
+
this._onChange(this.cssText);
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @param {string} name
|
|
95
|
+
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty
|
|
96
|
+
* @return {string} the value of the property if it has been explicitly set for this declaration block.
|
|
97
|
+
* Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property.
|
|
98
|
+
*/
|
|
99
|
+
removeProperty: function(name) {
|
|
100
|
+
if (!this._values.hasOwnProperty(name)) {
|
|
101
|
+
return '';
|
|
102
|
+
}
|
|
39
103
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
* @param {string} value
|
|
44
|
-
* @param {string} [priority=null] "important" or null
|
|
45
|
-
* @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty
|
|
46
|
-
*/
|
|
47
|
-
setProperty: function (name, value, priority) {
|
|
48
|
-
if (value === undefined) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (value === null || value === '') {
|
|
52
|
-
this.removeProperty(name);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
var camel_case = dashedToCamelCase(name);
|
|
56
|
-
this[camel_case] = value;
|
|
57
|
-
this._importants[name] = priority;
|
|
58
|
-
},
|
|
59
|
-
_setProperty: function (name, value, priority) {
|
|
60
|
-
if (value === undefined) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
if (value === null || value === '') {
|
|
64
|
-
this.removeProperty(name);
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
if (this._values[name]) {
|
|
68
|
-
// Property already exist. Overwrite it.
|
|
69
|
-
var index = Array.prototype.indexOf.call(this, name);
|
|
70
|
-
if (index < 0) {
|
|
71
|
-
this[this._length] = name;
|
|
72
|
-
this._length++;
|
|
73
|
-
}
|
|
74
|
-
} else {
|
|
75
|
-
// New property.
|
|
76
|
-
this[this._length] = name;
|
|
77
|
-
this._length++;
|
|
78
|
-
}
|
|
79
|
-
this._values[name] = value;
|
|
80
|
-
this._importants[name] = priority;
|
|
81
|
-
this._onChange(this.cssText);
|
|
82
|
-
},
|
|
104
|
+
var prevValue = this._values[name];
|
|
105
|
+
delete this._values[name];
|
|
106
|
+
delete this._importants[name];
|
|
83
107
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
* @return {string} the value of the property if it has been explicitly set for this declaration block.
|
|
89
|
-
* Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property.
|
|
90
|
-
*/
|
|
91
|
-
removeProperty: function (name) {
|
|
92
|
-
if (!this._values.hasOwnProperty(name)) {
|
|
93
|
-
return "";
|
|
94
|
-
}
|
|
108
|
+
var index = Array.prototype.indexOf.call(this, name);
|
|
109
|
+
if (index < 0) {
|
|
110
|
+
return prevValue;
|
|
111
|
+
}
|
|
95
112
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
113
|
+
// That's what WebKit and Opera do
|
|
114
|
+
Array.prototype.splice.call(this, index, 1);
|
|
115
|
+
|
|
116
|
+
// That's what Firefox does
|
|
117
|
+
//this[index] = ""
|
|
118
|
+
|
|
119
|
+
this._onChange(this.cssText);
|
|
120
|
+
return prevValue;
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
* @param {String} name
|
|
126
|
+
*/
|
|
127
|
+
getPropertyPriority: function(name) {
|
|
128
|
+
return this._importants[name] || '';
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
getPropertyCSSValue: function() {
|
|
132
|
+
//FIXME
|
|
133
|
+
return;
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* element.style.overflow = "auto"
|
|
138
|
+
* element.style.getPropertyShorthand("overflow-x")
|
|
139
|
+
* -> "overflow"
|
|
140
|
+
*/
|
|
141
|
+
getPropertyShorthand: function() {
|
|
142
|
+
//FIXME
|
|
143
|
+
return;
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
isPropertyImplicit: function() {
|
|
147
|
+
//FIXME
|
|
148
|
+
return;
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-item
|
|
153
|
+
*/
|
|
154
|
+
item: function(index) {
|
|
155
|
+
index = parseInt(index, 10);
|
|
156
|
+
if (index < 0 || index >= this._length) {
|
|
157
|
+
return '';
|
|
158
|
+
}
|
|
159
|
+
return this[index];
|
|
160
|
+
},
|
|
161
|
+
};
|
|
99
162
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
163
|
+
Object.defineProperties(CSSStyleDeclaration.prototype, {
|
|
164
|
+
cssText: {
|
|
165
|
+
get: function() {
|
|
166
|
+
var properties = [];
|
|
167
|
+
var i;
|
|
168
|
+
var name;
|
|
169
|
+
var value;
|
|
170
|
+
var priority;
|
|
171
|
+
for (i = 0; i < this._length; i++) {
|
|
172
|
+
name = this[i];
|
|
173
|
+
value = this.getPropertyValue(name);
|
|
174
|
+
priority = this.getPropertyPriority(name);
|
|
175
|
+
if (priority !== '') {
|
|
176
|
+
priority = ' !' + priority;
|
|
103
177
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
// That's what Firefox does
|
|
109
|
-
//this[index] = ""
|
|
110
|
-
|
|
111
|
-
this._onChange(this.cssText);
|
|
112
|
-
return prevValue;
|
|
178
|
+
properties.push([name, ': ', value, priority, ';'].join(''));
|
|
179
|
+
}
|
|
180
|
+
return properties.join(' ');
|
|
113
181
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
getPropertyCSSValue: function () {
|
|
126
|
-
//FIXME
|
|
182
|
+
set: function(value) {
|
|
183
|
+
var i;
|
|
184
|
+
this._values = {};
|
|
185
|
+
Array.prototype.splice.call(this, 0, this._length);
|
|
186
|
+
this._importants = {};
|
|
187
|
+
var dummyRule;
|
|
188
|
+
try {
|
|
189
|
+
dummyRule = CSSOM.parse('#bogus{' + value + '}').cssRules[0].style;
|
|
190
|
+
} catch (err) {
|
|
191
|
+
// malformed css, just return
|
|
127
192
|
return;
|
|
193
|
+
}
|
|
194
|
+
var rule_length = dummyRule.length;
|
|
195
|
+
var name;
|
|
196
|
+
for (i = 0; i < rule_length; ++i) {
|
|
197
|
+
name = dummyRule[i];
|
|
198
|
+
this.setProperty(
|
|
199
|
+
dummyRule[i],
|
|
200
|
+
dummyRule.getPropertyValue(name),
|
|
201
|
+
dummyRule.getPropertyPriority(name)
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
this._onChange(this.cssText);
|
|
128
205
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
getPropertyShorthand: function () {
|
|
136
|
-
//FIXME
|
|
137
|
-
return;
|
|
206
|
+
enumerable: true,
|
|
207
|
+
configurable: true,
|
|
208
|
+
},
|
|
209
|
+
parentRule: {
|
|
210
|
+
get: function() {
|
|
211
|
+
return null;
|
|
138
212
|
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
213
|
+
enumerable: true,
|
|
214
|
+
configurable: true,
|
|
215
|
+
},
|
|
216
|
+
length: {
|
|
217
|
+
get: function() {
|
|
218
|
+
return this._length;
|
|
143
219
|
},
|
|
144
|
-
|
|
145
220
|
/**
|
|
146
|
-
*
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
Object.defineProperties(CSSStyleDeclaration.prototype, {
|
|
158
|
-
cssText: {
|
|
159
|
-
get: function () {
|
|
160
|
-
var properties = [];
|
|
161
|
-
var i;
|
|
162
|
-
var name;
|
|
163
|
-
var value;
|
|
164
|
-
var priority;
|
|
165
|
-
for (i = 0; i < this._length; i++) {
|
|
166
|
-
name = this[i];
|
|
167
|
-
value = this.getPropertyValue(name);
|
|
168
|
-
priority = this.getPropertyPriority(name);
|
|
169
|
-
if (priority !== '') {
|
|
170
|
-
priority = " !" + priority;
|
|
171
|
-
}
|
|
172
|
-
properties.push([name, ': ', value, priority, ';'].join(''));
|
|
173
|
-
}
|
|
174
|
-
return properties.join(' ');
|
|
175
|
-
},
|
|
176
|
-
set: function (value) {
|
|
177
|
-
var i;
|
|
178
|
-
this._values = {};
|
|
179
|
-
Array.prototype.splice.call(this, 0, this._length);
|
|
180
|
-
this._importants = {};
|
|
181
|
-
var dummyRule;
|
|
182
|
-
try {
|
|
183
|
-
dummyRule = CSSOM.parse('#bogus{' + value + '}').cssRules[0].style;
|
|
184
|
-
} catch (err) {
|
|
185
|
-
// malformed css, just return
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
var rule_length = dummyRule.length;
|
|
189
|
-
var name;
|
|
190
|
-
for (i = 0; i < rule_length; ++i) {
|
|
191
|
-
name = dummyRule[i];
|
|
192
|
-
this.setProperty(dummyRule[i], dummyRule.getPropertyValue(name), dummyRule.getPropertyPriority(name));
|
|
193
|
-
}
|
|
194
|
-
this._onChange(this.cssText);
|
|
195
|
-
},
|
|
196
|
-
enumerable: true,
|
|
197
|
-
configurable: true
|
|
198
|
-
},
|
|
199
|
-
parentRule: {
|
|
200
|
-
get: function () { return null; },
|
|
201
|
-
enumerable: true,
|
|
202
|
-
configurable: true
|
|
221
|
+
* This deletes indices if the new length is less then the current
|
|
222
|
+
* length. If the new length is more, it does nothing, the new indices
|
|
223
|
+
* will be undefined until set.
|
|
224
|
+
**/
|
|
225
|
+
set: function(value) {
|
|
226
|
+
var i;
|
|
227
|
+
for (i = value; i < this._length; i++) {
|
|
228
|
+
delete this[i];
|
|
229
|
+
}
|
|
230
|
+
this._length = value;
|
|
203
231
|
},
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
* This deletes indices if the new length is less then the current
|
|
208
|
-
* length. If the new length is more, it does nothing, the new indices
|
|
209
|
-
* will be undefined until set.
|
|
210
|
-
**/
|
|
211
|
-
set: function (value) {
|
|
212
|
-
var i;
|
|
213
|
-
for (i = value; i < this._length; i++) {
|
|
214
|
-
delete this[i];
|
|
215
|
-
}
|
|
216
|
-
this._length = value;
|
|
217
|
-
},
|
|
218
|
-
enumerable: true,
|
|
219
|
-
configurable: true
|
|
220
|
-
},
|
|
221
|
-
'float': {
|
|
222
|
-
get: function () { return this.cssFloat; },
|
|
223
|
-
set: function (value) {
|
|
224
|
-
this.cssFloat = value;
|
|
225
|
-
},
|
|
226
|
-
enumerable: true,
|
|
227
|
-
configurable: true
|
|
228
|
-
}
|
|
232
|
+
enumerable: true,
|
|
233
|
+
configurable: true,
|
|
234
|
+
},
|
|
229
235
|
});
|
|
230
236
|
|
|
231
237
|
require('./properties')(CSSStyleDeclaration.prototype);
|
|
232
238
|
|
|
239
|
+
allProperties.forEach(function(property) {
|
|
240
|
+
if (!implementedProperties.has(property)) {
|
|
241
|
+
var declaration = getBasicPropertyDescriptor(property);
|
|
242
|
+
Object.defineProperty(CSSStyleDeclaration.prototype, property, declaration);
|
|
243
|
+
Object.defineProperty(CSSStyleDeclaration.prototype, dashedToCamelCase(property), declaration);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
allExtraProperties.forEach(function(property) {
|
|
248
|
+
if (!implementedProperties.has(property)) {
|
|
249
|
+
var declaration = getBasicPropertyDescriptor(property);
|
|
250
|
+
Object.defineProperty(CSSStyleDeclaration.prototype, property, declaration);
|
|
251
|
+
Object.defineProperty(CSSStyleDeclaration.prototype, dashedToCamelCase(property), declaration);
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
|
|
233
255
|
exports.CSSStyleDeclaration = CSSStyleDeclaration;
|