node-css-parse-1.7.0+dfsg.orig/ 0000775 0000000 0000000 00000000000 12255746762 014740 5 ustar root root node-css-parse-1.7.0+dfsg.orig/test/ 0000775 0000000 0000000 00000000000 12255746762 015717 5 ustar root root node-css-parse-1.7.0+dfsg.orig/test/css-parse.js 0000664 0000000 0000000 00000001250 12255746762 020153 0 ustar root root /** * Module dependencies. */ var parse = require('..') , fs = require('fs') , path = require('path') , read = fs.readFileSync , readdir = fs.readdirSync; describe('parse(str)', function(){ readdir('test/cases').forEach(function(file){ if (~file.indexOf('json')) return; file = path.basename(file, '.css'); it('should parse ' + file, function(){ var css = read(path.join('test', 'cases', file + '.css'), 'utf8'); var json = read(path.join('test', 'cases', file + '.json'), 'utf8'); var ret = parse(css, { position: true, source: file + '.css' }); ret = JSON.stringify(ret, null, 2); ret.should.equal(json); }) }); }) node-css-parse-1.7.0+dfsg.orig/test/cases/ 0000775 0000000 0000000 00000000000 12255746762 017015 5 ustar root root node-css-parse-1.7.0+dfsg.orig/test/cases/wtf.json 0000664 0000000 0000000 00000003104 12255746762 020506 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "rule", "selectors": [ ".wtf" ], "declarations": [ { "type": "declaration", "property": "*overflow-x", "value": "hidden", "position": { "start": { "line": 2, "column": 3 }, "end": { "line": 2, "column": 22 }, "source": "wtf.css" } }, { "type": "declaration", "property": "//max-height", "value": "110px", "position": { "start": { "line": 3, "column": 3 }, "end": { "line": 3, "column": 22 }, "source": "wtf.css" } }, { "type": "declaration", "property": "#height", "value": "18px", "position": { "start": { "line": 4, "column": 3 }, "end": { "line": 4, "column": 16 }, "source": "wtf.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 5, "column": 2 }, "source": "wtf.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/wtf.css 0000664 0000000 0000000 00000000107 12255746762 020325 0 ustar root root .wtf { *overflow-x: hidden; //max-height: 110px; #height: 18px; } node-css-parse-1.7.0+dfsg.orig/test/cases/supports.json 0000664 0000000 0000000 00000005015 12255746762 021610 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "supports", "supports": "(display: flex) or (display: box)", "rules": [ { "type": "comment", "comment": " flex above ", "position": { "start": { "line": 2, "column": 3 }, "end": { "line": 2, "column": 19 }, "source": "supports.css" } }, { "type": "rule", "selectors": [ ".flex" ], "declarations": [ { "type": "comment", "comment": " flex inside ", "position": { "start": { "line": 4, "column": 5 }, "end": { "line": 4, "column": 22 }, "source": "supports.css" } }, { "type": "declaration", "property": "display", "value": "box", "position": { "start": { "line": 5, "column": 5 }, "end": { "line": 5, "column": 17 }, "source": "supports.css" } }, { "type": "declaration", "property": "display", "value": "flex", "position": { "start": { "line": 6, "column": 5 }, "end": { "line": 6, "column": 18 }, "source": "supports.css" } } ], "position": { "start": { "line": 3, "column": 3 }, "end": { "line": 7, "column": 4 }, "source": "supports.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 8, "column": 2 }, "source": "supports.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/supports.css 0000664 0000000 0000000 00000000213 12255746762 021422 0 ustar root root @supports (display: flex) or (display: box) { /* flex above */ .flex { /* flex inside */ display: box; display: flex; } } node-css-parse-1.7.0+dfsg.orig/test/cases/rules.json 0000664 0000000 0000000 00000003025 12255746762 021042 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "rule", "selectors": [ "tobi" ], "declarations": [ { "type": "declaration", "property": "name", "value": "'tobi'", "position": { "start": { "line": 2, "column": 3 }, "end": { "line": 2, "column": 15 }, "source": "rules.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 3, "column": 2 }, "source": "rules.css" } }, { "type": "rule", "selectors": [ "loki" ], "declarations": [ { "type": "declaration", "property": "name", "value": "'loki'", "position": { "start": { "line": 5, "column": 3 }, "end": { "line": 5, "column": 15 }, "source": "rules.css" } } ], "position": { "start": { "line": 4, "column": 1 }, "end": { "line": 6, "column": 2 }, "source": "rules.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/rules.css 0000664 0000000 0000000 00000000061 12255746762 020656 0 ustar root root tobi { name: 'tobi'; } loki { name: 'loki'; } node-css-parse-1.7.0+dfsg.orig/test/cases/rule.json 0000664 0000000 0000000 00000001450 12255746762 020657 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "rule", "selectors": [ "foo" ], "declarations": [ { "type": "declaration", "property": "bar", "value": "'baz'", "position": { "start": { "line": 2, "column": 3 }, "end": { "line": 2, "column": 13 }, "source": "rule.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 3, "column": 2 }, "source": "rule.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/rule.css 0000664 0000000 0000000 00000000025 12255746762 020473 0 ustar root root foo { bar: 'baz'; } node-css-parse-1.7.0+dfsg.orig/test/cases/quoted.json 0000664 0000000 0000000 00000001527 12255746762 021216 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "rule", "selectors": [ "body" ], "declarations": [ { "type": "declaration", "property": "background", "value": "url('some;stuff;here') 50% 50% no-repeat", "position": { "start": { "line": 2, "column": 3 }, "end": { "line": 2, "column": 55 }, "source": "quoted.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 3, "column": 2 }, "source": "quoted.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/quoted.css 0000664 0000000 0000000 00000000100 12255746762 021017 0 ustar root root body { background: url('some;stuff;here') 50% 50% no-repeat; } node-css-parse-1.7.0+dfsg.orig/test/cases/props.json 0000664 0000000 0000000 00000003134 12255746762 021054 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "rule", "selectors": [ "tobi loki jane" ], "declarations": [ { "type": "declaration", "property": "are", "value": "'all'", "position": { "start": { "line": 3, "column": 3 }, "end": { "line": 3, "column": 13 }, "source": "props.css" } }, { "type": "declaration", "property": "the-species", "value": "called \"ferrets\"", "position": { "start": { "line": 4, "column": 3 }, "end": { "line": 4, "column": 32 }, "source": "props.css" } }, { "type": "declaration", "property": "*even", "value": "'ie crap'", "position": { "start": { "line": 5, "column": 3 }, "end": { "line": 5, "column": 19 }, "source": "props.css" } } ], "position": { "start": { "line": 2, "column": 1 }, "end": { "line": 6, "column": 2 }, "source": "props.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/props.css 0000664 0000000 0000000 00000000127 12255746762 020672 0 ustar root root tobi loki jane { are: 'all'; the-species: called "ferrets"; *even: 'ie crap'; } node-css-parse-1.7.0+dfsg.orig/test/cases/paged-media.json 0000664 0000000 0000000 00000004325 12255746762 022051 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "comment", "comment": " toc above ", "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 16 }, "source": "paged-media.css" } }, { "type": "page", "selectors": [ "toc", "index:blank" ], "declarations": [ { "type": "comment", "comment": " toc inside ", "position": { "start": { "line": 3, "column": 3 }, "end": { "line": 3, "column": 19 }, "source": "paged-media.css" } }, { "type": "declaration", "property": "color", "value": "green", "position": { "start": { "line": 4, "column": 3 }, "end": { "line": 4, "column": 15 }, "source": "paged-media.css" } } ], "position": { "start": { "line": 2, "column": 1 }, "end": { "line": 5, "column": 2 }, "source": "paged-media.css" } }, { "type": "page", "selectors": [], "declarations": [ { "type": "declaration", "property": "font-size", "value": "16pt", "position": { "start": { "line": 8, "column": 3 }, "end": { "line": 8, "column": 18 }, "source": "paged-media.css" } } ], "position": { "start": { "line": 7, "column": 1 }, "end": { "line": 9, "column": 2 }, "source": "paged-media.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/paged-media.css 0000664 0000000 0000000 00000000154 12255746762 021664 0 ustar root root /* toc above */ @page toc, index:blank { /* toc inside */ color: green; } @page { font-size: 16pt; } node-css-parse-1.7.0+dfsg.orig/test/cases/no-semi.json 0000664 0000000 0000000 00000002325 12255746762 021261 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "rule", "selectors": [ "tobi loki jane" ], "declarations": [ { "type": "declaration", "property": "are", "value": "'all'", "position": { "start": { "line": 3, "column": 3 }, "end": { "line": 3, "column": 13 }, "source": "no-semi.css" } }, { "type": "declaration", "property": "the-species", "value": "called \"ferrets\"", "position": { "start": { "line": 4, "column": 3 }, "end": { "line": 5, "column": 1 }, "source": "no-semi.css" } } ], "position": { "start": { "line": 2, "column": 1 }, "end": { "line": 5, "column": 2 }, "source": "no-semi.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/no-semi.css 0000664 0000000 0000000 00000000102 12255746762 021067 0 ustar root root tobi loki jane { are: 'all'; the-species: called "ferrets" } node-css-parse-1.7.0+dfsg.orig/test/cases/namespace.json 0000664 0000000 0000000 00000001337 12255746762 021650 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "namespace", "namespace": "\"http://www.w3.org/1999/xhtml\"", "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 43 }, "source": "namespace.css" } }, { "type": "namespace", "namespace": "svg \"http://www.w3.org/2000/svg\"", "position": { "start": { "line": 2, "column": 1 }, "end": { "line": 2, "column": 45 }, "source": "namespace.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/namespace.css 0000664 0000000 0000000 00000000127 12255746762 021463 0 ustar root root @namespace "http://www.w3.org/1999/xhtml"; @namespace svg "http://www.w3.org/2000/svg"; node-css-parse-1.7.0+dfsg.orig/test/cases/messed-up.json 0000664 0000000 0000000 00000006037 12255746762 021620 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "rule", "selectors": [ "body" ], "declarations": [ { "type": "declaration", "property": "foo", "value": "'bar'", "position": { "start": { "line": 1, "column": 8 }, "end": { "line": 3, "column": 9 }, "source": "messed-up.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 3, "column": 10 }, "source": "messed-up.css" } }, { "type": "rule", "selectors": [ "body" ], "declarations": [ { "type": "declaration", "property": "foo", "value": "bar", "position": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 16 }, "source": "messed-up.css" } }, { "type": "declaration", "property": "bar", "value": "baz", "position": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 24 }, "source": "messed-up.css" } } ], "position": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 25 }, "source": "messed-up.css" } }, { "type": "rule", "selectors": [ "body" ], "declarations": [ { "type": "declaration", "property": "foo", "value": "bar", "position": { "start": { "line": 8, "column": 6 }, "end": { "line": 11, "column": 6 }, "source": "messed-up.css" } }, { "type": "declaration", "property": "bar", "value": "baz", "position": { "start": { "line": 12, "column": 6 }, "end": { "line": 15, "column": 6 }, "source": "messed-up.css" } } ], "position": { "start": { "line": 6, "column": 4 }, "end": { "line": 15, "column": 7 }, "source": "messed-up.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/messed-up.css 0000664 0000000 0000000 00000000177 12255746762 021436 0 ustar root root body { foo : 'bar' } body{foo:bar;bar:baz} body { foo : bar ; bar : baz } node-css-parse-1.7.0+dfsg.orig/test/cases/media.messed.json 0000664 0000000 0000000 00000014135 12255746762 022252 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "media", "media": "screen, projection", "rules": [ { "type": "rule", "selectors": [ "html" ], "declarations": [ { "type": "declaration", "property": "background", "value": "#fffef0", "position": { "start": { "line": 4, "column": 1 }, "end": { "line": 4, "column": 20 }, "source": "media.messed.css" } }, { "type": "declaration", "property": "color", "value": "#300", "position": { "start": { "line": 5, "column": 5 }, "end": { "line": 5, "column": 15 }, "source": "media.messed.css" } } ], "position": { "start": { "line": 1, "column": 28 }, "end": { "line": 6, "column": 4 }, "source": "media.messed.css" } }, { "type": "rule", "selectors": [ "body" ], "declarations": [ { "type": "declaration", "property": "max-width", "value": "35em", "position": { "start": { "line": 10, "column": 5 }, "end": { "line": 10, "column": 20 }, "source": "media.messed.css" } }, { "type": "declaration", "property": "margin", "value": "0 auto", "position": { "start": { "line": 11, "column": 5 }, "end": { "line": 11, "column": 19 }, "source": "media.messed.css" } } ], "position": { "start": { "line": 7, "column": 3 }, "end": { "line": 14, "column": 2 }, "source": "media.messed.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 15, "column": 4 }, "source": "media.messed.css" } }, { "type": "media", "media": "print", "rules": [ { "type": "rule", "selectors": [ "html" ], "declarations": [ { "type": "declaration", "property": "background", "value": "#fff", "position": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 31 }, "source": "media.messed.css" } }, { "type": "declaration", "property": "color", "value": "#000", "position": { "start": { "line": 21, "column": 15 }, "end": { "line": 21, "column": 26 }, "source": "media.messed.css" } } ], "position": { "start": { "line": 19, "column": 15 }, "end": { "line": 22, "column": 16 }, "source": "media.messed.css" } }, { "type": "rule", "selectors": [ "body" ], "declarations": [ { "type": "declaration", "property": "padding", "value": "1in", "position": { "start": { "line": 24, "column": 15 }, "end": { "line": 24, "column": 27 }, "source": "media.messed.css" } }, { "type": "declaration", "property": "border", "value": "0.5pt solid #666", "position": { "start": { "line": 25, "column": 15 }, "end": { "line": 25, "column": 39 }, "source": "media.messed.css" } } ], "position": { "start": { "line": 23, "column": 15 }, "end": { "line": 26, "column": 16 }, "source": "media.messed.css" } } ], "position": { "start": { "line": 17, "column": 1 }, "end": { "line": 27, "column": 2 }, "source": "media.messed.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/media.messed.css 0000664 0000000 0000000 00000000545 12255746762 022071 0 ustar root root @media screen, projection{ html { background: #fffef0; color:#300; } body { max-width: 35em; margin: 0 auto; } } @media print { html { background: #fff; color: #000; } body { padding: 1in; border: 0.5pt solid #666; } } node-css-parse-1.7.0+dfsg.orig/test/cases/media.json 0000664 0000000 0000000 00000017037 12255746762 020777 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "media", "media": "screen, projection", "rules": [ { "type": "comment", "comment": " html above ", "position": { "start": { "line": 2, "column": 3 }, "end": { "line": 2, "column": 19 }, "source": "media.css" } }, { "type": "rule", "selectors": [ "html" ], "declarations": [ { "type": "comment", "comment": " html inside ", "position": { "start": { "line": 4, "column": 5 }, "end": { "line": 4, "column": 22 }, "source": "media.css" } }, { "type": "declaration", "property": "background", "value": "#fffef0", "position": { "start": { "line": 5, "column": 5 }, "end": { "line": 5, "column": 24 }, "source": "media.css" } }, { "type": "declaration", "property": "color", "value": "#300", "position": { "start": { "line": 6, "column": 5 }, "end": { "line": 6, "column": 16 }, "source": "media.css" } } ], "position": { "start": { "line": 3, "column": 3 }, "end": { "line": 7, "column": 4 }, "source": "media.css" } }, { "type": "comment", "comment": " body above ", "position": { "start": { "line": 9, "column": 3 }, "end": { "line": 9, "column": 19 }, "source": "media.css" } }, { "type": "rule", "selectors": [ "body" ], "declarations": [ { "type": "comment", "comment": " body inside ", "position": { "start": { "line": 11, "column": 5 }, "end": { "line": 11, "column": 22 }, "source": "media.css" } }, { "type": "declaration", "property": "max-width", "value": "35em", "position": { "start": { "line": 12, "column": 5 }, "end": { "line": 12, "column": 20 }, "source": "media.css" } }, { "type": "declaration", "property": "margin", "value": "0 auto", "position": { "start": { "line": 13, "column": 5 }, "end": { "line": 13, "column": 19 }, "source": "media.css" } } ], "position": { "start": { "line": 10, "column": 3 }, "end": { "line": 14, "column": 4 }, "source": "media.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 15, "column": 2 }, "source": "media.css" } }, { "type": "media", "media": "print", "rules": [ { "type": "rule", "selectors": [ "html" ], "declarations": [ { "type": "declaration", "property": "background", "value": "#fff", "position": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 21 }, "source": "media.css" } }, { "type": "declaration", "property": "color", "value": "#000", "position": { "start": { "line": 20, "column": 5 }, "end": { "line": 20, "column": 16 }, "source": "media.css" } } ], "position": { "start": { "line": 18, "column": 3 }, "end": { "line": 21, "column": 4 }, "source": "media.css" } }, { "type": "rule", "selectors": [ "body" ], "declarations": [ { "type": "declaration", "property": "padding", "value": "1in", "position": { "start": { "line": 23, "column": 5 }, "end": { "line": 23, "column": 17 }, "source": "media.css" } }, { "type": "declaration", "property": "border", "value": "0.5pt solid #666", "position": { "start": { "line": 24, "column": 5 }, "end": { "line": 24, "column": 29 }, "source": "media.css" } } ], "position": { "start": { "line": 22, "column": 3 }, "end": { "line": 25, "column": 4 }, "source": "media.css" } } ], "position": { "start": { "line": 17, "column": 1 }, "end": { "line": 26, "column": 2 }, "source": "media.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/media.css 0000664 0000000 0000000 00000000540 12255746762 020605 0 ustar root root @media screen, projection { /* html above */ html { /* html inside */ background: #fffef0; color: #300; } /* body above */ body { /* body inside */ max-width: 35em; margin: 0 auto; } } @media print { html { background: #fff; color: #000; } body { padding: 1in; border: 0.5pt solid #666; } } node-css-parse-1.7.0+dfsg.orig/test/cases/keyframes.vendor.json 0000664 0000000 0000000 00000004310 12255746762 023170 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "keyframes", "name": "fade", "vendor": "-webkit-", "keyframes": [ { "type": "keyframe", "values": [ "from" ], "declarations": [ { "type": "declaration", "property": "opacity", "value": "0", "position": { "start": { "line": 2, "column": 10 }, "end": { "line": 2, "column": 21 }, "source": "keyframes.vendor.css" } } ], "position": { "start": { "line": 2, "column": 3 }, "end": { "line": 2, "column": 22 }, "source": "keyframes.vendor.css" } }, { "type": "keyframe", "values": [ "to" ], "declarations": [ { "type": "declaration", "property": "opacity", "value": "1", "position": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 19 }, "source": "keyframes.vendor.css" } } ], "position": { "start": { "line": 3, "column": 3 }, "end": { "line": 3, "column": 20 }, "source": "keyframes.vendor.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 4, "column": 2 }, "source": "keyframes.vendor.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/keyframes.vendor.css 0000664 0000000 0000000 00000000105 12255746762 023005 0 ustar root root @-webkit-keyframes fade { from { opacity: 0 } to { opacity: 1 } } node-css-parse-1.7.0+dfsg.orig/test/cases/keyframes.messed.json 0000664 0000000 0000000 00000004252 12255746762 023160 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "keyframes", "name": "fade", "keyframes": [ { "type": "keyframe", "values": [ "from" ], "declarations": [ { "type": "declaration", "property": "opacity", "value": "0", "position": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 14 }, "source": "keyframes.messed.css" } } ], "position": { "start": { "line": 1, "column": 18 }, "end": { "line": 3, "column": 7 }, "source": "keyframes.messed.css" } }, { "type": "keyframe", "values": [ "to" ], "declarations": [ { "type": "declaration", "property": "opacity", "value": "1", "position": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 16 }, "source": "keyframes.messed.css" } } ], "position": { "start": { "line": 4, "column": 1 }, "end": { "line": 6, "column": 18 }, "source": "keyframes.messed.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 6, "column": 19 }, "source": "keyframes.messed.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/keyframes.messed.css 0000664 0000000 0000000 00000000105 12255746762 022770 0 ustar root root @keyframes fade {from {opacity: 0; } to { opacity: 1;}} node-css-parse-1.7.0+dfsg.orig/test/cases/keyframes.json 0000664 0000000 0000000 00000007300 12255746762 021676 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "keyframes", "name": "fade", "keyframes": [ { "type": "comment", "comment": " from above ", "position": { "start": { "line": 2, "column": 3 }, "end": { "line": 2, "column": 19 }, "source": "keyframes.css" } }, { "type": "keyframe", "values": [ "from" ], "declarations": [ { "type": "comment", "comment": " from inside ", "position": { "start": { "line": 4, "column": 5 }, "end": { "line": 4, "column": 22 }, "source": "keyframes.css" } }, { "type": "declaration", "property": "opacity", "value": "0", "position": { "start": { "line": 5, "column": 5 }, "end": { "line": 5, "column": 15 }, "source": "keyframes.css" } } ], "position": { "start": { "line": 3, "column": 3 }, "end": { "line": 6, "column": 4 }, "source": "keyframes.css" } }, { "type": "comment", "comment": " to above ", "position": { "start": { "line": 8, "column": 3 }, "end": { "line": 8, "column": 17 }, "source": "keyframes.css" } }, { "type": "keyframe", "values": [ "to" ], "declarations": [ { "type": "comment", "comment": " to inside ", "position": { "start": { "line": 10, "column": 5 }, "end": { "line": 10, "column": 20 }, "source": "keyframes.css" } }, { "type": "declaration", "property": "opacity", "value": "1", "position": { "start": { "line": 11, "column": 5 }, "end": { "line": 11, "column": 15 }, "source": "keyframes.css" } } ], "position": { "start": { "line": 9, "column": 3 }, "end": { "line": 12, "column": 4 }, "source": "keyframes.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 13, "column": 2 }, "source": "keyframes.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/keyframes.css 0000664 0000000 0000000 00000000232 12255746762 021512 0 ustar root root @keyframes fade { /* from above */ from { /* from inside */ opacity: 0; } /* to above */ to { /* to inside */ opacity: 1; } } node-css-parse-1.7.0+dfsg.orig/test/cases/keyframes.complex.json 0000664 0000000 0000000 00000011622 12255746762 023346 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "keyframes", "name": "foo", "keyframes": [ { "type": "keyframe", "values": [ "0%" ], "declarations": [ { "type": "declaration", "property": "top", "value": "0", "position": { "start": { "line": 2, "column": 8 }, "end": { "line": 2, "column": 14 }, "source": "keyframes.complex.css" } }, { "type": "declaration", "property": "left", "value": "0", "position": { "start": { "line": 2, "column": 16 }, "end": { "line": 2, "column": 24 }, "source": "keyframes.complex.css" } } ], "position": { "start": { "line": 2, "column": 3 }, "end": { "line": 2, "column": 25 }, "source": "keyframes.complex.css" } }, { "type": "keyframe", "values": [ "30.50%" ], "declarations": [ { "type": "declaration", "property": "top", "value": "50px", "position": { "start": { "line": 3, "column": 12 }, "end": { "line": 3, "column": 22 }, "source": "keyframes.complex.css" } } ], "position": { "start": { "line": 3, "column": 3 }, "end": { "line": 3, "column": 23 }, "source": "keyframes.complex.css" } }, { "type": "keyframe", "values": [ ".68%", "72%", "85%" ], "declarations": [ { "type": "declaration", "property": "left", "value": "50px", "position": { "start": { "line": 6, "column": 15 }, "end": { "line": 6, "column": 26 }, "source": "keyframes.complex.css" } } ], "position": { "start": { "line": 4, "column": 3 }, "end": { "line": 6, "column": 27 }, "source": "keyframes.complex.css" } }, { "type": "keyframe", "values": [ "100%" ], "declarations": [ { "type": "declaration", "property": "top", "value": "100px", "position": { "start": { "line": 7, "column": 10 }, "end": { "line": 7, "column": 20 }, "source": "keyframes.complex.css" } }, { "type": "declaration", "property": "left", "value": "100%", "position": { "start": { "line": 7, "column": 22 }, "end": { "line": 7, "column": 33 }, "source": "keyframes.complex.css" } } ], "position": { "start": { "line": 7, "column": 3 }, "end": { "line": 7, "column": 34 }, "source": "keyframes.complex.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 8, "column": 2 }, "source": "keyframes.complex.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/keyframes.complex.css 0000664 0000000 0000000 00000000216 12255746762 023162 0 ustar root root @keyframes foo { 0% { top: 0; left: 0 } 30.50% { top: 50px } .68% , 72% , 85% { left: 50px } 100% { top: 100px; left: 100% } } node-css-parse-1.7.0+dfsg.orig/test/cases/keyframes.advanced.json 0000664 0000000 0000000 00000006121 12255746762 023442 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "keyframes", "name": "advanced", "keyframes": [ { "type": "keyframe", "values": [ "top" ], "declarations": [ { "type": "declaration", "property": "opacity[sqrt]", "value": "0", "position": { "start": { "line": 3, "column": 5 }, "end": { "line": 3, "column": 21 }, "source": "keyframes.advanced.css" } } ], "position": { "start": { "line": 2, "column": 3 }, "end": { "line": 4, "column": 4 }, "source": "keyframes.advanced.css" } }, { "type": "keyframe", "values": [ "100" ], "declarations": [ { "type": "declaration", "property": "opacity", "value": "0.5", "position": { "start": { "line": 7, "column": 5 }, "end": { "line": 7, "column": 17 }, "source": "keyframes.advanced.css" } } ], "position": { "start": { "line": 6, "column": 3 }, "end": { "line": 8, "column": 4 }, "source": "keyframes.advanced.css" } }, { "type": "keyframe", "values": [ "bottom" ], "declarations": [ { "type": "declaration", "property": "opacity", "value": "1", "position": { "start": { "line": 11, "column": 5 }, "end": { "line": 11, "column": 15 }, "source": "keyframes.advanced.css" } } ], "position": { "start": { "line": 10, "column": 3 }, "end": { "line": 12, "column": 4 }, "source": "keyframes.advanced.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 13, "column": 2 }, "source": "keyframes.advanced.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/keyframes.advanced.css 0000664 0000000 0000000 00000000171 12255746762 023260 0 ustar root root @keyframes advanced { top { opacity[sqrt]: 0; } 100 { opacity: 0.5; } bottom { opacity: 1; } } node-css-parse-1.7.0+dfsg.orig/test/cases/invalid.json 0000664 0000000 0000000 00000000101 12255746762 021326 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [] } } node-css-parse-1.7.0+dfsg.orig/test/cases/invalid.css 0000664 0000000 0000000 00000000026 12255746762 021153 0 ustar root root { asdfasdfasdfasd node-css-parse-1.7.0+dfsg.orig/test/cases/import.messed.json 0000664 0000000 0000000 00000003271 12255746762 022504 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "import", "import": "url(\"fineprint.css\") print", "position": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 39 }, "source": "import.messed.css" } }, { "type": "import", "import": "url(\"bluish.css\") projection, tv", "position": { "start": { "line": 3, "column": 3 }, "end": { "line": 3, "column": 44 }, "source": "import.messed.css" } }, { "type": "import", "import": "'custom.css'", "position": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 28 }, "source": "import.messed.css" } }, { "type": "import", "import": "\"common.css\" screen, projection", "position": { "start": { "line": 5, "column": 3 }, "end": { "line": 5, "column": 45 }, "source": "import.messed.css" } }, { "type": "import", "import": "url('landscape.css') screen and (orientation:landscape)", "position": { "start": { "line": 7, "column": 3 }, "end": { "line": 7, "column": 67 }, "source": "import.messed.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/import.messed.css 0000664 0000000 0000000 00000000341 12255746762 022316 0 ustar root root @import url("fineprint.css") print; @import url("bluish.css") projection, tv; @import 'custom.css'; @import "common.css" screen, projection ; @import url('landscape.css') screen and (orientation:landscape); node-css-parse-1.7.0+dfsg.orig/test/cases/import.json 0000664 0000000 0000000 00000003226 12255746762 021225 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "import", "import": "url(\"fineprint.css\") print", "position": { "start": { "line": 2, "column": 1 }, "end": { "line": 2, "column": 36 }, "source": "import.css" } }, { "type": "import", "import": "url(\"bluish.css\") projection, tv", "position": { "start": { "line": 3, "column": 1 }, "end": { "line": 3, "column": 42 }, "source": "import.css" } }, { "type": "import", "import": "'custom.css'", "position": { "start": { "line": 4, "column": 1 }, "end": { "line": 4, "column": 22 }, "source": "import.css" } }, { "type": "import", "import": "\"common.css\" screen, projection", "position": { "start": { "line": 5, "column": 1 }, "end": { "line": 5, "column": 41 }, "source": "import.css" } }, { "type": "import", "import": "url('landscape.css') screen and (orientation:landscape)", "position": { "start": { "line": 6, "column": 1 }, "end": { "line": 6, "column": 65 }, "source": "import.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/import.css 0000664 0000000 0000000 00000000317 12255746762 021042 0 ustar root root @import url("fineprint.css") print; @import url("bluish.css") projection, tv; @import 'custom.css'; @import "common.css" screen, projection; @import url('landscape.css') screen and (orientation:landscape); node-css-parse-1.7.0+dfsg.orig/test/cases/host.json 0000664 0000000 0000000 00000002340 12255746762 020664 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "host", "rules": [ { "type": "rule", "selectors": [ ":scope" ], "declarations": [ { "type": "declaration", "property": "display", "value": "block", "position": { "start": { "line": 3, "column": 5 }, "end": { "line": 3, "column": 19 }, "source": "host.css" } } ], "position": { "start": { "line": 2, "column": 3 }, "end": { "line": 4, "column": 4 }, "source": "host.css" } } ], "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 5, "column": 2 }, "source": "host.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/host.css 0000664 0000000 0000000 00000000054 12255746762 020503 0 ustar root root @host { :scope { display: block; } } node-css-parse-1.7.0+dfsg.orig/test/cases/escapes.json 0000664 0000000 0000000 00000102500 12255746762 021331 0 ustar root root { "type": "stylesheet", "stylesheet": { "rules": [ { "type": "comment", "comment": " tests compressed for easy testing ", "position": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 40 }, "source": "escapes.css" } }, { "type": "comment", "comment": " http://mathiasbynens.be/notes/css-escapes ", "position": { "start": { "line": 2, "column": 1 }, "end": { "line": 2, "column": 48 }, "source": "escapes.css" } }, { "type": "comment", "comment": " will match elements with class=\":`(\" ", "position": { "start": { "line": 3, "column": 1 }, "end": { "line": 3, "column": 43 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ ".\\3A \\`\\(" ], "declarations": [], "position": { "start": { "line": 4, "column": 1 }, "end": { "line": 4, "column": 12 }, "source": "escapes.css" } }, { "type": "comment", "comment": " will match elements with class=\"1a2b3c\" ", "position": { "start": { "line": 5, "column": 1 }, "end": { "line": 5, "column": 46 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ ".\\31 a2b3c" ], "declarations": [], "position": { "start": { "line": 6, "column": 1 }, "end": { "line": 6, "column": 13 }, "source": "escapes.css" } }, { "type": "comment", "comment": " will match the element with id=\"#fake-id\" ", "position": { "start": { "line": 7, "column": 1 }, "end": { "line": 7, "column": 48 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\#fake-id" ], "declarations": [], "position": { "start": { "line": 8, "column": 1 }, "end": { "line": 8, "column": 13 }, "source": "escapes.css" } }, { "type": "comment", "comment": " will match the element with id=\"---\" ", "position": { "start": { "line": 9, "column": 1 }, "end": { "line": 9, "column": 43 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\---" ], "declarations": [], "position": { "start": { "line": 10, "column": 1 }, "end": { "line": 10, "column": 8 }, "source": "escapes.css" } }, { "type": "comment", "comment": " will match the element with id=\"-a-b-c-\" ", "position": { "start": { "line": 11, "column": 1 }, "end": { "line": 11, "column": 47 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#-a-b-c-" ], "declarations": [], "position": { "start": { "line": 12, "column": 1 }, "end": { "line": 12, "column": 11 }, "source": "escapes.css" } }, { "type": "comment", "comment": " will match the element with id=\"©\" ", "position": { "start": { "line": 13, "column": 1 }, "end": { "line": 13, "column": 41 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#©" ], "declarations": [], "position": { "start": { "line": 14, "column": 1 }, "end": { "line": 14, "column": 5 }, "source": "escapes.css" } }, { "type": "comment", "comment": " More tests from http://mathiasbynens.be/demo/html5-id ", "position": { "start": { "line": 15, "column": 1 }, "end": { "line": 15, "column": 60 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "html" ], "declarations": [ { "type": "declaration", "property": "font", "value": "1.2em/1.6 Arial", "position": { "start": { "line": 16, "column": 6 }, "end": { "line": 16, "column": 26 }, "source": "escapes.css" } } ], "position": { "start": { "line": 16, "column": 1 }, "end": { "line": 16, "column": 28 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "code" ], "declarations": [ { "type": "declaration", "property": "font-family", "value": "Consolas", "position": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 26 }, "source": "escapes.css" } } ], "position": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 28 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "li code" ], "declarations": [ { "type": "declaration", "property": "background", "value": "rgba(255, 255, 255, .5)", "position": { "start": { "line": 18, "column": 9 }, "end": { "line": 18, "column": 43 }, "source": "escapes.css" } }, { "type": "declaration", "property": "padding", "value": ".3em", "position": { "start": { "line": 18, "column": 44 }, "end": { "line": 18, "column": 56 }, "source": "escapes.css" } } ], "position": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 58 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "li" ], "declarations": [ { "type": "declaration", "property": "background", "value": "orange", "position": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 21 }, "source": "escapes.css" } } ], "position": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 23 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#♥" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 19 }, "source": "escapes.css" } } ], "position": { "start": { "line": 20, "column": 1 }, "end": { "line": 20, "column": 21 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#©" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 19 }, "source": "escapes.css" } } ], "position": { "start": { "line": 21, "column": 1 }, "end": { "line": 21, "column": 21 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#“‘’”" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 22, "column": 7 }, "end": { "line": 22, "column": 22 }, "source": "escapes.css" } } ], "position": { "start": { "line": 22, "column": 1 }, "end": { "line": 22, "column": 24 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#☺☃" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 23, "column": 5 }, "end": { "line": 23, "column": 20 }, "source": "escapes.css" } } ], "position": { "start": { "line": 23, "column": 1 }, "end": { "line": 23, "column": 22 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#⌘⌥" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 24, "column": 5 }, "end": { "line": 24, "column": 20 }, "source": "escapes.css" } } ], "position": { "start": { "line": 24, "column": 1 }, "end": { "line": 24, "column": 22 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#𝄞♪♩♫♬" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 25, "column": 9 }, "end": { "line": 25, "column": 24 }, "source": "escapes.css" } } ], "position": { "start": { "line": 25, "column": 1 }, "end": { "line": 25, "column": 26 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\?" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 26, "column": 5 }, "end": { "line": 26, "column": 20 }, "source": "escapes.css" } } ], "position": { "start": { "line": 26, "column": 1 }, "end": { "line": 26, "column": 22 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\@" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 27, "column": 5 }, "end": { "line": 27, "column": 20 }, "source": "escapes.css" } } ], "position": { "start": { "line": 27, "column": 1 }, "end": { "line": 27, "column": 22 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\." ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 28, "column": 5 }, "end": { "line": 28, "column": 20 }, "source": "escapes.css" } } ], "position": { "start": { "line": 28, "column": 1 }, "end": { "line": 28, "column": 22 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\3A \\)" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 29, "column": 9 }, "end": { "line": 29, "column": 24 }, "source": "escapes.css" } } ], "position": { "start": { "line": 29, "column": 1 }, "end": { "line": 29, "column": 26 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\3A \\`\\(" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 30, "column": 11 }, "end": { "line": 30, "column": 26 }, "source": "escapes.css" } } ], "position": { "start": { "line": 30, "column": 1 }, "end": { "line": 30, "column": 28 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\31 23" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 31, "column": 9 }, "end": { "line": 31, "column": 24 }, "source": "escapes.css" } } ], "position": { "start": { "line": 31, "column": 1 }, "end": { "line": 31, "column": 26 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\31 a2b3c" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 32, "column": 12 }, "end": { "line": 32, "column": 27 }, "source": "escapes.css" } } ], "position": { "start": { "line": 32, "column": 1 }, "end": { "line": 32, "column": 29 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\
" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 33, "column": 8 }, "end": { "line": 33, "column": 23 }, "source": "escapes.css" } } ], "position": { "start": { "line": 33, "column": 1 }, "end": { "line": 33, "column": 25 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\<\\>\\<\\<\\<\\>\\>\\<\\>" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 34, "column": 21 }, "end": { "line": 34, "column": 36 }, "source": "escapes.css" } } ], "position": { "start": { "line": 34, "column": 1 }, "end": { "line": 34, "column": 38 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<\\-\\]\\>\\+\\+\\.\\>\\+\\.\\+\\+\\+\\+\\+\\+\\+\\.\\.\\+\\+\\+\\.\\>\\+\\+\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\.\\>\\.\\+\\+\\+\\.\\-\\-\\-\\-\\-\\-\\.\\-\\-\\-\\-\\-\\-\\-\\-\\.\\>\\+\\.\\>\\." ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 35, "column": 225 }, "end": { "line": 35, "column": 240 }, "source": "escapes.css" } } ], "position": { "start": { "line": 35, "column": 1 }, "end": { "line": 35, "column": 242 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\#" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 36, "column": 5 }, "end": { "line": 36, "column": 20 }, "source": "escapes.css" } } ], "position": { "start": { "line": 36, "column": 1 }, "end": { "line": 36, "column": 22 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\#\\#" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 37, "column": 7 }, "end": { "line": 37, "column": 22 }, "source": "escapes.css" } } ], "position": { "start": { "line": 37, "column": 1 }, "end": { "line": 37, "column": 24 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\#\\.\\#\\.\\#" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 38, "column": 13 }, "end": { "line": 38, "column": 28 }, "source": "escapes.css" } } ], "position": { "start": { "line": 38, "column": 1 }, "end": { "line": 38, "column": 30 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\_" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 39, "column": 5 }, "end": { "line": 39, "column": 20 }, "source": "escapes.css" } } ], "position": { "start": { "line": 39, "column": 1 }, "end": { "line": 39, "column": 22 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\.fake\\-class" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 40, "column": 16 }, "end": { "line": 40, "column": 31 }, "source": "escapes.css" } } ], "position": { "start": { "line": 40, "column": 1 }, "end": { "line": 40, "column": 33 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#foo\\.bar" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 41, "column": 11 }, "end": { "line": 41, "column": 26 }, "source": "escapes.css" } } ], "position": { "start": { "line": 41, "column": 1 }, "end": { "line": 41, "column": 28 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\3A hover" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 42, "column": 12 }, "end": { "line": 42, "column": 27 }, "source": "escapes.css" } } ], "position": { "start": { "line": 42, "column": 1 }, "end": { "line": 42, "column": 29 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\3A hover\\3A focus\\3A active" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 43, "column": 31 }, "end": { "line": 43, "column": 46 }, "source": "escapes.css" } } ], "position": { "start": { "line": 43, "column": 1 }, "end": { "line": 43, "column": 48 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#\\[attr\\=value\\]" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 44, "column": 18 }, "end": { "line": 44, "column": 33 }, "source": "escapes.css" } } ], "position": { "start": { "line": 44, "column": 1 }, "end": { "line": 44, "column": 35 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#f\\/o\\/o" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 45, "column": 10 }, "end": { "line": 45, "column": 25 }, "source": "escapes.css" } } ], "position": { "start": { "line": 45, "column": 1 }, "end": { "line": 45, "column": 27 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#f\\\\o\\\\o" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 46, "column": 10 }, "end": { "line": 46, "column": 25 }, "source": "escapes.css" } } ], "position": { "start": { "line": 46, "column": 1 }, "end": { "line": 46, "column": 27 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#f\\*o\\*o" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 47, "column": 10 }, "end": { "line": 47, "column": 25 }, "source": "escapes.css" } } ], "position": { "start": { "line": 47, "column": 1 }, "end": { "line": 47, "column": 27 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#f\\!o\\!o" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 48, "column": 10 }, "end": { "line": 48, "column": 25 }, "source": "escapes.css" } } ], "position": { "start": { "line": 48, "column": 1 }, "end": { "line": 48, "column": 27 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#f\\'o\\'o" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 49, "column": 10 }, "end": { "line": 49, "column": 25 }, "source": "escapes.css" } } ], "position": { "start": { "line": 49, "column": 1 }, "end": { "line": 49, "column": 27 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#f\\~o\\~o" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 50, "column": 10 }, "end": { "line": 50, "column": 25 }, "source": "escapes.css" } } ], "position": { "start": { "line": 50, "column": 1 }, "end": { "line": 50, "column": 27 }, "source": "escapes.css" } }, { "type": "rule", "selectors": [ "#f\\+o\\+o" ], "declarations": [ { "type": "declaration", "property": "background", "value": "lime", "position": { "start": { "line": 51, "column": 10 }, "end": { "line": 51, "column": 25 }, "source": "escapes.css" } } ], "position": { "start": { "line": 51, "column": 1 }, "end": { "line": 51, "column": 27 }, "source": "escapes.css" } }, { "type": "comment", "comment": " css-parse does not yet pass this test ", "position": { "start": { "line": 53, "column": 1 }, "end": { "line": 53, "column": 44 }, "source": "escapes.css" } }, { "type": "comment", "comment": "#\\{\\}{background:lime;}", "position": { "start": { "line": 54, "column": 1 }, "end": { "line": 54, "column": 28 }, "source": "escapes.css" } } ] } } node-css-parse-1.7.0+dfsg.orig/test/cases/escapes.css 0000664 0000000 0000000 00000003403 12255746762 021152 0 ustar root root /* tests compressed for easy testing */ /* http://mathiasbynens.be/notes/css-escapes */ /* will match elements with class=":`(" */ .\3A \`\({} /* will match elements with class="1a2b3c" */ .\31 a2b3c{} /* will match the element with id="#fake-id" */ #\#fake-id{} /* will match the element with id="---" */ #\---{} /* will match the element with id="-a-b-c-" */ #-a-b-c-{} /* will match the element with id="©" */ #©{} /* More tests from http://mathiasbynens.be/demo/html5-id */ html{font:1.2em/1.6 Arial;} code{font-family:Consolas;} li code{background:rgba(255, 255, 255, .5);padding:.3em;} li{background:orange;} #♥{background:lime;} #©{background:lime;} #“‘’”{background:lime;} #☺☃{background:lime;} #⌘⌥{background:lime;} #𝄞♪♩♫♬{background:lime;} #\?{background:lime;} #\@{background:lime;} #\.{background:lime;} #\3A \){background:lime;} #\3A \`\({background:lime;} #\31 23{background:lime;} #\31 a2b3c{background:lime;} #\
{background:lime;}
#\<\>\<\<\<\>\>\<\>{background:lime;}
#\+\+\+\+\+\+\+\+\+\+\[\>\+\+\+\+\+\+\+\>\+\+\+\+\+\+\+\+\+\+\>\+\+\+\>\+\<\<\<\<\-\]\>\+\+\.\>\+\.\+\+\+\+\+\+\+\.\.\+\+\+\.\>\+\+\.\<\<\+\+\+\+\+\+\+\+\+\+\+\+\+\+\+\.\>\.\+\+\+\.\-\-\-\-\-\-\.\-\-\-\-\-\-\-\-\.\>\+\.\>\.{background:lime;}
#\#{background:lime;}
#\#\#{background:lime;}
#\#\.\#\.\#{background:lime;}
#\_{background:lime;}
#\.fake\-class{background:lime;}
#foo\.bar{background:lime;}
#\3A hover{background:lime;}
#\3A hover\3A focus\3A active{background:lime;}
#\[attr\=value\]{background:lime;}
#f\/o\/o{background:lime;}
#f\\o\\o{background:lime;}
#f\*o\*o{background:lime;}
#f\!o\!o{background:lime;}
#f\'o\'o{background:lime;}
#f\~o\~o{background:lime;}
#f\+o\+o{background:lime;}
/* css-parse does not yet pass this test */
/*#\{\}{background:lime;}*/
node-css-parse-1.7.0+dfsg.orig/test/cases/empty.json 0000664 0000000 0000000 00000000101 12255746762 021036 0 ustar root root {
"type": "stylesheet",
"stylesheet": {
"rules": []
}
} node-css-parse-1.7.0+dfsg.orig/test/cases/empty.css 0000664 0000000 0000000 00000000000 12255746762 020653 0 ustar root root node-css-parse-1.7.0+dfsg.orig/test/cases/document.json 0000664 0000000 0000000 00000004130 12255746762 021524 0 ustar root root {
"type": "stylesheet",
"stylesheet": {
"rules": [
{
"type": "document",
"document": "url-prefix()",
"vendor": "-moz-",
"rules": [
{
"type": "comment",
"comment": " ui above ",
"position": {
"start": {
"line": 2,
"column": 3
},
"end": {
"line": 2,
"column": 17
},
"source": "document.css"
}
},
{
"type": "rule",
"selectors": [
".ui-select .ui-btn select"
],
"declarations": [
{
"type": "comment",
"comment": " ui inside ",
"position": {
"start": {
"line": 4,
"column": 5
},
"end": {
"line": 4,
"column": 20
},
"source": "document.css"
}
},
{
"type": "declaration",
"property": "opacity",
"value": ".0001",
"position": {
"start": {
"line": 5,
"column": 5
},
"end": {
"line": 6,
"column": 3
},
"source": "document.css"
}
}
],
"position": {
"start": {
"line": 3,
"column": 3
},
"end": {
"line": 6,
"column": 4
},
"source": "document.css"
}
}
],
"position": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 7,
"column": 2
},
"source": "document.css"
}
}
]
}
} node-css-parse-1.7.0+dfsg.orig/test/cases/document.css 0000664 0000000 0000000 00000000171 12255746762 021344 0 ustar root root @-moz-document url-prefix() {
/* ui above */
.ui-select .ui-btn select {
/* ui inside */
opacity:.0001
}
}
node-css-parse-1.7.0+dfsg.orig/test/cases/comment.url.json 0000664 0000000 0000000 00000005000 12255746762 022146 0 ustar root root {
"type": "stylesheet",
"stylesheet": {
"rules": [
{
"type": "comment",
"comment": " http://foo.com/bar/baz.html ",
"position": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 34
},
"source": "comment.url.css"
}
},
{
"type": "comment",
"comment": "",
"position": {
"start": {
"line": 2,
"column": 1
},
"end": {
"line": 2,
"column": 5
},
"source": "comment.url.css"
}
},
{
"type": "rule",
"selectors": [
"foo"
],
"declarations": [
{
"type": "comment",
"comment": "/",
"position": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 12
},
"source": "comment.url.css"
}
},
{
"type": "comment",
"comment": " something ",
"position": {
"start": {
"line": 5,
"column": 3
},
"end": {
"line": 5,
"column": 18
},
"source": "comment.url.css"
}
},
{
"type": "declaration",
"property": "bar",
"value": "baz",
"position": {
"start": {
"line": 6,
"column": 3
},
"end": {
"line": 6,
"column": 11
},
"source": "comment.url.css"
}
},
{
"type": "comment",
"comment": " http://foo.com/bar/baz.html ",
"position": {
"start": {
"line": 6,
"column": 13
},
"end": {
"line": 6,
"column": 46
},
"source": "comment.url.css"
}
}
],
"position": {
"start": {
"line": 4,
"column": 1
},
"end": {
"line": 7,
"column": 2
},
"source": "comment.url.css"
}
}
]
}
}node-css-parse-1.7.0+dfsg.orig/test/cases/comment.url.css 0000664 0000000 0000000 00000000166 12255746762 021775 0 ustar root root /* http://foo.com/bar/baz.html */
/**/
foo { /*/*/
/* something */
bar: baz; /* http://foo.com/bar/baz.html */
}
node-css-parse-1.7.0+dfsg.orig/test/cases/comment.json 0000664 0000000 0000000 00000006070 12255746762 021355 0 ustar root root {
"type": "stylesheet",
"stylesheet": {
"rules": [
{
"type": "comment",
"comment": " 1 ",
"position": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 8
},
"source": "comment.css"
}
},
{
"type": "rule",
"selectors": [
"body"
],
"declarations": [
{
"type": "comment",
"comment": " 2 ",
"position": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 15
},
"source": "comment.css"
}
},
{
"type": "comment",
"comment": " 3 ",
"position": {
"start": {
"line": 4,
"column": 3
},
"end": {
"line": 4,
"column": 10
},
"source": "comment.css"
}
},
{
"type": "comment",
"comment": "",
"position": {
"start": {
"line": 5,
"column": 3
},
"end": {
"line": 5,
"column": 7
},
"source": "comment.css"
}
},
{
"type": "declaration",
"property": "foo",
"value": "'bar'",
"position": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 17
},
"source": "comment.css"
}
},
{
"type": "comment",
"comment": " 4 ",
"position": {
"start": {
"line": 6,
"column": 3
},
"end": {
"line": 6,
"column": 10
},
"source": "comment.css"
}
}
],
"position": {
"start": {
"line": 3,
"column": 1
},
"end": {
"line": 7,
"column": 2
},
"source": "comment.css"
}
},
{
"type": "comment",
"comment": " 5 ",
"position": {
"start": {
"line": 7,
"column": 3
},
"end": {
"line": 7,
"column": 10
},
"source": "comment.css"
}
},
{
"type": "comment",
"comment": " 6 ",
"position": {
"start": {
"line": 9,
"column": 1
},
"end": {
"line": 9,
"column": 8
},
"source": "comment.css"
}
}
]
}
} node-css-parse-1.7.0+dfsg.orig/test/cases/comment.css 0000664 0000000 0000000 00000000122 12255746762 021164 0 ustar root root /* 1 */
body { /* 2 */
/* 3 */
/**/foo: 'bar';
/* 4 */
} /* 5 */
/* 6 */
node-css-parse-1.7.0+dfsg.orig/test/cases/colon-space.json 0000664 0000000 0000000 00000002302 12255746762 022110 0 ustar root root {
"type": "stylesheet",
"stylesheet": {
"rules": [
{
"type": "rule",
"selectors": [
"a"
],
"declarations": [
{
"type": "declaration",
"property": "margin",
"value": "auto",
"position": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 19
},
"source": "colon-space.css"
}
},
{
"type": "declaration",
"property": "padding",
"value": "0",
"position": {
"start": {
"line": 3,
"column": 5
},
"end": {
"line": 3,
"column": 16
},
"source": "colon-space.css"
}
}
],
"position": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 4,
"column": 2
},
"source": "colon-space.css"
}
}
]
}
} node-css-parse-1.7.0+dfsg.orig/test/cases/colon-space.css 0000664 0000000 0000000 00000000052 12255746762 021727 0 ustar root root a {
margin : auto;
padding : 0;
} node-css-parse-1.7.0+dfsg.orig/test/cases/charset.json 0000664 0000000 0000000 00000002610 12255746762 021340 0 ustar root root {
"type": "stylesheet",
"stylesheet": {
"rules": [
{
"type": "charset",
"charset": "\"UTF-8\"",
"position": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 18
},
"source": "charset.css"
}
},
{
"type": "comment",
"comment": " Set the encoding of the style sheet to Unicode UTF-8",
"position": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 82
},
"source": "charset.css"
}
},
{
"type": "charset",
"charset": "'iso-8859-15'",
"position": {
"start": {
"line": 2,
"column": 1
},
"end": {
"line": 2,
"column": 24
},
"source": "charset.css"
}
},
{
"type": "comment",
"comment": " Set the encoding of the style sheet to Latin-9 (Western European languages, with euro sign) ",
"position": {
"start": {
"line": 2,
"column": 25
},
"end": {
"line": 2,
"column": 122
},
"source": "charset.css"
}
}
]
}
} node-css-parse-1.7.0+dfsg.orig/test/cases/charset.css 0000664 0000000 0000000 00000000314 12255746762 021156 0 ustar root root @charset "UTF-8"; /* Set the encoding of the style sheet to Unicode UTF-8*/
@charset 'iso-8859-15'; /* Set the encoding of the style sheet to Latin-9 (Western European languages, with euro sign) */
node-css-parse-1.7.0+dfsg.orig/package.json 0000664 0000000 0000000 00000001010 12255746762 017216 0 ustar root root {
"name": "css-parse",
"version": "1.7.0",
"description": "CSS parser",
"keywords": [
"css",
"parser",
"stylesheet"
],
"author": "TJ Holowaychuk