stylus-source 0.23.0 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +5 -5
- data/VERSION +1 -1
- data/vendor/lib/functions/index.js +11 -12
- data/vendor/lib/functions/index.styl +45 -0
- data/vendor/lib/parser.js +13 -0
- data/vendor/lib/stylus.js +1 -1
- data/vendor/lib/visitor/evaluator.js +8 -0
- data/vendor/node_modules/cssom/Jakefile.js +35 -0
- data/vendor/node_modules/cssom/lib/CSSImportRule.js +10 -9
- data/vendor/node_modules/cssom/lib/CSSKeyframeRule.js +2 -0
- data/vendor/node_modules/cssom/lib/CSSKeyframesRule.js +2 -1
- data/vendor/node_modules/cssom/lib/CSSMediaRule.js +2 -1
- data/vendor/node_modules/cssom/lib/CSSRule.js +1 -0
- data/vendor/node_modules/cssom/lib/CSSStyleDeclaration.js +7 -5
- data/vendor/node_modules/cssom/lib/CSSStyleRule.js +11 -9
- data/vendor/node_modules/cssom/lib/CSSStyleSheet.js +4 -4
- data/vendor/node_modules/cssom/lib/MediaList.js +3 -3
- data/vendor/node_modules/cssom/lib/StyleSheet.js +3 -1
- data/vendor/node_modules/cssom/lib/clone.js +5 -5
- data/vendor/node_modules/cssom/lib/index.js +14 -12
- data/vendor/node_modules/cssom/lib/parse.js +48 -43
- data/vendor/node_modules/cssom/package.json +5 -4
- data/vendor/node_modules/debug/History.md +35 -0
- data/vendor/node_modules/debug/Makefile +5 -0
- data/vendor/node_modules/debug/Readme.md +128 -0
- data/vendor/node_modules/debug/debug.js +111 -0
- data/vendor/node_modules/debug/example/app.js +19 -0
- data/vendor/node_modules/debug/example/browser.html +24 -0
- data/vendor/node_modules/debug/example/wildcards.js +10 -0
- data/vendor/node_modules/debug/example/worker.js +22 -0
- data/vendor/node_modules/debug/index.js +2 -0
- data/vendor/node_modules/debug/lib/debug.js +129 -0
- data/vendor/node_modules/debug/package.json +11 -0
- data/vendor/node_modules/growl/History.md +21 -0
- data/vendor/node_modules/growl/Readme.md +29 -20
- data/vendor/node_modules/growl/lib/growl.js +113 -36
- data/vendor/node_modules/growl/package.json +1 -1
- data/vendor/node_modules/growl/test.js +12 -13
- data/vendor/node_modules/mkdirp/README.markdown +35 -2
- data/vendor/node_modules/mkdirp/examples/pow.js +1 -1
- data/vendor/node_modules/mkdirp/index.js +72 -13
- data/vendor/node_modules/mkdirp/package.json +2 -2
- data/vendor/node_modules/mkdirp/test/chmod.js +38 -0
- data/vendor/node_modules/mkdirp/test/clobber.js +37 -0
- data/vendor/node_modules/mkdirp/test/perm.js +32 -0
- data/vendor/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/vendor/node_modules/mkdirp/test/sync.js +27 -0
- data/vendor/node_modules/mkdirp/test/umask.js +28 -0
- data/vendor/node_modules/mkdirp/test/umask_sync.js +27 -0
- data/vendor/package.json +6 -5
- data/vendor/testing/test.css +39 -0
- data/vendor/testing/test.html +21 -0
- data/vendor/testing/test.js +5 -3
- data/vendor/testing/test.styl +42 -2
- metadata +23 -542
- data/vendor/History.md +0 -672
- data/vendor/Makefile +0 -20
- data/vendor/Readme.md +0 -155
- data/vendor/docs/bifs.md +0 -598
- data/vendor/docs/comments.md +0 -35
- data/vendor/docs/compare.md +0 -81
- data/vendor/docs/conditionals.md +0 -107
- data/vendor/docs/css-style.md +0 -77
- data/vendor/docs/error-reporting.md +0 -50
- data/vendor/docs/escape.md +0 -28
- data/vendor/docs/executable.md +0 -163
- data/vendor/docs/extend.md +0 -123
- data/vendor/docs/firebug.md +0 -59
- data/vendor/docs/font-face.md +0 -26
- data/vendor/docs/functions.md +0 -197
- data/vendor/docs/functions.url.md +0 -32
- data/vendor/docs/gedit.md +0 -24
- data/vendor/docs/import.md +0 -75
- data/vendor/docs/interpolation.md +0 -55
- data/vendor/docs/introspection.md +0 -38
- data/vendor/docs/iteration.md +0 -102
- data/vendor/docs/js.md +0 -157
- data/vendor/docs/keyframes.md +0 -122
- data/vendor/docs/kwargs.md +0 -34
- data/vendor/docs/literal.md +0 -16
- data/vendor/docs/media.md +0 -18
- data/vendor/docs/middleware.md +0 -72
- data/vendor/docs/mixins.md +0 -138
- data/vendor/docs/operators.md +0 -470
- data/vendor/docs/selectors.md +0 -133
- data/vendor/docs/textmate.md +0 -4
- data/vendor/docs/vargs.md +0 -84
- data/vendor/docs/variables.md +0 -85
- data/vendor/editors/Stylus.tmbundle/Commands/Compile and Display CSS.tmCommand +0 -33
- data/vendor/editors/Stylus.tmbundle/Preferences/Comments.tmPreferences +0 -36
- data/vendor/editors/Stylus.tmbundle/Syntaxes/Stylus.tmLanguage +0 -228
- data/vendor/editors/Stylus.tmbundle/info.plist +0 -10
- data/vendor/editors/gedit/styl.lang +0 -475
- data/vendor/examples/arithmetic.js +0 -12
- data/vendor/examples/arithmetic.styl +0 -29
- data/vendor/examples/basic.js +0 -12
- data/vendor/examples/basic.styl +0 -8
- data/vendor/examples/builtins.js +0 -12
- data/vendor/examples/builtins.styl +0 -56
- data/vendor/examples/comments.js +0 -11
- data/vendor/examples/comments.styl +0 -15
- data/vendor/examples/compress.js +0 -12
- data/vendor/examples/conversions.js +0 -12
- data/vendor/examples/conversions.styl +0 -34
- data/vendor/examples/functions.js +0 -12
- data/vendor/examples/functions.styl +0 -30
- data/vendor/examples/gradients.js +0 -13
- data/vendor/examples/gradients.styl +0 -8
- data/vendor/examples/images/gopher.jpg +0 -0
- data/vendor/examples/images/gradient.svg +0 -9
- data/vendor/examples/images/jesus.gif +0 -0
- data/vendor/examples/images/sprite.gif +0 -0
- data/vendor/examples/images.js +0 -20
- data/vendor/examples/images.styl +0 -15
- data/vendor/examples/implicit-functions.js +0 -12
- data/vendor/examples/implicit-functions.styl +0 -23
- data/vendor/examples/import.js +0 -12
- data/vendor/examples/import.styl +0 -11
- data/vendor/examples/js-functions.js +0 -55
- data/vendor/examples/js-functions.styl +0 -23
- data/vendor/examples/literal.js +0 -12
- data/vendor/examples/literal.styl +0 -8
- data/vendor/examples/middleware.js +0 -23
- data/vendor/examples/mixins/box.styl +0 -14
- data/vendor/examples/mixins/gradients.styl +0 -92
- data/vendor/examples/nesting.js +0 -12
- data/vendor/examples/nesting.styl +0 -14
- data/vendor/examples/variables.js +0 -12
- data/vendor/examples/variables.styl +0 -24
- data/vendor/node_modules/cssom/Jakefile +0 -37
- data/vendor/node_modules/cssom/MIT-LICENSE.txt +0 -20
- data/vendor/node_modules/cssom/README.mdown +0 -34
- data/vendor/node_modules/cssom/Rakefile +0 -23
- data/vendor/node_modules/cssom/animation.html +0 -27
- data/vendor/node_modules/cssom/bench.html +0 -47
- data/vendor/node_modules/cssom/comments.js +0 -63
- data/vendor/node_modules/cssom/docs/bar.css +0 -3
- data/vendor/node_modules/cssom/docs/col_table.html +0 -15
- data/vendor/node_modules/cssom/docs/cols.html +0 -14
- data/vendor/node_modules/cssom/docs/cols_inline-blocks.html +0 -33
- data/vendor/node_modules/cssom/docs/demo.css +0 -0
- data/vendor/node_modules/cssom/docs/diff.html +0 -132
- data/vendor/node_modules/cssom/docs/foo.css +0 -4
- data/vendor/node_modules/cssom/docs/parse.html +0 -282
- data/vendor/node_modules/cssom/docs/parse.html_ +0 -268
- data/vendor/node_modules/cssom/docs/parse2.html +0 -518
- data/vendor/node_modules/cssom/docs/parser.html +0 -31
- data/vendor/node_modules/cssom/index.html +0 -100
- data/vendor/node_modules/cssom/lib/CSSOM.js +0 -3
- data/vendor/node_modules/cssom/lib/Parser.js +0 -362
- data/vendor/node_modules/cssom/media.html +0 -17
- data/vendor/node_modules/cssom/plugins/toHTML.js +0 -32
- data/vendor/node_modules/cssom/server/index.html +0 -22
- data/vendor/node_modules/cssom/server/index.js +0 -21
- data/vendor/node_modules/cssom/shorthands.html +0 -21
- data/vendor/node_modules/cssom/strings.html +0 -10
- data/vendor/node_modules/cssom/test/CSSImportRule.test.js +0 -52
- data/vendor/node_modules/cssom/test/CSSStyleDeclaration.test.js +0 -42
- data/vendor/node_modules/cssom/test/CSSStyleRule.test.js +0 -12
- data/vendor/node_modules/cssom/test/CSSStyleSheet.test.js +0 -16
- data/vendor/node_modules/cssom/test/MediaList.test.js +0 -21
- data/vendor/node_modules/cssom/test/_helper.js +0 -122
- data/vendor/node_modules/cssom/test/clone.test.js +0 -38
- data/vendor/node_modules/cssom/test/fixtures/dummy.css +0 -3
- data/vendor/node_modules/cssom/test/helper.js +0 -122
- data/vendor/node_modules/cssom/test/index.html +0 -45
- data/vendor/node_modules/cssom/test/parse.test.js +0 -718
- data/vendor/node_modules/cssom/test/vendor/qunit.css +0 -189
- data/vendor/node_modules/cssom/test/vendor/qunit.js +0 -1415
- data/vendor/test/cases/arithmetic.color.css +0 -44
- data/vendor/test/cases/arithmetic.color.styl +0 -48
- data/vendor/test/cases/arithmetic.css +0 -23
- data/vendor/test/cases/arithmetic.styl +0 -30
- data/vendor/test/cases/arithmetic.unary.css +0 -16
- data/vendor/test/cases/arithmetic.unary.styl +0 -16
- data/vendor/test/cases/atscope.css +0 -21
- data/vendor/test/cases/atscope.styl +0 -23
- data/vendor/test/cases/bifs.add-property.css +0 -21
- data/vendor/test/cases/bifs.add-property.styl +0 -48
- data/vendor/test/cases/bifs.components.css +0 -9
- data/vendor/test/cases/bifs.components.styl +0 -9
- data/vendor/test/cases/bifs.dark.css +0 -5
- data/vendor/test/cases/bifs.dark.styl +0 -4
- data/vendor/test/cases/bifs.darken.css +0 -8
- data/vendor/test/cases/bifs.darken.styl +0 -9
- data/vendor/test/cases/bifs.fade.css +0 -6
- data/vendor/test/cases/bifs.fade.styl +0 -6
- data/vendor/test/cases/bifs.image-size.css +0 -9
- data/vendor/test/cases/bifs.image-size.styl +0 -16
- data/vendor/test/cases/bifs.join.css +0 -18
- data/vendor/test/cases/bifs.join.styl +0 -21
- data/vendor/test/cases/bifs.keys.css +0 -4
- data/vendor/test/cases/bifs.keys.styl +0 -6
- data/vendor/test/cases/bifs.last.css +0 -5
- data/vendor/test/cases/bifs.last.styl +0 -6
- data/vendor/test/cases/bifs.length.css +0 -10
- data/vendor/test/cases/bifs.length.styl +0 -18
- data/vendor/test/cases/bifs.light.css +0 -5
- data/vendor/test/cases/bifs.light.styl +0 -4
- data/vendor/test/cases/bifs.lighten.css +0 -14
- data/vendor/test/cases/bifs.lighten.styl +0 -14
- data/vendor/test/cases/bifs.lookup.css +0 -3
- data/vendor/test/cases/bifs.lookup.styl +0 -8
- data/vendor/test/cases/bifs.match.css +0 -4
- data/vendor/test/cases/bifs.match.styl +0 -9
- data/vendor/test/cases/bifs.opposite-position.css +0 -8
- data/vendor/test/cases/bifs.opposite-position.styl +0 -9
- data/vendor/test/cases/bifs.push.css +0 -25
- data/vendor/test/cases/bifs.push.styl +0 -48
- data/vendor/test/cases/bifs.rgba.css +0 -5
- data/vendor/test/cases/bifs.rgba.styl +0 -4
- data/vendor/test/cases/bifs.s.css +0 -11
- data/vendor/test/cases/bifs.s.styl +0 -12
- data/vendor/test/cases/bifs.type.css +0 -11
- data/vendor/test/cases/bifs.type.styl +0 -12
- data/vendor/test/cases/bifs.unit.css +0 -6
- data/vendor/test/cases/bifs.unit.styl +0 -5
- data/vendor/test/cases/bifs.unquote.css +0 -5
- data/vendor/test/cases/bifs.unquote.styl +0 -8
- data/vendor/test/cases/bifs.url.css +0 -11
- data/vendor/test/cases/bifs.url.styl +0 -15
- data/vendor/test/cases/bifs.values.css +0 -5
- data/vendor/test/cases/bifs.values.styl +0 -6
- data/vendor/test/cases/casting.css +0 -12
- data/vendor/test/cases/casting.styl +0 -14
- data/vendor/test/cases/coercion.css +0 -6
- data/vendor/test/cases/coercion.styl +0 -5
- data/vendor/test/cases/comments.css +0 -18
- data/vendor/test/cases/comments.styl +0 -28
- data/vendor/test/cases/compress.comments.css +0 -2
- data/vendor/test/cases/compress.comments.styl +0 -5
- data/vendor/test/cases/compress.units.css +0 -2
- data/vendor/test/cases/compress.units.styl +0 -18
- data/vendor/test/cases/conditional-assignment.css +0 -4
- data/vendor/test/cases/conditional-assignment.styl +0 -9
- data/vendor/test/cases/control.blueprint.ie.css +0 -126
- data/vendor/test/cases/control.blueprint.ie.styl +0 -36
- data/vendor/test/cases/control.blueprint.screen.css +0 -1103
- data/vendor/test/cases/control.blueprint.screen.styl +0 -265
- data/vendor/test/cases/control.boilerplate.css +0 -473
- data/vendor/test/cases/control.boilerplate.styl +0 -265
- data/vendor/test/cases/css.extend.css +0 -13
- data/vendor/test/cases/css.extend.styl +0 -15
- data/vendor/test/cases/css.functions.single-line.css +0 -9
- data/vendor/test/cases/css.functions.single-line.styl +0 -13
- data/vendor/test/cases/css.if.css +0 -8
- data/vendor/test/cases/css.if.styl +0 -21
- data/vendor/test/cases/css.keyframes.css +0 -57
- data/vendor/test/cases/css.keyframes.styl +0 -48
- data/vendor/test/cases/css.large.css +0 -172
- data/vendor/test/cases/css.large.styl +0 -172
- data/vendor/test/cases/css.media.css +0 -15
- data/vendor/test/cases/css.media.styl +0 -17
- data/vendor/test/cases/css.mixins.braces.css +0 -38
- data/vendor/test/cases/css.mixins.braces.styl +0 -53
- data/vendor/test/cases/css.mixins.css +0 -38
- data/vendor/test/cases/css.mixins.root.css +0 -26
- data/vendor/test/cases/css.mixins.root.styl +0 -25
- data/vendor/test/cases/css.mixins.root.wonky.css +0 -26
- data/vendor/test/cases/css.mixins.root.wonky.styl +0 -17
- data/vendor/test/cases/css.mixins.styl +0 -47
- data/vendor/test/cases/css.selector.interpolation.css +0 -91
- data/vendor/test/cases/css.selector.interpolation.styl +0 -90
- data/vendor/test/cases/css.selectors.css +0 -38
- data/vendor/test/cases/css.selectors.styl +0 -53
- data/vendor/test/cases/css.whitespace.css +0 -37
- data/vendor/test/cases/css.whitespace.styl +0 -38
- data/vendor/test/cases/dumb.css +0 -10
- data/vendor/test/cases/dumb.styl +0 -11
- data/vendor/test/cases/eol-escape.css +0 -11
- data/vendor/test/cases/eol-escape.styl +0 -27
- data/vendor/test/cases/escape.css +0 -4
- data/vendor/test/cases/escape.styl +0 -4
- data/vendor/test/cases/extend.complex.css +0 -16
- data/vendor/test/cases/extend.complex.styl +0 -15
- data/vendor/test/cases/extend.css +0 -22
- data/vendor/test/cases/extend.multiple-definitions.css +0 -11
- data/vendor/test/cases/extend.multiple-definitions.styl +0 -9
- data/vendor/test/cases/extend.styl +0 -22
- data/vendor/test/cases/fontface.css +0 -4
- data/vendor/test/cases/fontface.styl +0 -5
- data/vendor/test/cases/for.complex.css +0 -44
- data/vendor/test/cases/for.complex.styl +0 -28
- data/vendor/test/cases/for.css +0 -52
- data/vendor/test/cases/for.function.css +0 -20
- data/vendor/test/cases/for.function.styl +0 -51
- data/vendor/test/cases/for.styl +0 -44
- data/vendor/test/cases/function.arguments.css +0 -4
- data/vendor/test/cases/function.arguments.styl +0 -14
- data/vendor/test/cases/function.literals.css +0 -6
- data/vendor/test/cases/function.literals.styl +0 -12
- data/vendor/test/cases/functions.arg-calls.css +0 -3
- data/vendor/test/cases/functions.arg-calls.styl +0 -9
- data/vendor/test/cases/functions.call.css +0 -4
- data/vendor/test/cases/functions.call.styl +0 -7
- data/vendor/test/cases/functions.css +0 -11
- data/vendor/test/cases/functions.defaults.css +0 -15
- data/vendor/test/cases/functions.defaults.styl +0 -30
- data/vendor/test/cases/functions.multi-line.css +0 -9
- data/vendor/test/cases/functions.multi-line.styl +0 -25
- data/vendor/test/cases/functions.multiple-calls.css +0 -13
- data/vendor/test/cases/functions.multiple-calls.styl +0 -26
- data/vendor/test/cases/functions.nested-calls.css +0 -3
- data/vendor/test/cases/functions.nested-calls.styl +0 -9
- data/vendor/test/cases/functions.nested.css +0 -10
- data/vendor/test/cases/functions.nested.styl +0 -37
- data/vendor/test/cases/functions.property.css +0 -10
- data/vendor/test/cases/functions.property.styl +0 -11
- data/vendor/test/cases/functions.return.css +0 -15
- data/vendor/test/cases/functions.return.each.css +0 -10
- data/vendor/test/cases/functions.return.each.styl +0 -23
- data/vendor/test/cases/functions.return.styl +0 -86
- data/vendor/test/cases/functions.styl +0 -34
- data/vendor/test/cases/functions.variable.css +0 -9
- data/vendor/test/cases/functions.variable.ident.css +0 -3
- data/vendor/test/cases/functions.variable.ident.styl +0 -11
- data/vendor/test/cases/functions.variable.styl +0 -27
- data/vendor/test/cases/hack.star.css +0 -27
- data/vendor/test/cases/hack.star.styl +0 -37
- data/vendor/test/cases/if.css +0 -43
- data/vendor/test/cases/if.else.css +0 -6
- data/vendor/test/cases/if.else.styl +0 -16
- data/vendor/test/cases/if.mixin.css +0 -7
- data/vendor/test/cases/if.mixin.styl +0 -24
- data/vendor/test/cases/if.postfix.css +0 -61
- data/vendor/test/cases/if.postfix.styl +0 -110
- data/vendor/test/cases/if.selectors.css +0 -16
- data/vendor/test/cases/if.selectors.styl +0 -22
- data/vendor/test/cases/if.styl +0 -99
- data/vendor/test/cases/import.basic/a.styl +0 -5
- data/vendor/test/cases/import.basic/b.styl +0 -5
- data/vendor/test/cases/import.basic/c.styl +0 -3
- data/vendor/test/cases/import.basic.css +0 -11
- data/vendor/test/cases/import.basic.styl +0 -4
- data/vendor/test/cases/import.complex/a.styl +0 -4
- data/vendor/test/cases/import.complex/c.styl +0 -2
- data/vendor/test/cases/import.complex/nested/b.styl +0 -4
- data/vendor/test/cases/import.complex.css +0 -9
- data/vendor/test/cases/import.complex.styl +0 -1
- data/vendor/test/cases/import.index/vendor/a.styl +0 -2
- data/vendor/test/cases/import.index/vendor/b.styl +0 -2
- data/vendor/test/cases/import.index/vendor/c.styl +0 -2
- data/vendor/test/cases/import.index/vendor/index.styl +0 -4
- data/vendor/test/cases/import.index.css +0 -9
- data/vendor/test/cases/import.index.styl +0 -2
- data/vendor/test/cases/import.literal.css +0 -2
- data/vendor/test/cases/import.literal.styl +0 -3
- data/vendor/test/cases/import.mixins.css +0 -7
- data/vendor/test/cases/import.mixins.styl +0 -9
- data/vendor/test/cases/import.ordering/five.styl +0 -2
- data/vendor/test/cases/import.ordering/four.styl +0 -4
- data/vendor/test/cases/import.ordering/two.styl +0 -2
- data/vendor/test/cases/import.ordering.css +0 -15
- data/vendor/test/cases/import.ordering.styl +0 -12
- data/vendor/test/cases/important.css +0 -6
- data/vendor/test/cases/important.styl +0 -6
- data/vendor/test/cases/interpolation.properties.css +0 -40
- data/vendor/test/cases/interpolation.properties.styl +0 -56
- data/vendor/test/cases/introspection.css +0 -7
- data/vendor/test/cases/introspection.styl +0 -14
- data/vendor/test/cases/jquery.css +0 -3
- data/vendor/test/cases/jquery.styl +0 -5
- data/vendor/test/cases/keyframes.css +0 -9
- data/vendor/test/cases/keyframes.fabrication.css +0 -18
- data/vendor/test/cases/keyframes.fabrication.defaults.css +0 -45
- data/vendor/test/cases/keyframes.fabrication.defaults.styl +0 -9
- data/vendor/test/cases/keyframes.fabrication.styl +0 -11
- data/vendor/test/cases/keyframes.newlines.css +0 -45
- data/vendor/test/cases/keyframes.newlines.styl +0 -7
- data/vendor/test/cases/keyframes.styl +0 -6
- data/vendor/test/cases/kwargs.css +0 -63
- data/vendor/test/cases/kwargs.styl +0 -74
- data/vendor/test/cases/list.css +0 -3
- data/vendor/test/cases/list.styl +0 -3
- data/vendor/test/cases/literal.color.css +0 -10
- data/vendor/test/cases/literal.color.styl +0 -9
- data/vendor/test/cases/literal.css +0 -10
- data/vendor/test/cases/literal.styl +0 -18
- data/vendor/test/cases/media.css +0 -14
- data/vendor/test/cases/media.styl +0 -11
- data/vendor/test/cases/mixin.conditional.css +0 -19
- data/vendor/test/cases/mixin.conditional.styl +0 -36
- data/vendor/test/cases/mixin.order.conditional.css +0 -11
- data/vendor/test/cases/mixin.order.conditional.styl +0 -20
- data/vendor/test/cases/mixin.order.css +0 -9
- data/vendor/test/cases/mixin.order.nested.css +0 -9
- data/vendor/test/cases/mixin.order.nested.styl +0 -21
- data/vendor/test/cases/mixin.order.styl +0 -20
- data/vendor/test/cases/mixins/box.styl +0 -11
- data/vendor/test/cases/mixins.complex.css +0 -30
- data/vendor/test/cases/mixins.complex.fix-to.css +0 -15
- data/vendor/test/cases/mixins.complex.fix-to.styl +0 -28
- data/vendor/test/cases/mixins.complex.styl +0 -41
- data/vendor/test/cases/mixins.conditional.css +0 -3
- data/vendor/test/cases/mixins.conditional.styl +0 -8
- data/vendor/test/cases/mixins.nested.css +0 -7
- data/vendor/test/cases/mixins.nested.selectors.css +0 -21
- data/vendor/test/cases/mixins.nested.selectors.styl +0 -31
- data/vendor/test/cases/mixins.nested.styl +0 -14
- data/vendor/test/cases/mixins.order.2.css +0 -11
- data/vendor/test/cases/mixins.order.2.styl +0 -16
- data/vendor/test/cases/mixins.reset.css +0 -75
- data/vendor/test/cases/mixins.reset.styl +0 -27
- data/vendor/test/cases/mixins.return.css +0 -4
- data/vendor/test/cases/mixins.return.styl +0 -8
- data/vendor/test/cases/mixins.root.css +0 -3
- data/vendor/test/cases/mixins.root.styl +0 -5
- data/vendor/test/cases/operator.range.css +0 -15
- data/vendor/test/cases/operator.range.styl +0 -23
- data/vendor/test/cases/operators.assignment.function.css +0 -15
- data/vendor/test/cases/operators.assignment.function.styl +0 -34
- data/vendor/test/cases/operators.assignment.mixin.css +0 -15
- data/vendor/test/cases/operators.assignment.mixin.styl +0 -39
- data/vendor/test/cases/operators.assignment.root.css +0 -25
- data/vendor/test/cases/operators.assignment.root.styl +0 -55
- data/vendor/test/cases/operators.complex.css +0 -9
- data/vendor/test/cases/operators.complex.styl +0 -32
- data/vendor/test/cases/operators.css +0 -40
- data/vendor/test/cases/operators.equality.css +0 -55
- data/vendor/test/cases/operators.equality.styl +0 -55
- data/vendor/test/cases/operators.in.css +0 -37
- data/vendor/test/cases/operators.in.styl +0 -51
- data/vendor/test/cases/operators.mixins.css +0 -10
- data/vendor/test/cases/operators.mixins.styl +0 -25
- data/vendor/test/cases/operators.precedence.css +0 -51
- data/vendor/test/cases/operators.precedence.styl +0 -82
- data/vendor/test/cases/operators.styl +0 -96
- data/vendor/test/cases/operators.subscript.assign.css +0 -21
- data/vendor/test/cases/operators.subscript.assign.styl +0 -45
- data/vendor/test/cases/operators.subscript.css +0 -59
- data/vendor/test/cases/operators.subscript.range.css +0 -14
- data/vendor/test/cases/operators.subscript.range.styl +0 -15
- data/vendor/test/cases/operators.subscript.styl +0 -81
- data/vendor/test/cases/page.css +0 -16
- data/vendor/test/cases/page.styl +0 -17
- data/vendor/test/cases/parent.css +0 -32
- data/vendor/test/cases/parent.styl +0 -33
- data/vendor/test/cases/properties.colons.css +0 -8
- data/vendor/test/cases/properties.colons.styl +0 -10
- data/vendor/test/cases/properties.css +0 -4
- data/vendor/test/cases/properties.one-line.css +0 -10
- data/vendor/test/cases/properties.one-line.styl +0 -11
- data/vendor/test/cases/properties.styl +0 -4
- data/vendor/test/cases/property-access.bubble.css +0 -38
- data/vendor/test/cases/property-access.bubble.styl +0 -46
- data/vendor/test/cases/property-access.css +0 -48
- data/vendor/test/cases/property-access.siblings.css +0 -19
- data/vendor/test/cases/property-access.siblings.styl +0 -20
- data/vendor/test/cases/property-access.styl +0 -62
- data/vendor/test/cases/regression.107.lookup-failure.css +0 -12
- data/vendor/test/cases/regression.107.lookup-failure.styl +0 -13
- data/vendor/test/cases/regression.127.css +0 -3
- data/vendor/test/cases/regression.127.styl +0 -2
- data/vendor/test/cases/regression.130.css +0 -16
- data/vendor/test/cases/regression.130.styl +0 -6
- data/vendor/test/cases/regression.131.css +0 -7
- data/vendor/test/cases/regression.131.styl +0 -2
- data/vendor/test/cases/regression.137.css +0 -7
- data/vendor/test/cases/regression.137.styl +0 -7
- data/vendor/test/cases/regression.139.css +0 -5
- data/vendor/test/cases/regression.139.styl +0 -21
- data/vendor/test/cases/regression.142.css +0 -39
- data/vendor/test/cases/regression.142.styl +0 -54
- data/vendor/test/cases/regression.146.css +0 -30
- data/vendor/test/cases/regression.146.styl +0 -31
- data/vendor/test/cases/regression.153.css +0 -8
- data/vendor/test/cases/regression.153.styl +0 -9
- data/vendor/test/cases/regression.154.css +0 -8
- data/vendor/test/cases/regression.154.styl +0 -14
- data/vendor/test/cases/regression.156.css +0 -4
- data/vendor/test/cases/regression.156.styl +0 -6
- data/vendor/test/cases/regression.212.css +0 -15
- data/vendor/test/cases/regression.212.styl +0 -14
- data/vendor/test/cases/regression.216.css +0 -10
- data/vendor/test/cases/regression.216.styl +0 -8
- data/vendor/test/cases/regression.220.css +0 -5
- data/vendor/test/cases/regression.220.styl +0 -5
- data/vendor/test/cases/regression.229.css +0 -12
- data/vendor/test/cases/regression.229.styl +0 -9
- data/vendor/test/cases/regression.233.css +0 -6
- data/vendor/test/cases/regression.233.styl +0 -7
- data/vendor/test/cases/regression.235.css +0 -11
- data/vendor/test/cases/regression.235.styl +0 -13
- data/vendor/test/cases/regression.243.css +0 -3
- data/vendor/test/cases/regression.243.styl +0 -4
- data/vendor/test/cases/regression.244.css +0 -3
- data/vendor/test/cases/regression.244.styl +0 -3
- data/vendor/test/cases/regression.247.css +0 -6
- data/vendor/test/cases/regression.247.styl +0 -6
- data/vendor/test/cases/regression.248.compressed.css +0 -4
- data/vendor/test/cases/regression.248.compressed.styl +0 -10
- data/vendor/test/cases/regression.252.css +0 -13
- data/vendor/test/cases/regression.252.styl +0 -13
- data/vendor/test/cases/regression.260.css +0 -6
- data/vendor/test/cases/regression.260.styl +0 -6
- data/vendor/test/cases/regression.267.css +0 -3
- data/vendor/test/cases/regression.267.styl +0 -3
- data/vendor/test/cases/regression.270.css +0 -5
- data/vendor/test/cases/regression.270.styl +0 -7
- data/vendor/test/cases/regression.272.css +0 -11
- data/vendor/test/cases/regression.272.styl +0 -17
- data/vendor/test/cases/regression.274.css +0 -14
- data/vendor/test/cases/regression.274.styl +0 -16
- data/vendor/test/cases/regression.292.css +0 -3
- data/vendor/test/cases/regression.292.styl +0 -3
- data/vendor/test/cases/regression.360.css +0 -19
- data/vendor/test/cases/regression.360.styl +0 -1
- data/vendor/test/cases/regression.368.css +0 -4
- data/vendor/test/cases/regression.368.styl +0 -3
- data/vendor/test/cases/regression.379.css +0 -6
- data/vendor/test/cases/regression.379.styl +0 -10
- data/vendor/test/cases/regression.380.css +0 -8
- data/vendor/test/cases/regression.380.styl +0 -14
- data/vendor/test/cases/regression.388.css +0 -2
- data/vendor/test/cases/regression.388.styl +0 -6
- data/vendor/test/cases/regression.415.css +0 -5
- data/vendor/test/cases/regression.415.styl +0 -3
- data/vendor/test/cases/regression.420.css +0 -21
- data/vendor/test/cases/regression.420.styl +0 -29
- data/vendor/test/cases/regression.432.css +0 -5
- data/vendor/test/cases/regression.432.styl +0 -4
- data/vendor/test/cases/regression.440.css +0 -5
- data/vendor/test/cases/regression.440.styl +0 -7
- data/vendor/test/cases/regression.449.css +0 -9
- data/vendor/test/cases/regression.449.styl +0 -10
- data/vendor/test/cases/regression.458.css +0 -3
- data/vendor/test/cases/regression.458.styl +0 -3
- data/vendor/test/cases/regression.460.css +0 -13
- data/vendor/test/cases/regression.460.styl +0 -18
- data/vendor/test/cases/regression.469.css +0 -4
- data/vendor/test/cases/regression.469.styl +0 -6
- data/vendor/test/cases/regression.472.css +0 -10
- data/vendor/test/cases/regression.472.styl +0 -23
- data/vendor/test/cases/regression.475.css +0 -6
- data/vendor/test/cases/regression.475.styl +0 -7
- data/vendor/test/cases/regression.480.css +0 -9
- data/vendor/test/cases/regression.480.styl +0 -12
- data/vendor/test/cases/regression.484.css +0 -9
- data/vendor/test/cases/regression.484.styl +0 -8
- data/vendor/test/cases/regression.498.css +0 -8
- data/vendor/test/cases/regression.498.styl +0 -11
- data/vendor/test/cases/regression.499.css +0 -14
- data/vendor/test/cases/regression.499.styl +0 -20
- data/vendor/test/cases/regression.503.css +0 -65
- data/vendor/test/cases/regression.503.styl +0 -7
- data/vendor/test/cases/regression.504.css +0 -65
- data/vendor/test/cases/regression.504.styl +0 -12
- data/vendor/test/cases/regression.524.css +0 -4
- data/vendor/test/cases/regression.524.styl +0 -7
- data/vendor/test/cases/regression.535.css +0 -3
- data/vendor/test/cases/regression.535.styl +0 -9
- data/vendor/test/cases/regression.536.css +0 -3
- data/vendor/test/cases/regression.536.styl +0 -5
- data/vendor/test/cases/reset.css +0 -70
- data/vendor/test/cases/reset.styl +0 -16
- data/vendor/test/cases/rule.charset.css +0 -1
- data/vendor/test/cases/rule.charset.styl +0 -2
- data/vendor/test/cases/rulset.css +0 -4
- data/vendor/test/cases/rulset.newline.css +0 -5
- data/vendor/test/cases/rulset.newline.styl +0 -5
- data/vendor/test/cases/rulset.styl +0 -3
- data/vendor/test/cases/scope.complex.css +0 -10
- data/vendor/test/cases/scope.complex.styl +0 -16
- data/vendor/test/cases/scope.css +0 -5
- data/vendor/test/cases/scope.nested.css +0 -9
- data/vendor/test/cases/scope.nested.styl +0 -10
- data/vendor/test/cases/scope.styl +0 -12
- data/vendor/test/cases/selector.interpolation.css +0 -57
- data/vendor/test/cases/selector.interpolation.styl +0 -45
- data/vendor/test/cases/selectors.complex.css +0 -28
- data/vendor/test/cases/selectors.complex.styl +0 -27
- data/vendor/test/cases/selectors.css +0 -50
- data/vendor/test/cases/selectors.nested.comma.css +0 -9
- data/vendor/test/cases/selectors.nested.comma.styl +0 -8
- data/vendor/test/cases/selectors.nested.css +0 -34
- data/vendor/test/cases/selectors.nested.styl +0 -33
- data/vendor/test/cases/selectors.pseudo.css +0 -27
- data/vendor/test/cases/selectors.pseudo.elements.css +0 -26
- data/vendor/test/cases/selectors.pseudo.elements.styl +0 -29
- data/vendor/test/cases/selectors.pseudo.styl +0 -24
- data/vendor/test/cases/selectors.styl +0 -46
- data/vendor/test/cases/self-assignment.css +0 -3
- data/vendor/test/cases/self-assignment.styl +0 -4
- data/vendor/test/cases/vargs.call.css +0 -24
- data/vendor/test/cases/vargs.call.styl +0 -40
- data/vendor/test/cases/vargs.css +0 -30
- data/vendor/test/cases/vargs.styl +0 -49
- data/vendor/test/cases/variable.css +0 -3
- data/vendor/test/cases/variable.styl +0 -4
- data/vendor/test/cases/variables.css +0 -12
- data/vendor/test/cases/variables.styl +0 -17
- data/vendor/test/images/gif +0 -0
- data/vendor/test/images/squirrel.jpeg +0 -0
- data/vendor/test/images/tux.png +0 -0
- data/vendor/test/run.js +0 -169
@@ -1,47 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title></title>
|
5
|
-
</head>
|
6
|
-
<body>
|
7
|
-
<script>
|
8
|
-
function y(){
|
9
|
-
function f(s, i) {for (;--i;) s+='!'; return s}
|
10
|
-
return f('A', 3)
|
11
|
-
}
|
12
|
-
|
13
|
-
var sample = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer facilisis, eros ut pharetra mattis, mi diam ultricies metus, nec adipiscing nunc erat in felis. Nulla vel lacinia nunc. Suspendisse potenti. Nullam rutrum rutrum tortor, in viverra leo mattis et. Aliquam volutpat vulputate lacus, sed fringilla mi posuere a. Donec enim lorem, molestie et tincidunt ac, auctor sed erat. Fusce tincidunt laoreet lobortis. Aliquam erat volutpat. Curabitur non consectetur lectus. Mauris faucibus faucibus felis, at pellentesque orci posuere id. Praesent ultricies tincidunt lobortis. Nam ut tellus mauris, gravida pharetra ipsum.\
|
14
|
-
\
|
15
|
-
Quisque vitae ante non ligula dapibus condimentum vulputate vitae magna. Praesent et mi velit. Maecenas ornare fermentum ullamcorper. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean ut erat ligula. Curabitur lectus nunc, varius sit amet viverra quis, consectetur vel ligula. Aenean placerat, odio eget sollicitudin imperdiet, odio lorem fringilla justo, eu placerat mi eros vel felis. Pellentesque ut sem sit amet eros mollis molestie. Pellentesque tristique arcu sed tortor viverra sed tempus nibh posuere. Sed in eleifend velit. Aenean tempus mi accumsan nunc euismod semper. Curabitur nec lobortis nibh.\
|
16
|
-
\
|
17
|
-
Sed lobortis hendrerit dignissim. Donec a neque risus, quis tristique felis. Vivamus vel nisi ut ante mollis euismod et eget eros. Praesent euismod massa massa, ac aliquet nisl. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse pellentesque, augue sit amet volutpat sodales, libero nulla rhoncus odio, quis condimentum justo tellus vitae massa. Aenean neque sem, tristique a rutrum a, pellentesque ut magna. Nulla suscipit mi nec nibh consectetur non interdum dui porttitor. Sed eu urna metus, sit amet facilisis metus. Nam consectetur diam vel libero fringilla eget consequat massa condimentum. In hac habitasse platea dictumst. In hac habitasse platea dictumst. Phasellus lobortis gravida imperdiet. Donec at augue dui, sed interdum odio. Sed quam nisl, fringilla varius dignissim id, ornare eget massa. Proin ut nulla nisl, vitae varius nisl. Integer ornare pretium tincidunt. Sed eu arcu vitae neque feugiat venenatis vel sed erat. Suspendisse fermentum porttitor magna ut facilisis. Mauris convallis mollis sollicitudin.\
|
18
|
-
\
|
19
|
-
Vivamus nec leo risus, eget consequat elit. Morbi sit amet erat nisl. Vivamus viverra faucibus quam non cursus. Integer nisi nulla, volutpat ac mattis sed, ultricies quis metus. Praesent facilisis dignissim mi, vitae sodales purus cursus ac. Proin iaculis auctor odio sed pellentesque. Maecenas egestas, leo eu bibendum egestas, quam turpis imperdiet sem, in elementum urna nisi quis erat. Donec ultrices tellus a orci sodales convallis. In hac habitasse platea dictumst. Maecenas vestibulum bibendum consectetur. In vel nunc dui, hendrerit porta nisl. Mauris ac diam nec neque faucibus faucibus. Donec nec viverra felis. Suspendisse diam dui, egestas quis elementum ut, eleifend faucibus urna. Nulla dui erat, malesuada sit amet semper ac, tempor et sem. Donec nec pulvinar nisi.\
|
20
|
-
\
|
21
|
-
Vivamus eu ligula ligula. Integer interdum mauris eu velit eleifend quis rutrum purus consectetur. Aenean bibendum varius eros, id auctor enim sollicitudin ac. Fusce quis viverra elit. Cras eget ipsum sit amet enim dictum luctus id sit amet justo. Praesent feugiat venenatis nisi sed imperdiet. Aliquam tellus lorem, egestas eget ultrices eget, pharetra non leo. Ut massa sem, volutpat sit amet lobortis vel, ornare id sapien. Vestibulum pretium faucibus velit non volutpat. Donec in lacus nibh, mattis eleifend justo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.";
|
22
|
-
|
23
|
-
function Buffer() {
|
24
|
-
this._str = "";
|
25
|
-
}
|
26
|
-
Buffer.prototype.append = function(str){
|
27
|
-
this._str += str;
|
28
|
-
};
|
29
|
-
|
30
|
-
var length = sample.length;
|
31
|
-
|
32
|
-
|
33
|
-
var buffer = new Buffer();
|
34
|
-
for (var i = 0; i < length; i++) {
|
35
|
-
buffer.append(sample[i]);
|
36
|
-
}
|
37
|
-
|
38
|
-
var buffer2 = "";
|
39
|
-
for (var i = 0; i < length; i++) {
|
40
|
-
buffer2 += sample[i];
|
41
|
-
}
|
42
|
-
|
43
|
-
console.log(buffer._str == buffer2);
|
44
|
-
|
45
|
-
</script>
|
46
|
-
</body>
|
47
|
-
</html>
|
@@ -1,63 +0,0 @@
|
|
1
|
-
var str = '"BB"/** sdfsdfs **/"CC"';
|
2
|
-
var str2 = '"BBB"/* sdfsdfs */ "CCC" /* "asdfasdf" **/ \n' +
|
3
|
-
'"D""E"';
|
4
|
-
|
5
|
-
|
6
|
-
function extractStrings(str) {
|
7
|
-
|
8
|
-
var result = [];
|
9
|
-
|
10
|
-
var quote_opened;
|
11
|
-
var afterSlash;
|
12
|
-
var comment_opened;
|
13
|
-
var buffer = '';
|
14
|
-
|
15
|
-
for (var i = 0, character; character = str[i]; i++) {
|
16
|
-
switch (character) {
|
17
|
-
case '"':
|
18
|
-
if (comment_opened) {
|
19
|
-
break;
|
20
|
-
}
|
21
|
-
if (quote_opened) {
|
22
|
-
result.push(buffer);
|
23
|
-
buffer = '';
|
24
|
-
quote_opened = false;
|
25
|
-
} else {
|
26
|
-
quote_opened = true;
|
27
|
-
}
|
28
|
-
break;
|
29
|
-
case '/':
|
30
|
-
if (quote_opened) {
|
31
|
-
buffer += character;
|
32
|
-
} else if (str[i + 1] == '*') {
|
33
|
-
i++;
|
34
|
-
comment_opened = true;
|
35
|
-
}
|
36
|
-
break;
|
37
|
-
case '*':
|
38
|
-
if (quote_opened) {
|
39
|
-
buffer += character;
|
40
|
-
} else if (comment_opened && str[i + 1] == '/') {
|
41
|
-
i++;
|
42
|
-
comment_opened = false;
|
43
|
-
} else if (quote_opened && !comment_opened) {
|
44
|
-
buffer += character;
|
45
|
-
}
|
46
|
-
break;
|
47
|
-
default:
|
48
|
-
if (quote_opened) {
|
49
|
-
buffer += character;
|
50
|
-
}
|
51
|
-
break;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
|
55
|
-
return result;
|
56
|
-
}
|
57
|
-
|
58
|
-
|
59
|
-
console.log(extractStrings('"AAA"'));
|
60
|
-
console.log(extractStrings('"/*AAA*/"'));
|
61
|
-
console.log(extractStrings('/*"BBB"*/'));
|
62
|
-
console.log(extractStrings('/**"BBB"**/'));
|
63
|
-
console.log(extractStrings('"/*A" BBB "A*/"'));
|
@@ -1,33 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title></title>
|
5
|
-
<style>
|
6
|
-
html {
|
7
|
-
background: #EEE;
|
8
|
-
height: 100%;
|
9
|
-
}
|
10
|
-
body {
|
11
|
-
height: 100%;
|
12
|
-
margin: 0;
|
13
|
-
}
|
14
|
-
div {
|
15
|
-
display: inline-block;
|
16
|
-
width: 33%;
|
17
|
-
height: 100%;
|
18
|
-
vertical-align: top;
|
19
|
-
}
|
20
|
-
textarea {
|
21
|
-
height: 99%;
|
22
|
-
width: 99%;
|
23
|
-
border: 0;
|
24
|
-
margin: 1px auto 0;
|
25
|
-
padding: 0;
|
26
|
-
}
|
27
|
-
</style>
|
28
|
-
</head>
|
29
|
-
<body>
|
30
|
-
<div><textarea>234</textarea></div><div><textarea>234</textarea></div><div><pre></pre></pre></div>
|
31
|
-
</div>
|
32
|
-
</body>
|
33
|
-
</html>
|
File without changes
|
@@ -1,132 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title></title>
|
5
|
-
<style>
|
6
|
-
body {
|
7
|
-
background: #EEE;
|
8
|
-
}
|
9
|
-
</style>
|
10
|
-
<script>
|
11
|
-
var exports = {};
|
12
|
-
function require(){
|
13
|
-
return exports;
|
14
|
-
}
|
15
|
-
</script>
|
16
|
-
<script src="../lib/CSSStyleDeclaration.js"></script>
|
17
|
-
<script src="../lib/CSSRule.js"></script>
|
18
|
-
<script src="../lib/CSSStyleRule.js"></script>
|
19
|
-
<script src="../lib/CSSImportRule.js"></script>
|
20
|
-
<script src="../lib/MediaList.js"></script>
|
21
|
-
<script src="../lib/CSSMediaRule.js"></script>
|
22
|
-
<script src="../lib/StyleSheet.js"></script>
|
23
|
-
<script src="../lib/CSSStyleSheet.js"></script>
|
24
|
-
<script src="../lib/parse.js"></script>
|
25
|
-
<script src="../lib/clone.js"></script>
|
26
|
-
<script>
|
27
|
-
window.CSSOM = exports;
|
28
|
-
</script>
|
29
|
-
</head>
|
30
|
-
<body>
|
31
|
-
<script>
|
32
|
-
function diffObjects(a, b) {
|
33
|
-
var diff = {};
|
34
|
-
|
35
|
-
for (var key in a) {
|
36
|
-
if (key in b) {
|
37
|
-
if (a[key] !== b[key]) {
|
38
|
-
diff[key] = {
|
39
|
-
changed: 'changed',
|
40
|
-
removed: a[key],
|
41
|
-
added: b[key]
|
42
|
-
}
|
43
|
-
}
|
44
|
-
} else {
|
45
|
-
diff[key] = {
|
46
|
-
changed: 'removed',
|
47
|
-
removed: a[key]
|
48
|
-
}
|
49
|
-
}
|
50
|
-
}
|
51
|
-
|
52
|
-
for (key in b) {
|
53
|
-
if (!(key in a)) {
|
54
|
-
diff[key] = {
|
55
|
-
changed: 'added',
|
56
|
-
added: b[key]
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
60
|
-
|
61
|
-
return diff;
|
62
|
-
}
|
63
|
-
|
64
|
-
console.log(diffObjects({a: 1, b: 2, d: 4}, {a: 1, b: 3, c:3}));
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
function makeSnapshot(styleSheets) {
|
69
|
-
var snapshot = [];
|
70
|
-
for (var i = 0; i < styleSheets.length; i++) {
|
71
|
-
snapshot[i] = CSSOM.clone(styleSheets[i]);
|
72
|
-
}
|
73
|
-
return snapshot;
|
74
|
-
}
|
75
|
-
|
76
|
-
var snapshot = makeSnapshot(document.styleSheets);
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
function diffStyleSheet(a, b) {
|
81
|
-
|
82
|
-
var result = new CSSOM.CSSStyleSheet;
|
83
|
-
|
84
|
-
var rules = a.cssRules;
|
85
|
-
// if (!rules) {
|
86
|
-
// return cloned;
|
87
|
-
// }
|
88
|
-
|
89
|
-
var RULE_TYPES = {
|
90
|
-
1: CSSOM.CSSStyleRule,
|
91
|
-
4: CSSOM.CSSMediaRule
|
92
|
-
//FIXME
|
93
|
-
//3: CSSOM.CSSImportRule,
|
94
|
-
//5: CSSOM.CSSFontFaceRule,
|
95
|
-
//6: CSSOM.CSSPageRule,
|
96
|
-
};
|
97
|
-
|
98
|
-
for (var i=0, rulesLength=rules.length; i < rulesLength; i++) {
|
99
|
-
var rule = rules[i];
|
100
|
-
|
101
|
-
var style = rule.style;
|
102
|
-
if (rules[i]) {
|
103
|
-
|
104
|
-
}
|
105
|
-
}
|
106
|
-
}
|
107
|
-
|
108
|
-
function diffRules(a, b) {
|
109
|
-
var RULE_TYPES = {
|
110
|
-
1: CSSOM.CSSStyleRule,
|
111
|
-
4: CSSOM.CSSMediaRule
|
112
|
-
//FIXME
|
113
|
-
//3: CSSOM.CSSImportRule,
|
114
|
-
//5: CSSOM.CSSFontFaceRule,
|
115
|
-
//6: CSSOM.CSSPageRule,
|
116
|
-
};
|
117
|
-
}
|
118
|
-
|
119
|
-
|
120
|
-
function diff(snapshot, styleSheets) {
|
121
|
-
var result = [];
|
122
|
-
for (var i = 0; i < snapshot.length; i++) {
|
123
|
-
if (snapshot[i]) {
|
124
|
-
|
125
|
-
}
|
126
|
-
}
|
127
|
-
}
|
128
|
-
|
129
|
-
console.log(diff(snapshot, document.styleSheets));
|
130
|
-
</script>
|
131
|
-
</body>
|
132
|
-
</html>
|
@@ -1,282 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<title>CSSOM.js parse method</title>
|
6
|
-
<script>
|
7
|
-
var exports = {};
|
8
|
-
function require(){
|
9
|
-
return exports;
|
10
|
-
}
|
11
|
-
</script>
|
12
|
-
<script src="../lib/CSSStyleDeclaration.js"></script>
|
13
|
-
<script src="../lib/CSSRule.js"></script>
|
14
|
-
<script src="../lib/CSSStyleRule.js"></script>
|
15
|
-
<script src="../lib/CSSImportRule.js"></script>
|
16
|
-
<script src="../lib/MediaList.js"></script>
|
17
|
-
<script src="../lib/CSSMediaRule.js"></script>
|
18
|
-
<script src="../lib/StyleSheet.js"></script>
|
19
|
-
<script src="../lib/CSSStyleSheet.js"></script>
|
20
|
-
<script src="../lib/parse.js"></script>
|
21
|
-
<script>
|
22
|
-
window.CSSOM = exports;
|
23
|
-
</script>
|
24
|
-
<style type="text/css">
|
25
|
-
html, body {
|
26
|
-
background: #333;
|
27
|
-
color: #EEE;
|
28
|
-
font: 12px sans-serif;
|
29
|
-
margin: 0;
|
30
|
-
height: 100%;
|
31
|
-
}
|
32
|
-
body {
|
33
|
-
padding-bottom: 1.7em;
|
34
|
-
-webkit-box-sizing: border-box;
|
35
|
-
-moz-box-sizing: border-box;
|
36
|
-
box-sizing: border-box;
|
37
|
-
}
|
38
|
-
table {
|
39
|
-
width: 100%;
|
40
|
-
table-layout: fixed;
|
41
|
-
margin: 0 auto;
|
42
|
-
}
|
43
|
-
td {
|
44
|
-
vertical-align: top;
|
45
|
-
}
|
46
|
-
h1 {
|
47
|
-
font: normal 1em sans-serif;
|
48
|
-
display: inline;
|
49
|
-
}
|
50
|
-
#labels {
|
51
|
-
color: #FFE992;
|
52
|
-
width: 66%;
|
53
|
-
}
|
54
|
-
#labels td {
|
55
|
-
width: 50%;
|
56
|
-
text-align: center;
|
57
|
-
}
|
58
|
-
#labels td::before {
|
59
|
-
content: '↱ ';
|
60
|
-
color: #998e62;
|
61
|
-
position: relative;
|
62
|
-
top: .4em;
|
63
|
-
}
|
64
|
-
#labels td::after {
|
65
|
-
content: ' ↴';
|
66
|
-
color: #998e62;
|
67
|
-
position: relative;
|
68
|
-
top: .4em;
|
69
|
-
}
|
70
|
-
#content {
|
71
|
-
width: 100%;
|
72
|
-
height: 100%;
|
73
|
-
}
|
74
|
-
#content td {
|
75
|
-
width: 33%;
|
76
|
-
}
|
77
|
-
#content td + td {
|
78
|
-
padding-left: 1%;
|
79
|
-
}
|
80
|
-
#output span {
|
81
|
-
color: #666;
|
82
|
-
}
|
83
|
-
.style-cell textarea {
|
84
|
-
width: 99%;
|
85
|
-
height: 100%;
|
86
|
-
font: 12px monospace;
|
87
|
-
white-space: pre-wrap;
|
88
|
-
}
|
89
|
-
.serialized-cell {
|
90
|
-
border-left: 1px solid #363636;
|
91
|
-
}
|
92
|
-
#message {
|
93
|
-
visibility: hidden;
|
94
|
-
}
|
95
|
-
.error #message {
|
96
|
-
visibility: visible;
|
97
|
-
position: absolute;
|
98
|
-
top: 0;
|
99
|
-
left: 34%;
|
100
|
-
padding: 1em;
|
101
|
-
background: black;
|
102
|
-
color: #e34343;
|
103
|
-
font-size: 24px;
|
104
|
-
}
|
105
|
-
</style>
|
106
|
-
</head>
|
107
|
-
<body>
|
108
|
-
<table id="labels">
|
109
|
-
<tr><td><h1>CSSOM.parse</h1></td><td>.toString</td></tr>
|
110
|
-
</table>
|
111
|
-
<table id="content">
|
112
|
-
<tr>
|
113
|
-
<td class="style-cell">
|
114
|
-
<textarea id="style" spellcheck="false" rows="40">img {
|
115
|
-
border: none
|
116
|
-
}</textarea></td>
|
117
|
-
<td class="output-cell"><pre id="output"></pre></td>
|
118
|
-
<td class="serialized-cell"><pre id="serialized"></pre></td>
|
119
|
-
</tr>
|
120
|
-
</table>
|
121
|
-
<div id="message"></div>
|
122
|
-
<script defer>
|
123
|
-
/**
|
124
|
-
* @param {number} depth
|
125
|
-
* @return {string}
|
126
|
-
*/
|
127
|
-
function makeIndent(depth) {
|
128
|
-
var INDENT = ' ';
|
129
|
-
if (depth == 1) {
|
130
|
-
return INDENT;
|
131
|
-
} else if (depth < 1) {
|
132
|
-
return '';
|
133
|
-
}
|
134
|
-
|
135
|
-
if (depth in makeIndent.cache) {
|
136
|
-
return makeIndent.cache[depth];
|
137
|
-
} else {
|
138
|
-
var result = INDENT;
|
139
|
-
for (var i = depth; --i;) {
|
140
|
-
result += INDENT;
|
141
|
-
}
|
142
|
-
makeIndent.cache[depth] = result;
|
143
|
-
return result;
|
144
|
-
}
|
145
|
-
}
|
146
|
-
makeIndent.cache = {};
|
147
|
-
|
148
|
-
|
149
|
-
/**
|
150
|
-
* buildPath(2) -> '../..'
|
151
|
-
* @param {number} level
|
152
|
-
* @return {string}
|
153
|
-
*/
|
154
|
-
function buildPath(level) {
|
155
|
-
if (level == 0) {
|
156
|
-
return '.';
|
157
|
-
} else {
|
158
|
-
var result = '..';
|
159
|
-
for (var i = 1; i < level; i++) {
|
160
|
-
result += '/..';
|
161
|
-
}
|
162
|
-
return result;
|
163
|
-
}
|
164
|
-
}
|
165
|
-
|
166
|
-
|
167
|
-
/**
|
168
|
-
* stringifyObjectKey('color') -> 'color'
|
169
|
-
* stringifyObjectKey('background-color') -> '"background-color"'
|
170
|
-
* @param {string} key
|
171
|
-
* @return {string}
|
172
|
-
*/
|
173
|
-
function stringifyObjectKey(key) {
|
174
|
-
return /^[a-zA-Z_$][A-Za-z0-9_$]*$/.test(key) ?
|
175
|
-
key :
|
176
|
-
'"' + escapeDoubleQuotes(key) + '"';
|
177
|
-
}
|
178
|
-
|
179
|
-
|
180
|
-
/**
|
181
|
-
* @param {string} string
|
182
|
-
* @return {string}
|
183
|
-
* @see http://stackoverflow.com/questions/7382115/escape-quotes-in-a-string-with-backslash
|
184
|
-
*/
|
185
|
-
function escapeDoubleQuotes(string) {
|
186
|
-
return string.replace(/(\\*)(")/g, function(all, backslashes, quote) {
|
187
|
-
return backslashes.length % 2 ?
|
188
|
-
all :
|
189
|
-
backslashes + '\\' + quote;
|
190
|
-
});
|
191
|
-
}
|
192
|
-
|
193
|
-
|
194
|
-
/**
|
195
|
-
* @param {Object} object
|
196
|
-
* @param {number} [depth]
|
197
|
-
* @param {Array} [stack]
|
198
|
-
* @return {string}
|
199
|
-
*/
|
200
|
-
function inspect(object, depth, stack) {
|
201
|
-
depth ? depth++ : (depth = 1);
|
202
|
-
stack = stack || (stack = []);
|
203
|
-
|
204
|
-
switch (typeof object) {
|
205
|
-
case 'object':
|
206
|
-
var level = stack.indexOf(object);
|
207
|
-
if (level != -1) {
|
208
|
-
return buildPath(level);
|
209
|
-
}
|
210
|
-
stack = [object].concat(stack);
|
211
|
-
|
212
|
-
var properties = [];
|
213
|
-
var indent = makeIndent(depth);
|
214
|
-
for (var key in object) {
|
215
|
-
if (object.hasOwnProperty(key)) {
|
216
|
-
properties.push(indent + stringifyObjectKey(key) + '<span>: </span>' + inspect(object[key], depth, stack));
|
217
|
-
}
|
218
|
-
}
|
219
|
-
var indentInside = makeIndent(depth - 1);
|
220
|
-
return '<span>{</span>\n' + properties.join('<span>,</span>\n') + '\n' + indentInside + '<span>}</span>';
|
221
|
-
|
222
|
-
case 'string':
|
223
|
-
return '"' + object + '"';
|
224
|
-
|
225
|
-
default:
|
226
|
-
return object.toString();
|
227
|
-
}
|
228
|
-
}
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
var errors = [];
|
233
|
-
if (!("__defineGetter__" in {})) {
|
234
|
-
errors.push("Object.prototype.__defineGetter__ isn’t supported");
|
235
|
-
}
|
236
|
-
if (errors.length) {
|
237
|
-
document.getElementById("message").innerHTML = errors.join("<br>");
|
238
|
-
document.body.className = "error";
|
239
|
-
throw errors.join("\n\n");
|
240
|
-
}
|
241
|
-
|
242
|
-
var style = document.getElementById("style");
|
243
|
-
var output = document.getElementById("output");
|
244
|
-
var serialized = document.getElementById("serialized");
|
245
|
-
|
246
|
-
function outputUpdated(){
|
247
|
-
var value = style.value;
|
248
|
-
if (value != style.prevValue) {
|
249
|
-
var css = CSSOM.parse(value);
|
250
|
-
output.innerHTML = inspect(css);
|
251
|
-
serialized.innerHTML = css.toString();
|
252
|
-
style.prevValue = value;
|
253
|
-
}
|
254
|
-
}
|
255
|
-
|
256
|
-
function hashChanged(){
|
257
|
-
var hash = location.hash;
|
258
|
-
var splitted = hash.split("=");
|
259
|
-
if (splitted.length < 2) {
|
260
|
-
return;
|
261
|
-
}
|
262
|
-
var name = splitted[0];
|
263
|
-
var value = splitted[1];
|
264
|
-
if (name == "#css") {
|
265
|
-
style.value = decodeURIComponent(value);
|
266
|
-
outputUpdated();
|
267
|
-
}
|
268
|
-
}
|
269
|
-
|
270
|
-
hashChanged();
|
271
|
-
outputUpdated();
|
272
|
-
|
273
|
-
window.onhashchange = hashChanged;
|
274
|
-
style.onkeyup = style.onpaste = function changed(){
|
275
|
-
outputUpdated();
|
276
|
-
};
|
277
|
-
style.onchange = function updateLocation(){
|
278
|
-
location.hash = "css=" + encodeURIComponent(style.value);
|
279
|
-
};
|
280
|
-
</script>
|
281
|
-
</body>
|
282
|
-
</html>
|