cssstyle 1.4.0 → 2.0.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.
Files changed (113) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.js +5 -0
  3. package/.travis.yml +6 -4
  4. package/AUTHORS +31 -0
  5. package/{MIT-LICENSE.txt → LICENSE} +0 -0
  6. package/README.md +7 -19
  7. package/coverage/clover.xml +2150 -0
  8. package/coverage/coverage-final.json +86 -0
  9. package/coverage/lcov-report/base.css +224 -0
  10. package/coverage/lcov-report/block-navigation.js +79 -0
  11. package/coverage/lcov-report/index.html +123 -0
  12. package/coverage/lcov-report/lib/CSSStyleDeclaration.js.html +834 -0
  13. package/coverage/lcov-report/lib/allExtraProperties.js.html +813 -0
  14. package/coverage/lcov-report/lib/allProperties.js.html +1560 -0
  15. package/coverage/lcov-report/lib/constants.js.html +87 -0
  16. package/coverage/lcov-report/lib/index.html +149 -0
  17. package/coverage/lcov-report/lib/parsers.js.html +2193 -0
  18. package/coverage/lcov-report/lib/properties/azimuth.js.html +270 -0
  19. package/coverage/lcov-report/lib/properties/background.js.html +126 -0
  20. package/coverage/lcov-report/lib/properties/backgroundAttachment.js.html +141 -0
  21. package/coverage/lcov-report/lib/properties/backgroundColor.js.html +177 -0
  22. package/coverage/lcov-report/lib/properties/backgroundImage.js.html +165 -0
  23. package/coverage/lcov-report/lib/properties/backgroundPosition.js.html +243 -0
  24. package/coverage/lcov-report/lib/properties/backgroundRepeat.js.html +165 -0
  25. package/coverage/lcov-report/lib/properties/border.js.html +168 -0
  26. package/coverage/lcov-report/lib/properties/borderBottom.js.html +120 -0
  27. package/coverage/lcov-report/lib/properties/borderBottomColor.js.html +117 -0
  28. package/coverage/lcov-report/lib/properties/borderBottomStyle.js.html +132 -0
  29. package/coverage/lcov-report/lib/properties/borderBottomWidth.js.html +117 -0
  30. package/coverage/lcov-report/lib/properties/borderCollapse.js.html +147 -0
  31. package/coverage/lcov-report/lib/properties/borderColor.js.html +159 -0
  32. package/coverage/lcov-report/lib/properties/borderLeft.js.html +120 -0
  33. package/coverage/lcov-report/lib/properties/borderLeftColor.js.html +117 -0
  34. package/coverage/lcov-report/lib/properties/borderLeftStyle.js.html +132 -0
  35. package/coverage/lcov-report/lib/properties/borderLeftWidth.js.html +117 -0
  36. package/coverage/lcov-report/lib/properties/borderRight.js.html +120 -0
  37. package/coverage/lcov-report/lib/properties/borderRightColor.js.html +117 -0
  38. package/coverage/lcov-report/lib/properties/borderRightStyle.js.html +132 -0
  39. package/coverage/lcov-report/lib/properties/borderRightWidth.js.html +117 -0
  40. package/coverage/lcov-report/lib/properties/borderSpacing.js.html +192 -0
  41. package/coverage/lcov-report/lib/properties/borderStyle.js.html +183 -0
  42. package/coverage/lcov-report/lib/properties/borderTop.js.html +120 -0
  43. package/coverage/lcov-report/lib/properties/borderTopColor.js.html +117 -0
  44. package/coverage/lcov-report/lib/properties/borderTopStyle.js.html +132 -0
  45. package/coverage/lcov-report/lib/properties/borderTopWidth.js.html +120 -0
  46. package/coverage/lcov-report/lib/properties/borderWidth.js.html +207 -0
  47. package/coverage/lcov-report/lib/properties/bottom.js.html +111 -0
  48. package/coverage/lcov-report/lib/properties/clear.js.html +117 -0
  49. package/coverage/lcov-report/lib/properties/clip.js.html +210 -0
  50. package/coverage/lcov-report/lib/properties/color.js.html +111 -0
  51. package/coverage/lcov-report/lib/properties/cssFloat.js.html +105 -0
  52. package/coverage/lcov-report/lib/properties/flex.js.html +204 -0
  53. package/coverage/lcov-report/lib/properties/flexBasis.js.html +153 -0
  54. package/coverage/lcov-report/lib/properties/flexGrow.js.html +126 -0
  55. package/coverage/lcov-report/lib/properties/flexShrink.js.html +126 -0
  56. package/coverage/lcov-report/lib/properties/float.js.html +105 -0
  57. package/coverage/lcov-report/lib/properties/floodColor.js.html +111 -0
  58. package/coverage/lcov-report/lib/properties/font.js.html +198 -0
  59. package/coverage/lcov-report/lib/properties/fontFamily.js.html +168 -0
  60. package/coverage/lcov-report/lib/properties/fontSize.js.html +183 -0
  61. package/coverage/lcov-report/lib/properties/fontStyle.js.html +123 -0
  62. package/coverage/lcov-report/lib/properties/fontVariant.js.html +123 -0
  63. package/coverage/lcov-report/lib/properties/fontWeight.js.html +168 -0
  64. package/coverage/lcov-report/lib/properties/height.js.html +141 -0
  65. package/coverage/lcov-report/lib/properties/index.html +1111 -0
  66. package/coverage/lcov-report/lib/properties/left.js.html +111 -0
  67. package/coverage/lcov-report/lib/properties/lightingColor.js.html +111 -0
  68. package/coverage/lcov-report/lib/properties/lineHeight.js.html +147 -0
  69. package/coverage/lcov-report/lib/properties/margin.js.html +273 -0
  70. package/coverage/lcov-report/lib/properties/marginBottom.js.html +108 -0
  71. package/coverage/lcov-report/lib/properties/marginLeft.js.html +108 -0
  72. package/coverage/lcov-report/lib/properties/marginRight.js.html +108 -0
  73. package/coverage/lcov-report/lib/properties/marginTop.js.html +108 -0
  74. package/coverage/lcov-report/lib/properties/opacity.js.html +111 -0
  75. package/coverage/lcov-report/lib/properties/outlineColor.js.html +111 -0
  76. package/coverage/lcov-report/lib/properties/padding.js.html +252 -0
  77. package/coverage/lcov-report/lib/properties/paddingBottom.js.html +108 -0
  78. package/coverage/lcov-report/lib/properties/paddingLeft.js.html +108 -0
  79. package/coverage/lcov-report/lib/properties/paddingRight.js.html +108 -0
  80. package/coverage/lcov-report/lib/properties/paddingTop.js.html +108 -0
  81. package/coverage/lcov-report/lib/properties/right.js.html +111 -0
  82. package/coverage/lcov-report/lib/properties/stopColor.js.html +111 -0
  83. package/coverage/lcov-report/lib/properties/textLineThroughColor.js.html +111 -0
  84. package/coverage/lcov-report/lib/properties/textOverlineColor.js.html +111 -0
  85. package/coverage/lcov-report/lib/properties/textUnderlineColor.js.html +111 -0
  86. package/coverage/lcov-report/lib/properties/top.js.html +111 -0
  87. package/coverage/lcov-report/lib/properties/webkitBorderAfterColor.js.html +111 -0
  88. package/coverage/lcov-report/lib/properties/webkitBorderBeforeColor.js.html +111 -0
  89. package/coverage/lcov-report/lib/properties/webkitBorderEndColor.js.html +111 -0
  90. package/coverage/lcov-report/lib/properties/webkitBorderStartColor.js.html +111 -0
  91. package/coverage/lcov-report/lib/properties/webkitColumnRuleColor.js.html +111 -0
  92. package/coverage/lcov-report/lib/properties/webkitMatchNearestMailBlockquoteColor.js.html +111 -0
  93. package/coverage/lcov-report/lib/properties/webkitTapHighlightColor.js.html +111 -0
  94. package/coverage/lcov-report/lib/properties/webkitTextEmphasisColor.js.html +111 -0
  95. package/coverage/lcov-report/lib/properties/webkitTextFillColor.js.html +111 -0
  96. package/coverage/lcov-report/lib/properties/webkitTextStrokeColor.js.html +111 -0
  97. package/coverage/lcov-report/lib/properties/width.js.html +141 -0
  98. package/coverage/lcov-report/lib/utils/getBasicPropertyDescriptor.js.html +111 -0
  99. package/coverage/lcov-report/lib/utils/index.html +97 -0
  100. package/coverage/lcov-report/prettify.css +1 -0
  101. package/coverage/lcov-report/prettify.js +2 -0
  102. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  103. package/coverage/lcov-report/sorter.js +170 -0
  104. package/coverage/lcov.info +3711 -0
  105. package/jest.config.js +10 -0
  106. package/lib/CSSStyleDeclaration.test.js +521 -0
  107. package/lib/allProperties.js +53 -13
  108. package/lib/parsers.js +15 -4
  109. package/lib/parsers.test.js +98 -0
  110. package/lib/properties/fontSize.js +11 -1
  111. package/lib/properties.js +8 -1
  112. package/package.json +24 -30
  113. package/tests/tests.js +0 -669
package/.eslintignore CHANGED
@@ -1,3 +1,4 @@
1
1
  node_modules
2
2
  lib/implementedProperties.js
3
3
  lib/properties.js
4
+ jest.config.js
package/.eslintrc.js CHANGED
@@ -14,9 +14,14 @@ module.exports = {
14
14
  module: true,
15
15
  require: true,
16
16
  window: true,
17
+ describe: true,
18
+ it: true,
19
+ test: true,
20
+ expect: true,
17
21
  },
18
22
  plugins: ['prettier'],
19
23
  rules: {
24
+ 'no-prototype-builtins': 'off',
20
25
  'prettier/prettier': [
21
26
  'warn',
22
27
  {
package/.travis.yml CHANGED
@@ -5,11 +5,13 @@ cache:
5
5
  - node_modules
6
6
  notifications:
7
7
  email: true
8
+ install:
9
+ - npm install
10
+ - npm install -g codecov
8
11
  node_js:
9
- - 6
10
- - 8
11
- - 10
12
- - 11
12
+ - "8"
13
+ - "10"
14
+ - "12"
13
15
 
14
16
  script:
15
17
  - npm run test-ci
package/AUTHORS ADDED
@@ -0,0 +1,31 @@
1
+ Benny Powers <web@bennypowers.com>
2
+ Brenton Partridge <bapartridge@gmail.com>
3
+ Chad Walker <chad@chad-cat-lore-eddie.com>
4
+ chad3814 <chad@chad-cat-lore-eddie.com>
5
+ Dallas Hall <dallas.hall@procore.com>
6
+ Davide P. Cervone <dpvc@union.edu>
7
+ Edward Betts <edward@4angle.com>
8
+ Evan Jacobs <evan.jacobs@enigma.io>
9
+ fatfisz <fatfisz@gmail.com>
10
+ ForbesLindesay <forbes@lindesay.co.uk>
11
+ Gabriel Bibiano <gabriel.bibiano.a@gmail.com>
12
+ Ignacio Rodriguez <inz@fastmicroservices.com>
13
+ Isaac Devine <isaac@devinesystems.co.nz>
14
+ Jacob Feldman <jacob.h.feldman@gmail.com>
15
+ jakeFeldman <jacob.h.feldman@gmail.com>
16
+ Jon Sakas <jon.sakas@beatport.com>
17
+ Jon Sakas <jon.sakas@gmail.com>
18
+ Jonathan Cousins - External <jonathan.cousins.external@ynap.com>
19
+ João Gabriel Bibiano de Araújo <joao.araujo-ext@viavarejo.com.br>
20
+ Kwun-Lok Ng <k@samplify.io>
21
+ lsiu <leonard.siu@gmail.com>
22
+ Marc Prud'hommeaux <mwp1@cornell.edu>
23
+ Marcel Klehr <mklehr@gmx.net>
24
+ Matthew Crinklaw-Vogt <mlaw@fb.com>
25
+ omri lugasi <omriDroid@gmail.com>
26
+ Pierre Carru <pierre.carru@gmail.com>
27
+ Rafał Ruciński <fatfisz@gmail.com>
28
+ Ronald Rey <reyronald@gmail.com>
29
+ Sampo Kivistö <sampo.kivisto@live.fi>
30
+ step-off <stepanoff@skbkontur.ru>
31
+ stepanoff <stepanoff@skbkontur.ru>
File without changes
package/README.md CHANGED
@@ -1,27 +1,15 @@
1
1
  # CSSStyleDeclaration
2
2
 
3
- [![NpmVersion](https://img.shields.io/npm/v/cssstyle.svg)](https://www.npmjs.com/package/cssstyle) [![Build Status](https://travis-ci.org/jsakas/CSSStyleDeclaration.svg?branch=master)](https://travis-ci.org/jsakas/CSSStyleDeclaration)
3
+ A Node JS implementation of the CSS Object Model [CSSStyleDeclaration interface](https://www.w3.org/TR/cssom-1/#the-cssstyledeclaration-interface).
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
+ [![NpmVersion](https://img.shields.io/npm/v/cssstyle.svg)](https://www.npmjs.com/package/cssstyle) [![Build Status](https://travis-ci.org/jsdom/cssstyle.svg?branch=master)](https://travis-ci.org/jsdom/cssstyle) [![codecov](https://codecov.io/gh/jsdom/cssstyle/branch/master/graph/badge.svg)](https://codecov.io/gh/jsdom/cssstyle)
6
6
 
7
- ### Why not just issue a pull request?
7
+ ---
8
8
 
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.
9
+ #### Background
10
10
 
11
- ### How do I test this code?
11
+ This package is an extension of the CSSStyleDeclaration class in Nikita Vasilyev's [CSSOM](https://github.com/NV/CSSOM) with added support for CSS 2 & 3 properties. The primary use case is for testing browser code in a Node environment.
12
12
 
13
- `npm test` should do the trick, assuming you have the dev dependencies installed:
13
+ It was originally created by Chad Walker, it is now maintaind by Jon Sakas and other open source contributors.
14
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
- ```
15
+ Bug reports and pull requests are welcome.