cssstyle 0.3.1 → 1.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.
- package/README.md +1 -1
- package/lib/properties/borderSpacing.js +3 -0
- package/lib/properties.js +4 -0
- package/package.json +2 -2
- package/tests/tests.js +7 -0
- package/scripts/run_tests.sh +0 -4
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ CSSStyleDeclaration is a work-a-like to the CSSStyleDeclaration class in Nikita
|
|
|
6
6
|
|
|
7
7
|
Why not just issue a pull request?
|
|
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
|
|
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
11
|
How do I test this code?
|
|
12
12
|
---
|
package/lib/properties.js
CHANGED
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"CSSStyleDeclaration",
|
|
7
7
|
"StyleSheet"
|
|
8
8
|
],
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "1.0.0",
|
|
10
10
|
"homepage": "https://github.com/jsakas/CSSStyleDeclaration",
|
|
11
11
|
"maintainers": [
|
|
12
12
|
{
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"resolve": "~1.1.7"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
|
-
"test": "./scripts/
|
|
53
|
+
"test": "node ./scripts/generate_properties.js && nodeunit tests",
|
|
54
54
|
"prepublish": "node ./scripts/generate_properties.js"
|
|
55
55
|
},
|
|
56
56
|
"license": "MIT"
|
package/tests/tests.js
CHANGED
|
@@ -420,5 +420,12 @@ module.exports = {
|
|
|
420
420
|
style.flexDirection = 'row';
|
|
421
421
|
test.equal(style.cssText, 'flex-direction: row;', 'flex-direction is not column');
|
|
422
422
|
test.done();
|
|
423
|
+
},
|
|
424
|
+
'Support non string entries in border-spacing': function (test) {
|
|
425
|
+
var style = new cssstyle.CSSStyleDeclaration();
|
|
426
|
+
test.expect(1);
|
|
427
|
+
style.borderSpacing = 0;
|
|
428
|
+
test.equal(style.cssText, 'border-spacing: 0px;', 'border-spacing is not 0');
|
|
429
|
+
test.done();
|
|
423
430
|
}
|
|
424
431
|
};
|
package/scripts/run_tests.sh
DELETED