cssstyle 1.1.0 → 1.2.2

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.
Files changed (424) hide show
  1. package/.eslintignore +3 -0
  2. package/.eslintrc.js +50 -0
  3. package/.travis.yml +15 -0
  4. package/README.md +1 -1
  5. package/lib/CSSStyleDeclaration.js +224 -202
  6. package/lib/allExtraProperties.js +248 -0
  7. package/lib/allProperties.js +457 -0
  8. package/lib/constants.js +6 -0
  9. package/lib/implementedProperties.js +90 -0
  10. package/lib/named_colors.json +152 -0
  11. package/lib/parsers.js +560 -533
  12. package/lib/properties/azimuth.js +59 -57
  13. package/lib/properties/background.js +9 -14
  14. package/lib/properties/backgroundAttachment.js +17 -15
  15. package/lib/properties/backgroundColor.js +24 -21
  16. package/lib/properties/backgroundImage.js +20 -17
  17. package/lib/properties/backgroundPosition.js +40 -38
  18. package/lib/properties/backgroundRepeat.js +20 -13
  19. package/lib/properties/border.js +20 -36
  20. package/lib/properties/borderBottom.js +7 -13
  21. package/lib/properties/borderBottomColor.js +11 -11
  22. package/lib/properties/borderBottomStyle.js +14 -14
  23. package/lib/properties/borderBottomWidth.js +11 -11
  24. package/lib/properties/borderCollapse.js +17 -16
  25. package/lib/properties/borderColor.js +17 -15
  26. package/lib/properties/borderLeft.js +7 -13
  27. package/lib/properties/borderLeftColor.js +11 -11
  28. package/lib/properties/borderLeftStyle.js +14 -14
  29. package/lib/properties/borderLeftWidth.js +11 -11
  30. package/lib/properties/borderRight.js +7 -13
  31. package/lib/properties/borderRightColor.js +11 -11
  32. package/lib/properties/borderRightStyle.js +14 -14
  33. package/lib/properties/borderRightWidth.js +11 -11
  34. package/lib/properties/borderSpacing.js +26 -30
  35. package/lib/properties/borderStyle.js +24 -13
  36. package/lib/properties/borderTop.js +7 -12
  37. package/lib/properties/borderTopColor.js +11 -11
  38. package/lib/properties/borderTopStyle.js +14 -14
  39. package/lib/properties/borderTopWidth.js +10 -10
  40. package/lib/properties/borderWidth.js +29 -30
  41. package/lib/properties/bottom.js +8 -8
  42. package/lib/properties/clear.js +9 -9
  43. package/lib/properties/clip.js +37 -39
  44. package/lib/properties/color.js +8 -8
  45. package/lib/properties/cssFloat.js +8 -8
  46. package/lib/properties/flex.js +45 -0
  47. package/lib/properties/flexBasis.js +28 -0
  48. package/lib/properties/flexGrow.js +19 -0
  49. package/lib/properties/flexShrink.js +19 -0
  50. package/lib/properties/float.js +12 -0
  51. package/lib/properties/floodColor.js +8 -8
  52. package/lib/properties/font.js +27 -24
  53. package/lib/properties/fontFamily.js +21 -21
  54. package/lib/properties/fontSize.js +16 -13
  55. package/lib/properties/fontStyle.js +10 -10
  56. package/lib/properties/fontVariant.js +9 -9
  57. package/lib/properties/fontWeight.js +25 -10
  58. package/lib/properties/height.js +15 -15
  59. package/lib/properties/left.js +8 -8
  60. package/lib/properties/lightingColor.js +8 -8
  61. package/lib/properties/lineHeight.js +16 -11
  62. package/lib/properties/margin.js +49 -40
  63. package/lib/properties/marginBottom.js +6 -6
  64. package/lib/properties/marginLeft.js +6 -6
  65. package/lib/properties/marginRight.js +6 -6
  66. package/lib/properties/marginTop.js +6 -6
  67. package/lib/properties/opacity.js +8 -8
  68. package/lib/properties/outlineColor.js +8 -8
  69. package/lib/properties/padding.js +42 -33
  70. package/lib/properties/paddingBottom.js +6 -6
  71. package/lib/properties/paddingLeft.js +6 -6
  72. package/lib/properties/paddingRight.js +6 -6
  73. package/lib/properties/paddingTop.js +6 -6
  74. package/lib/properties/right.js +8 -8
  75. package/lib/properties/stopColor.js +8 -8
  76. package/lib/properties/textLineThroughColor.js +8 -8
  77. package/lib/properties/textOverlineColor.js +8 -8
  78. package/lib/properties/textUnderlineColor.js +8 -8
  79. package/lib/properties/top.js +8 -8
  80. package/lib/properties/webkitBorderAfterColor.js +8 -8
  81. package/lib/properties/webkitBorderBeforeColor.js +8 -8
  82. package/lib/properties/webkitBorderEndColor.js +8 -8
  83. package/lib/properties/webkitBorderStartColor.js +8 -8
  84. package/lib/properties/webkitColumnRuleColor.js +8 -8
  85. package/lib/properties/webkitMatchNearestMailBlockquoteColor.js +8 -8
  86. package/lib/properties/webkitTapHighlightColor.js +8 -8
  87. package/lib/properties/webkitTextEmphasisColor.js +8 -8
  88. package/lib/properties/webkitTextFillColor.js +8 -8
  89. package/lib/properties/webkitTextStrokeColor.js +8 -8
  90. package/lib/properties/width.js +15 -15
  91. package/lib/properties.js +216 -4342
  92. package/lib/utils/getBasicPropertyDescriptor.js +14 -0
  93. package/package.json +28 -10
  94. package/scripts/download_latest_properties.js +88 -0
  95. package/scripts/generate_implemented_properties.js +61 -0
  96. package/scripts/generate_properties.js +107 -117
  97. package/tests/tests.js +662 -439
  98. package/lib/properties/alignContent.js +0 -12
  99. package/lib/properties/alignItems.js +0 -12
  100. package/lib/properties/alignmentBaseline.js +0 -12
  101. package/lib/properties/backgroundClip.js +0 -12
  102. package/lib/properties/backgroundOrigin.js +0 -12
  103. package/lib/properties/backgroundPositionX.js +0 -12
  104. package/lib/properties/backgroundPositionY.js +0 -12
  105. package/lib/properties/backgroundRepeatX.js +0 -12
  106. package/lib/properties/backgroundRepeatY.js +0 -12
  107. package/lib/properties/backgroundSize.js +0 -12
  108. package/lib/properties/baselineShift.js +0 -12
  109. package/lib/properties/borderBottomLeftRadius.js +0 -12
  110. package/lib/properties/borderBottomRightRadius.js +0 -12
  111. package/lib/properties/borderImage.js +0 -12
  112. package/lib/properties/borderImageOutset.js +0 -12
  113. package/lib/properties/borderImageRepeat.js +0 -12
  114. package/lib/properties/borderImageSlice.js +0 -12
  115. package/lib/properties/borderImageSource.js +0 -12
  116. package/lib/properties/borderImageWidth.js +0 -12
  117. package/lib/properties/borderRadius.js +0 -12
  118. package/lib/properties/borderTopLeftRadius.js +0 -12
  119. package/lib/properties/borderTopRightRadius.js +0 -12
  120. package/lib/properties/boxShadow.js +0 -12
  121. package/lib/properties/boxSizing.js +0 -12
  122. package/lib/properties/captionSide.js +0 -12
  123. package/lib/properties/colorInterpolation.js +0 -12
  124. package/lib/properties/colorInterpolationFilters.js +0 -12
  125. package/lib/properties/colorProfile.js +0 -12
  126. package/lib/properties/colorRendering.js +0 -12
  127. package/lib/properties/content.js +0 -12
  128. package/lib/properties/counterIncrement.js +0 -12
  129. package/lib/properties/counterReset.js +0 -12
  130. package/lib/properties/cue.js +0 -12
  131. package/lib/properties/cueAfter.js +0 -12
  132. package/lib/properties/cueBefore.js +0 -12
  133. package/lib/properties/cursor.js +0 -12
  134. package/lib/properties/direction.js +0 -12
  135. package/lib/properties/display.js +0 -12
  136. package/lib/properties/dominantBaseline.js +0 -12
  137. package/lib/properties/elevation.js +0 -12
  138. package/lib/properties/emptyCells.js +0 -12
  139. package/lib/properties/enableBackground.js +0 -12
  140. package/lib/properties/fill.js +0 -12
  141. package/lib/properties/fillOpacity.js +0 -12
  142. package/lib/properties/fillRule.js +0 -12
  143. package/lib/properties/filter.js +0 -12
  144. package/lib/properties/flexDirection.js +0 -12
  145. package/lib/properties/flexFlow.js +0 -12
  146. package/lib/properties/flexWrap.js +0 -12
  147. package/lib/properties/floodOpacity.js +0 -12
  148. package/lib/properties/fontSizeAdjust.js +0 -12
  149. package/lib/properties/fontStretch.js +0 -12
  150. package/lib/properties/glyphOrientationHorizontal.js +0 -12
  151. package/lib/properties/glyphOrientationVertical.js +0 -12
  152. package/lib/properties/imageRendering.js +0 -12
  153. package/lib/properties/justifyContent.js +0 -12
  154. package/lib/properties/kerning.js +0 -12
  155. package/lib/properties/letterSpacing.js +0 -12
  156. package/lib/properties/listStyle.js +0 -12
  157. package/lib/properties/listStyleImage.js +0 -12
  158. package/lib/properties/listStylePosition.js +0 -12
  159. package/lib/properties/listStyleType.js +0 -12
  160. package/lib/properties/marker.js +0 -12
  161. package/lib/properties/markerEnd.js +0 -12
  162. package/lib/properties/markerMid.js +0 -12
  163. package/lib/properties/markerOffset.js +0 -12
  164. package/lib/properties/markerStart.js +0 -12
  165. package/lib/properties/marks.js +0 -12
  166. package/lib/properties/mask.js +0 -12
  167. package/lib/properties/maxHeight.js +0 -12
  168. package/lib/properties/maxWidth.js +0 -12
  169. package/lib/properties/minHeight.js +0 -12
  170. package/lib/properties/minWidth.js +0 -12
  171. package/lib/properties/orphans.js +0 -12
  172. package/lib/properties/outline.js +0 -12
  173. package/lib/properties/outlineOffset.js +0 -12
  174. package/lib/properties/outlineStyle.js +0 -12
  175. package/lib/properties/outlineWidth.js +0 -12
  176. package/lib/properties/overflow.js +0 -12
  177. package/lib/properties/overflowX.js +0 -12
  178. package/lib/properties/overflowY.js +0 -12
  179. package/lib/properties/page.js +0 -12
  180. package/lib/properties/pageBreakAfter.js +0 -12
  181. package/lib/properties/pageBreakBefore.js +0 -12
  182. package/lib/properties/pageBreakInside.js +0 -12
  183. package/lib/properties/pause.js +0 -12
  184. package/lib/properties/pauseAfter.js +0 -12
  185. package/lib/properties/pauseBefore.js +0 -12
  186. package/lib/properties/pitch.js +0 -12
  187. package/lib/properties/pitchRange.js +0 -12
  188. package/lib/properties/playDuring.js +0 -12
  189. package/lib/properties/pointerEvents.js +0 -12
  190. package/lib/properties/position.js +0 -12
  191. package/lib/properties/quotes.js +0 -12
  192. package/lib/properties/resize.js +0 -12
  193. package/lib/properties/richness.js +0 -12
  194. package/lib/properties/shapeRendering.js +0 -12
  195. package/lib/properties/size.js +0 -12
  196. package/lib/properties/speak.js +0 -12
  197. package/lib/properties/speakHeader.js +0 -12
  198. package/lib/properties/speakNumeral.js +0 -12
  199. package/lib/properties/speakPunctuation.js +0 -12
  200. package/lib/properties/speechRate.js +0 -12
  201. package/lib/properties/src.js +0 -12
  202. package/lib/properties/stopOpacity.js +0 -12
  203. package/lib/properties/stress.js +0 -12
  204. package/lib/properties/stroke.js +0 -12
  205. package/lib/properties/strokeDasharray.js +0 -12
  206. package/lib/properties/strokeDashoffset.js +0 -12
  207. package/lib/properties/strokeLinecap.js +0 -12
  208. package/lib/properties/strokeLinejoin.js +0 -12
  209. package/lib/properties/strokeMiterlimit.js +0 -12
  210. package/lib/properties/strokeOpacity.js +0 -12
  211. package/lib/properties/strokeWidth.js +0 -12
  212. package/lib/properties/tableLayout.js +0 -12
  213. package/lib/properties/textAlign.js +0 -12
  214. package/lib/properties/textAnchor.js +0 -12
  215. package/lib/properties/textDecoration.js +0 -12
  216. package/lib/properties/textIndent.js +0 -12
  217. package/lib/properties/textLineThrough.js +0 -12
  218. package/lib/properties/textLineThroughMode.js +0 -12
  219. package/lib/properties/textLineThroughStyle.js +0 -12
  220. package/lib/properties/textLineThroughWidth.js +0 -12
  221. package/lib/properties/textOverflow.js +0 -12
  222. package/lib/properties/textOverline.js +0 -12
  223. package/lib/properties/textOverlineMode.js +0 -12
  224. package/lib/properties/textOverlineStyle.js +0 -12
  225. package/lib/properties/textOverlineWidth.js +0 -12
  226. package/lib/properties/textRendering.js +0 -12
  227. package/lib/properties/textShadow.js +0 -12
  228. package/lib/properties/textTransform.js +0 -12
  229. package/lib/properties/textUnderline.js +0 -12
  230. package/lib/properties/textUnderlineMode.js +0 -12
  231. package/lib/properties/textUnderlineStyle.js +0 -12
  232. package/lib/properties/textUnderlineWidth.js +0 -12
  233. package/lib/properties/transform.js +0 -12
  234. package/lib/properties/unicodeBidi.js +0 -12
  235. package/lib/properties/unicodeRange.js +0 -12
  236. package/lib/properties/vectorEffect.js +0 -12
  237. package/lib/properties/verticalAlign.js +0 -12
  238. package/lib/properties/visibility.js +0 -12
  239. package/lib/properties/voiceFamily.js +0 -12
  240. package/lib/properties/volume.js +0 -12
  241. package/lib/properties/webkitAnimation.js +0 -12
  242. package/lib/properties/webkitAnimationDelay.js +0 -12
  243. package/lib/properties/webkitAnimationDirection.js +0 -12
  244. package/lib/properties/webkitAnimationDuration.js +0 -12
  245. package/lib/properties/webkitAnimationFillMode.js +0 -12
  246. package/lib/properties/webkitAnimationIterationCount.js +0 -12
  247. package/lib/properties/webkitAnimationName.js +0 -12
  248. package/lib/properties/webkitAnimationPlayState.js +0 -12
  249. package/lib/properties/webkitAnimationTimingFunction.js +0 -12
  250. package/lib/properties/webkitAppearance.js +0 -12
  251. package/lib/properties/webkitAspectRatio.js +0 -12
  252. package/lib/properties/webkitBackfaceVisibility.js +0 -12
  253. package/lib/properties/webkitBackgroundClip.js +0 -12
  254. package/lib/properties/webkitBackgroundComposite.js +0 -12
  255. package/lib/properties/webkitBackgroundOrigin.js +0 -12
  256. package/lib/properties/webkitBackgroundSize.js +0 -12
  257. package/lib/properties/webkitBorderAfter.js +0 -12
  258. package/lib/properties/webkitBorderAfterStyle.js +0 -12
  259. package/lib/properties/webkitBorderAfterWidth.js +0 -12
  260. package/lib/properties/webkitBorderBefore.js +0 -12
  261. package/lib/properties/webkitBorderBeforeStyle.js +0 -12
  262. package/lib/properties/webkitBorderBeforeWidth.js +0 -12
  263. package/lib/properties/webkitBorderEnd.js +0 -12
  264. package/lib/properties/webkitBorderEndStyle.js +0 -12
  265. package/lib/properties/webkitBorderEndWidth.js +0 -12
  266. package/lib/properties/webkitBorderFit.js +0 -12
  267. package/lib/properties/webkitBorderHorizontalSpacing.js +0 -12
  268. package/lib/properties/webkitBorderImage.js +0 -12
  269. package/lib/properties/webkitBorderRadius.js +0 -12
  270. package/lib/properties/webkitBorderStart.js +0 -12
  271. package/lib/properties/webkitBorderStartStyle.js +0 -12
  272. package/lib/properties/webkitBorderStartWidth.js +0 -12
  273. package/lib/properties/webkitBorderVerticalSpacing.js +0 -12
  274. package/lib/properties/webkitBoxAlign.js +0 -12
  275. package/lib/properties/webkitBoxDirection.js +0 -12
  276. package/lib/properties/webkitBoxFlex.js +0 -12
  277. package/lib/properties/webkitBoxFlexGroup.js +0 -12
  278. package/lib/properties/webkitBoxLines.js +0 -12
  279. package/lib/properties/webkitBoxOrdinalGroup.js +0 -12
  280. package/lib/properties/webkitBoxOrient.js +0 -12
  281. package/lib/properties/webkitBoxPack.js +0 -12
  282. package/lib/properties/webkitBoxReflect.js +0 -12
  283. package/lib/properties/webkitBoxShadow.js +0 -12
  284. package/lib/properties/webkitColorCorrection.js +0 -12
  285. package/lib/properties/webkitColumnAxis.js +0 -12
  286. package/lib/properties/webkitColumnBreakAfter.js +0 -12
  287. package/lib/properties/webkitColumnBreakBefore.js +0 -12
  288. package/lib/properties/webkitColumnBreakInside.js +0 -12
  289. package/lib/properties/webkitColumnCount.js +0 -12
  290. package/lib/properties/webkitColumnGap.js +0 -12
  291. package/lib/properties/webkitColumnRule.js +0 -12
  292. package/lib/properties/webkitColumnRuleStyle.js +0 -12
  293. package/lib/properties/webkitColumnRuleWidth.js +0 -12
  294. package/lib/properties/webkitColumnSpan.js +0 -12
  295. package/lib/properties/webkitColumnWidth.js +0 -12
  296. package/lib/properties/webkitColumns.js +0 -12
  297. package/lib/properties/webkitFilter.js +0 -12
  298. package/lib/properties/webkitFlexAlign.js +0 -12
  299. package/lib/properties/webkitFlexDirection.js +0 -12
  300. package/lib/properties/webkitFlexFlow.js +0 -12
  301. package/lib/properties/webkitFlexItemAlign.js +0 -12
  302. package/lib/properties/webkitFlexLinePack.js +0 -12
  303. package/lib/properties/webkitFlexOrder.js +0 -12
  304. package/lib/properties/webkitFlexPack.js +0 -12
  305. package/lib/properties/webkitFlexWrap.js +0 -12
  306. package/lib/properties/webkitFlowFrom.js +0 -12
  307. package/lib/properties/webkitFlowInto.js +0 -12
  308. package/lib/properties/webkitFontFeatureSettings.js +0 -12
  309. package/lib/properties/webkitFontKerning.js +0 -12
  310. package/lib/properties/webkitFontSizeDelta.js +0 -12
  311. package/lib/properties/webkitFontSmoothing.js +0 -12
  312. package/lib/properties/webkitFontVariantLigatures.js +0 -12
  313. package/lib/properties/webkitHighlight.js +0 -12
  314. package/lib/properties/webkitHyphenateCharacter.js +0 -12
  315. package/lib/properties/webkitHyphenateLimitAfter.js +0 -12
  316. package/lib/properties/webkitHyphenateLimitBefore.js +0 -12
  317. package/lib/properties/webkitHyphenateLimitLines.js +0 -12
  318. package/lib/properties/webkitHyphens.js +0 -12
  319. package/lib/properties/webkitLineAlign.js +0 -12
  320. package/lib/properties/webkitLineBoxContain.js +0 -12
  321. package/lib/properties/webkitLineBreak.js +0 -12
  322. package/lib/properties/webkitLineClamp.js +0 -12
  323. package/lib/properties/webkitLineGrid.js +0 -12
  324. package/lib/properties/webkitLineSnap.js +0 -12
  325. package/lib/properties/webkitLocale.js +0 -12
  326. package/lib/properties/webkitLogicalHeight.js +0 -12
  327. package/lib/properties/webkitLogicalWidth.js +0 -12
  328. package/lib/properties/webkitMarginAfter.js +0 -12
  329. package/lib/properties/webkitMarginAfterCollapse.js +0 -12
  330. package/lib/properties/webkitMarginBefore.js +0 -12
  331. package/lib/properties/webkitMarginBeforeCollapse.js +0 -12
  332. package/lib/properties/webkitMarginBottomCollapse.js +0 -12
  333. package/lib/properties/webkitMarginCollapse.js +0 -12
  334. package/lib/properties/webkitMarginEnd.js +0 -12
  335. package/lib/properties/webkitMarginStart.js +0 -12
  336. package/lib/properties/webkitMarginTopCollapse.js +0 -12
  337. package/lib/properties/webkitMarquee.js +0 -12
  338. package/lib/properties/webkitMarqueeDirection.js +0 -12
  339. package/lib/properties/webkitMarqueeIncrement.js +0 -12
  340. package/lib/properties/webkitMarqueeRepetition.js +0 -12
  341. package/lib/properties/webkitMarqueeSpeed.js +0 -12
  342. package/lib/properties/webkitMarqueeStyle.js +0 -12
  343. package/lib/properties/webkitMask.js +0 -12
  344. package/lib/properties/webkitMaskAttachment.js +0 -12
  345. package/lib/properties/webkitMaskBoxImage.js +0 -12
  346. package/lib/properties/webkitMaskBoxImageOutset.js +0 -12
  347. package/lib/properties/webkitMaskBoxImageRepeat.js +0 -12
  348. package/lib/properties/webkitMaskBoxImageSlice.js +0 -12
  349. package/lib/properties/webkitMaskBoxImageSource.js +0 -12
  350. package/lib/properties/webkitMaskBoxImageWidth.js +0 -12
  351. package/lib/properties/webkitMaskClip.js +0 -12
  352. package/lib/properties/webkitMaskComposite.js +0 -12
  353. package/lib/properties/webkitMaskImage.js +0 -12
  354. package/lib/properties/webkitMaskOrigin.js +0 -12
  355. package/lib/properties/webkitMaskPosition.js +0 -12
  356. package/lib/properties/webkitMaskPositionX.js +0 -12
  357. package/lib/properties/webkitMaskPositionY.js +0 -12
  358. package/lib/properties/webkitMaskRepeat.js +0 -12
  359. package/lib/properties/webkitMaskRepeatX.js +0 -12
  360. package/lib/properties/webkitMaskRepeatY.js +0 -12
  361. package/lib/properties/webkitMaskSize.js +0 -12
  362. package/lib/properties/webkitMaxLogicalHeight.js +0 -12
  363. package/lib/properties/webkitMaxLogicalWidth.js +0 -12
  364. package/lib/properties/webkitMinLogicalHeight.js +0 -12
  365. package/lib/properties/webkitMinLogicalWidth.js +0 -12
  366. package/lib/properties/webkitNbspMode.js +0 -12
  367. package/lib/properties/webkitOverflowScrolling.js +0 -12
  368. package/lib/properties/webkitPaddingAfter.js +0 -12
  369. package/lib/properties/webkitPaddingBefore.js +0 -12
  370. package/lib/properties/webkitPaddingEnd.js +0 -12
  371. package/lib/properties/webkitPaddingStart.js +0 -12
  372. package/lib/properties/webkitPerspective.js +0 -12
  373. package/lib/properties/webkitPerspectiveOrigin.js +0 -12
  374. package/lib/properties/webkitPerspectiveOriginX.js +0 -12
  375. package/lib/properties/webkitPerspectiveOriginY.js +0 -12
  376. package/lib/properties/webkitPrintColorAdjust.js +0 -12
  377. package/lib/properties/webkitRegionBreakAfter.js +0 -12
  378. package/lib/properties/webkitRegionBreakBefore.js +0 -12
  379. package/lib/properties/webkitRegionBreakInside.js +0 -12
  380. package/lib/properties/webkitRegionOverflow.js +0 -12
  381. package/lib/properties/webkitRtlOrdering.js +0 -12
  382. package/lib/properties/webkitSvgShadow.js +0 -12
  383. package/lib/properties/webkitTextCombine.js +0 -12
  384. package/lib/properties/webkitTextDecorationsInEffect.js +0 -12
  385. package/lib/properties/webkitTextEmphasis.js +0 -12
  386. package/lib/properties/webkitTextEmphasisPosition.js +0 -12
  387. package/lib/properties/webkitTextEmphasisStyle.js +0 -12
  388. package/lib/properties/webkitTextOrientation.js +0 -12
  389. package/lib/properties/webkitTextSecurity.js +0 -12
  390. package/lib/properties/webkitTextSizeAdjust.js +0 -12
  391. package/lib/properties/webkitTextStroke.js +0 -12
  392. package/lib/properties/webkitTextStrokeWidth.js +0 -12
  393. package/lib/properties/webkitTransform.js +0 -12
  394. package/lib/properties/webkitTransformOrigin.js +0 -12
  395. package/lib/properties/webkitTransformOriginX.js +0 -12
  396. package/lib/properties/webkitTransformOriginY.js +0 -12
  397. package/lib/properties/webkitTransformOriginZ.js +0 -12
  398. package/lib/properties/webkitTransformStyle.js +0 -12
  399. package/lib/properties/webkitTransition.js +0 -12
  400. package/lib/properties/webkitTransitionDelay.js +0 -12
  401. package/lib/properties/webkitTransitionDuration.js +0 -12
  402. package/lib/properties/webkitTransitionProperty.js +0 -12
  403. package/lib/properties/webkitTransitionTimingFunction.js +0 -12
  404. package/lib/properties/webkitUserDrag.js +0 -12
  405. package/lib/properties/webkitUserModify.js +0 -12
  406. package/lib/properties/webkitUserSelect.js +0 -12
  407. package/lib/properties/webkitWrap.js +0 -12
  408. package/lib/properties/webkitWrapFlow.js +0 -12
  409. package/lib/properties/webkitWrapMargin.js +0 -12
  410. package/lib/properties/webkitWrapPadding.js +0 -12
  411. package/lib/properties/webkitWrapShapeInside.js +0 -12
  412. package/lib/properties/webkitWrapShapeOutside.js +0 -12
  413. package/lib/properties/webkitWrapThrough.js +0 -12
  414. package/lib/properties/webkitWritingMode.js +0 -12
  415. package/lib/properties/whiteSpace.js +0 -12
  416. package/lib/properties/widows.js +0 -12
  417. package/lib/properties/wordBreak.js +0 -12
  418. package/lib/properties/wordSpacing.js +0 -12
  419. package/lib/properties/wordWrap.js +0 -12
  420. package/lib/properties/writingMode.js +0 -12
  421. package/lib/properties/zIndex.js +0 -12
  422. package/lib/properties/zoom.js +0 -12
  423. package/lib/validProperties.js +0 -410
  424. package/scripts/generate_valid_properties.js +0 -62
@@ -3,12 +3,12 @@
3
3
  var parseMeasurement = require('../parsers').parseMeasurement;
4
4
 
5
5
  module.exports.definition = {
6
- set: function (v) {
7
- this._setProperty('bottom', parseMeasurement(v));
8
- },
9
- get: function () {
10
- return this.getPropertyValue('bottom');
11
- },
12
- enumerable: true,
13
- configurable: true
6
+ set: function(v) {
7
+ this._setProperty('bottom', parseMeasurement(v));
8
+ },
9
+ get: function() {
10
+ return this.getPropertyValue('bottom');
11
+ },
12
+ enumerable: true,
13
+ configurable: true,
14
14
  };
@@ -2,15 +2,15 @@
2
2
 
3
3
  var parseKeyword = require('../parsers').parseKeyword;
4
4
 
5
- var clear_keywords = [ 'none', 'left', 'right', 'both', 'inherit' ];
5
+ var clear_keywords = ['none', 'left', 'right', 'both', 'inherit'];
6
6
 
7
7
  module.exports.definition = {
8
- set: function (v) {
9
- this._setProperty('clear', parseKeyword(v, clear_keywords));
10
- },
11
- get: function () {
12
- return this.getPropertyValue('clear');
13
- },
14
- enumerable: true,
15
- configurable: true
8
+ set: function(v) {
9
+ this._setProperty('clear', parseKeyword(v, clear_keywords));
10
+ },
11
+ get: function() {
12
+ return this.getPropertyValue('clear');
13
+ },
14
+ enumerable: true,
15
+ configurable: true,
16
16
  };
@@ -2,48 +2,46 @@
2
2
 
3
3
  var parseMeasurement = require('../parsers').parseMeasurement;
4
4
 
5
- /*jslint regexp: true*/
6
5
  var shape_regex = /^rect\((.*)\)$/i;
7
- /*jslint regexp: false*/
8
6
 
9
- var parse = function (val) {
10
- if (val === '' || val === null) {
11
- return val;
12
- }
13
- if (typeof val !== 'string') {
14
- return undefined;
15
- }
16
- val = val.toLowerCase();
17
- if (val === 'auto' || val === 'inherit') {
18
- return val;
19
- }
20
- var matches = val.match(shape_regex);
21
- if (!matches) {
22
- return undefined;
23
- }
24
- var parts = matches[1].split(/\s*,\s*/);
25
- if (parts.length !== 4) {
26
- return undefined;
27
- }
28
- var valid = parts.every(function (part, index) {
29
- var measurement = parseMeasurement(part);
30
- parts[index] = measurement;
31
- return measurement !== undefined;
32
- });
33
- if (!valid) {
34
- return undefined;
35
- }
36
- parts = parts.join(', ');
37
- return val.replace(matches[1], parts);
7
+ var parse = function(val) {
8
+ if (val === '' || val === null) {
9
+ return val;
10
+ }
11
+ if (typeof val !== 'string') {
12
+ return undefined;
13
+ }
14
+ val = val.toLowerCase();
15
+ if (val === 'auto' || val === 'inherit') {
16
+ return val;
17
+ }
18
+ var matches = val.match(shape_regex);
19
+ if (!matches) {
20
+ return undefined;
21
+ }
22
+ var parts = matches[1].split(/\s*,\s*/);
23
+ if (parts.length !== 4) {
24
+ return undefined;
25
+ }
26
+ var valid = parts.every(function(part, index) {
27
+ var measurement = parseMeasurement(part);
28
+ parts[index] = measurement;
29
+ return measurement !== undefined;
30
+ });
31
+ if (!valid) {
32
+ return undefined;
33
+ }
34
+ parts = parts.join(', ');
35
+ return val.replace(matches[1], parts);
38
36
  };
39
37
 
40
38
  module.exports.definition = {
41
- set: function (v) {
42
- this._setProperty('clip', parse(v));
43
- },
44
- get: function () {
45
- return this.getPropertyValue('clip');
46
- },
47
- enumerable: true,
48
- configurable: true
39
+ set: function(v) {
40
+ this._setProperty('clip', parse(v));
41
+ },
42
+ get: function() {
43
+ return this.getPropertyValue('clip');
44
+ },
45
+ enumerable: true,
46
+ configurable: true,
49
47
  };
@@ -3,12 +3,12 @@
3
3
  var parseColor = require('../parsers').parseColor;
4
4
 
5
5
  module.exports.definition = {
6
- set: function (v) {
7
- this._setProperty('color', parseColor(v));
8
- },
9
- get: function () {
10
- return this.getPropertyValue('color');
11
- },
12
- enumerable: true,
13
- configurable: true
6
+ set: function(v) {
7
+ this._setProperty('color', parseColor(v));
8
+ },
9
+ get: function() {
10
+ return this.getPropertyValue('color');
11
+ },
12
+ enumerable: true,
13
+ configurable: true,
14
14
  };
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports.definition = {
4
- set: function (v) {
5
- this._setProperty('float', v);
6
- },
7
- get: function () {
8
- return this.getPropertyValue('float');
9
- },
10
- enumerable: true,
11
- configurable: true
4
+ set: function(v) {
5
+ this._setProperty('float', v);
6
+ },
7
+ get: function() {
8
+ return this.getPropertyValue('float');
9
+ },
10
+ enumerable: true,
11
+ configurable: true,
12
12
  };
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ var shorthandParser = require('../parsers').shorthandParser;
4
+ var shorthandSetter = require('../parsers').shorthandSetter;
5
+ var shorthandGetter = require('../parsers').shorthandGetter;
6
+
7
+ var shorthand_for = {
8
+ 'flex-grow': require('./flexGrow'),
9
+ 'flex-shrink': require('./flexShrink'),
10
+ 'flex-basis': require('./flexBasis'),
11
+ };
12
+
13
+ var myShorthandSetter = shorthandSetter('flex', shorthand_for);
14
+
15
+ module.exports.isValid = function isValid(v) {
16
+ return shorthandParser(v, shorthand_for) !== undefined;
17
+ };
18
+
19
+ module.exports.definition = {
20
+ set: function(v) {
21
+ var normalizedValue = String(v)
22
+ .trim()
23
+ .toLowerCase();
24
+
25
+ if (normalizedValue === 'none') {
26
+ myShorthandSetter.call(this, '0 0 auto');
27
+ return;
28
+ }
29
+ if (normalizedValue === 'initial') {
30
+ myShorthandSetter.call(this, '0 1 auto');
31
+ return;
32
+ }
33
+ if (normalizedValue === 'auto') {
34
+ this.removeProperty('flex-grow');
35
+ this.removeProperty('flex-shrink');
36
+ this.setProperty('flex-basis', normalizedValue);
37
+ return;
38
+ }
39
+
40
+ myShorthandSetter.call(this, v);
41
+ },
42
+ get: shorthandGetter('flex', shorthand_for),
43
+ enumerable: true,
44
+ configurable: true,
45
+ };
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var parseMeasurement = require('../parsers').parseMeasurement;
4
+
5
+ function parse(v) {
6
+ if (String(v).toLowerCase() === 'auto') {
7
+ return 'auto';
8
+ }
9
+ if (String(v).toLowerCase() === 'inherit') {
10
+ return 'inherit';
11
+ }
12
+ return parseMeasurement(v);
13
+ }
14
+
15
+ module.exports.isValid = function isValid(v) {
16
+ return parse(v) !== undefined;
17
+ };
18
+
19
+ module.exports.definition = {
20
+ set: function(v) {
21
+ this._setProperty('flex-basis', parse(v));
22
+ },
23
+ get: function() {
24
+ return this.getPropertyValue('flex-basis');
25
+ },
26
+ enumerable: true,
27
+ configurable: true,
28
+ };
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var parseNumber = require('../parsers').parseNumber;
4
+ var POSITION_AT_SHORTHAND = require('../constants').POSITION_AT_SHORTHAND;
5
+
6
+ module.exports.isValid = function isValid(v, positionAtFlexShorthand) {
7
+ return parseNumber(v) !== undefined && positionAtFlexShorthand === POSITION_AT_SHORTHAND.first;
8
+ };
9
+
10
+ module.exports.definition = {
11
+ set: function(v) {
12
+ this._setProperty('flex-grow', parseNumber(v));
13
+ },
14
+ get: function() {
15
+ return this.getPropertyValue('flex-grow');
16
+ },
17
+ enumerable: true,
18
+ configurable: true,
19
+ };
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var parseNumber = require('../parsers').parseNumber;
4
+ var POSITION_AT_SHORTHAND = require('../constants').POSITION_AT_SHORTHAND;
5
+
6
+ module.exports.isValid = function isValid(v, positionAtFlexShorthand) {
7
+ return parseNumber(v) !== undefined && positionAtFlexShorthand === POSITION_AT_SHORTHAND.second;
8
+ };
9
+
10
+ module.exports.definition = {
11
+ set: function(v) {
12
+ this._setProperty('flex-shrink', parseNumber(v));
13
+ },
14
+ get: function() {
15
+ return this.getPropertyValue('flex-shrink');
16
+ },
17
+ enumerable: true,
18
+ configurable: true,
19
+ };
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ module.exports.definition = {
4
+ set: function(v) {
5
+ this._setProperty('float', v);
6
+ },
7
+ get: function() {
8
+ return this.getPropertyValue('float');
9
+ },
10
+ enumerable: true,
11
+ configurable: true,
12
+ };
@@ -3,12 +3,12 @@
3
3
  var parseColor = require('../parsers').parseColor;
4
4
 
5
5
  module.exports.definition = {
6
- set: function (v) {
7
- this._setProperty('flood-color', parseColor(v));
8
- },
9
- get: function () {
10
- return this.getPropertyValue('flood-color');
11
- },
12
- enumerable: true,
13
- configurable: true
6
+ set: function(v) {
7
+ this._setProperty('flood-color', parseColor(v));
8
+ },
9
+ get: function() {
10
+ return this.getPropertyValue('flood-color');
11
+ },
12
+ enumerable: true,
13
+ configurable: true,
14
14
  };
@@ -7,34 +7,37 @@ var shorthandSetter = require('../parsers').shorthandSetter;
7
7
  var shorthandGetter = require('../parsers').shorthandGetter;
8
8
 
9
9
  var shorthand_for = {
10
- 'font-family': require('./fontFamily'),
11
- 'font-size': require('./fontSize'),
12
- 'font-style': require('./fontStyle'),
13
- 'font-variant': require('./fontVariant'),
14
- 'font-weight': require('./fontWeight'),
15
- 'line-height': require('./lineHeight')
10
+ 'font-family': require('./fontFamily'),
11
+ 'font-size': require('./fontSize'),
12
+ 'font-style': require('./fontStyle'),
13
+ 'font-variant': require('./fontVariant'),
14
+ 'font-weight': require('./fontWeight'),
15
+ 'line-height': require('./lineHeight'),
16
16
  };
17
17
 
18
- var static_fonts = ['caption', 'icon', 'menu', 'message-box', 'small-caption', 'status-bar', 'inherit'];
19
-
20
- module.exports.isValid = function isValid(v) {
21
- return (shorthandParser(v, shorthand_for) !== undefined) ||
22
- (valueType(v) === TYPES.KEYWORD && static_fonts.indexOf(v.toLowerCase()) !== -1);
23
- };
18
+ var static_fonts = [
19
+ 'caption',
20
+ 'icon',
21
+ 'menu',
22
+ 'message-box',
23
+ 'small-caption',
24
+ 'status-bar',
25
+ 'inherit',
26
+ ];
24
27
 
25
28
  var setter = shorthandSetter('font', shorthand_for);
26
29
 
27
30
  module.exports.definition = {
28
- set: function (v) {
29
- var short = shorthandParser(v, shorthand_for);
30
- if (short !== undefined) {
31
- return setter.call(this, v);
32
- }
33
- if (valueType(v) === TYPES.KEYWORD && static_fonts.indexOf(v.toLowerCase()) !== -1) {
34
- this._setProperty('font', v);
35
- }
36
- },
37
- get: shorthandGetter('font', shorthand_for),
38
- enumerable: true,
39
- configurable: true
31
+ set: function(v) {
32
+ var short = shorthandParser(v, shorthand_for);
33
+ if (short !== undefined) {
34
+ return setter.call(this, v);
35
+ }
36
+ if (valueType(v) === TYPES.KEYWORD && static_fonts.indexOf(v.toLowerCase()) !== -1) {
37
+ this._setProperty('font', v);
38
+ }
39
+ },
40
+ get: shorthandGetter('font', shorthand_for),
41
+ enumerable: true,
42
+ configurable: true,
40
43
  };
@@ -5,29 +5,29 @@ var valueType = require('../parsers').valueType;
5
5
 
6
6
  var partsRegEx = /\s*,\s*/;
7
7
  module.exports.isValid = function isValid(v) {
8
- if (v === '' || v === null) {
9
- return true;
8
+ if (v === '' || v === null) {
9
+ return true;
10
+ }
11
+ var parts = v.split(partsRegEx);
12
+ var len = parts.length;
13
+ var i;
14
+ var type;
15
+ for (i = 0; i < len; i++) {
16
+ type = valueType(parts[i]);
17
+ if (type === TYPES.STRING || type === TYPES.KEYWORD) {
18
+ return true;
10
19
  }
11
- var parts = v.split(partsRegEx);
12
- var len = parts.length;
13
- var i;
14
- var type;
15
- for (i = 0; i < len; i++) {
16
- type = valueType(parts[i]);
17
- if (type === TYPES.STRING || type === TYPES.KEYWORD) {
18
- return true;
19
- }
20
- }
21
- return false;
20
+ }
21
+ return false;
22
22
  };
23
23
 
24
24
  module.exports.definition = {
25
- set: function (v) {
26
- this._setProperty('font-family', v);
27
- },
28
- get: function () {
29
- return this.getPropertyValue('font-family');
30
- },
31
- enumerable: true,
32
- configurable: true
25
+ set: function(v) {
26
+ this._setProperty('font-family', v);
27
+ },
28
+ get: function() {
29
+ return this.getPropertyValue('font-family');
30
+ },
31
+ enumerable: true,
32
+ configurable: true,
33
33
  };
@@ -6,20 +6,23 @@ var valueType = require('../parsers').valueType;
6
6
  var absoluteSizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
7
7
  var relativeSizes = ['larger', 'smaller'];
8
8
 
9
- module.exports.isValid = function (v) {
10
- var type = valueType(v.toLowerCase());
11
- return type === TYPES.LENGTH || type === TYPES.PERCENT ||
12
- (type === TYPES.KEYWORD && absoluteSizes.indexOf(v.toLowerCase()) !== -1) ||
13
- (type === TYPES.KEYWORD && relativeSizes.indexOf(v.toLowerCase()) !== -1);
9
+ module.exports.isValid = function(v) {
10
+ var type = valueType(v.toLowerCase());
11
+ return (
12
+ type === TYPES.LENGTH ||
13
+ type === TYPES.PERCENT ||
14
+ (type === TYPES.KEYWORD && absoluteSizes.indexOf(v.toLowerCase()) !== -1) ||
15
+ (type === TYPES.KEYWORD && relativeSizes.indexOf(v.toLowerCase()) !== -1)
16
+ );
14
17
  };
15
18
 
16
19
  module.exports.definition = {
17
- set: function (v) {
18
- this._setProperty('font-size', v);
19
- },
20
- get: function () {
21
- return this.getPropertyValue('font-size');
22
- },
23
- enumerable: true,
24
- configurable: true
20
+ set: function(v) {
21
+ this._setProperty('font-size', v);
22
+ },
23
+ get: function() {
24
+ return this.getPropertyValue('font-size');
25
+ },
26
+ enumerable: true,
27
+ configurable: true,
25
28
  };
@@ -2,17 +2,17 @@
2
2
 
3
3
  var valid_styles = ['normal', 'italic', 'oblique', 'inherit'];
4
4
 
5
- module.exports.isValid = function (v) {
6
- return valid_styles.indexOf(v.toLowerCase()) !== -1;
5
+ module.exports.isValid = function(v) {
6
+ return valid_styles.indexOf(v.toLowerCase()) !== -1;
7
7
  };
8
8
 
9
9
  module.exports.definition = {
10
- set: function (v) {
11
- this._setProperty('font-style', v);
12
- },
13
- get: function () {
14
- return this.getPropertyValue('font-style');
15
- },
16
- enumerable: true,
17
- configurable: true
10
+ set: function(v) {
11
+ this._setProperty('font-style', v);
12
+ },
13
+ get: function() {
14
+ return this.getPropertyValue('font-style');
15
+ },
16
+ enumerable: true,
17
+ configurable: true,
18
18
  };
@@ -3,16 +3,16 @@
3
3
  var valid_variants = ['normal', 'small-caps', 'inherit'];
4
4
 
5
5
  module.exports.isValid = function isValid(v) {
6
- return valid_variants.indexOf(v.toLowerCase()) !== -1;
6
+ return valid_variants.indexOf(v.toLowerCase()) !== -1;
7
7
  };
8
8
 
9
9
  module.exports.definition = {
10
- set: function (v) {
11
- this._setProperty('font-variant', v);
12
- },
13
- get: function () {
14
- return this.getPropertyValue('font-variant');
15
- },
16
- enumerable: true,
17
- configurable: true
10
+ set: function(v) {
11
+ this._setProperty('font-variant', v);
12
+ },
13
+ get: function() {
14
+ return this.getPropertyValue('font-variant');
15
+ },
16
+ enumerable: true,
17
+ configurable: true,
18
18
  };
@@ -1,18 +1,33 @@
1
1
  'use strict';
2
2
 
3
- var valid_weights = ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'inherit'];
3
+ var valid_weights = [
4
+ 'normal',
5
+ 'bold',
6
+ 'bolder',
7
+ 'lighter',
8
+ '100',
9
+ '200',
10
+ '300',
11
+ '400',
12
+ '500',
13
+ '600',
14
+ '700',
15
+ '800',
16
+ '900',
17
+ 'inherit',
18
+ ];
4
19
 
5
20
  module.exports.isValid = function isValid(v) {
6
- return valid_weights.indexOf(v.toLowerCase()) !== -1;
21
+ return valid_weights.indexOf(v.toLowerCase()) !== -1;
7
22
  };
8
23
 
9
24
  module.exports.definition = {
10
- set: function (v) {
11
- this._setProperty('font-weight', v);
12
- },
13
- get: function () {
14
- return this.getPropertyValue('font-weight');
15
- },
16
- enumerable: true,
17
- configurable: true
25
+ set: function(v) {
26
+ this._setProperty('font-weight', v);
27
+ },
28
+ get: function() {
29
+ return this.getPropertyValue('font-weight');
30
+ },
31
+ enumerable: true,
32
+ configurable: true,
18
33
  };
@@ -3,22 +3,22 @@
3
3
  var parseMeasurement = require('../parsers').parseMeasurement;
4
4
 
5
5
  function parse(v) {
6
- if (String(v).toLowerCase() === 'auto') {
7
- return 'auto';
8
- }
9
- if (String(v).toLowerCase() === 'inherit') {
10
- return 'inherit';
11
- }
12
- return parseMeasurement(v);
6
+ if (String(v).toLowerCase() === 'auto') {
7
+ return 'auto';
8
+ }
9
+ if (String(v).toLowerCase() === 'inherit') {
10
+ return 'inherit';
11
+ }
12
+ return parseMeasurement(v);
13
13
  }
14
14
 
15
15
  module.exports.definition = {
16
- set: function (v) {
17
- this._setProperty('height', parse(v));
18
- },
19
- get: function () {
20
- return this.getPropertyValue('height');
21
- },
22
- enumerable: true,
23
- configurable: true
16
+ set: function(v) {
17
+ this._setProperty('height', parse(v));
18
+ },
19
+ get: function() {
20
+ return this.getPropertyValue('height');
21
+ },
22
+ enumerable: true,
23
+ configurable: true,
24
24
  };
@@ -3,12 +3,12 @@
3
3
  var parseMeasurement = require('../parsers').parseMeasurement;
4
4
 
5
5
  module.exports.definition = {
6
- set: function (v) {
7
- this._setProperty('left', parseMeasurement(v));
8
- },
9
- get: function () {
10
- return this.getPropertyValue('left');
11
- },
12
- enumerable: true,
13
- configurable: true
6
+ set: function(v) {
7
+ this._setProperty('left', parseMeasurement(v));
8
+ },
9
+ get: function() {
10
+ return this.getPropertyValue('left');
11
+ },
12
+ enumerable: true,
13
+ configurable: true,
14
14
  };
@@ -3,12 +3,12 @@
3
3
  var parseColor = require('../parsers').parseColor;
4
4
 
5
5
  module.exports.definition = {
6
- set: function (v) {
7
- this._setProperty('lighting-color', parseColor(v));
8
- },
9
- get: function () {
10
- return this.getPropertyValue('lighting-color');
11
- },
12
- enumerable: true,
13
- configurable: true
6
+ set: function(v) {
7
+ this._setProperty('lighting-color', parseColor(v));
8
+ },
9
+ get: function() {
10
+ return this.getPropertyValue('lighting-color');
11
+ },
12
+ enumerable: true,
13
+ configurable: true,
14
14
  };