Debian Codegraph @

tests/languages/stylus/property-declaration_feature.test

raw
1 div
2 width 40px
3 color: red
4 background: blue;
5 animation-name test1, animation4
6
7 div {
8 background-{foo}: bar;
9 }
10
11 div
12 {foo} bar
13
14 comment
15 content 'http://www.example.com' // comment
16 background url(http://example.com) /* comment */
17 background /* comment */ url("http://example.com")
18 content '/* this is string not comment */'
19
20 ----------------------------------------------------
21
22 [
23 ["selector", ["div"]],
24 ["property-declaration", [
25 ["property", ["width"]], ["number", "40"], ["unit", "px"]
26 ]],
27 ["property-declaration", [
28 ["property", ["color"]], ["punctuation", ":"], ["color", "red"]
29 ]],
30 ["property-declaration", [
31 ["property", ["background"]], ["punctuation", ":"], ["color", "blue"], ["punctuation", ";"]
32 ]],
33 ["property-declaration", [
34 ["property", ["animation-name"]], " test1", ["punctuation", ","], " animation4"]],
35 ["selector", ["div ", ["punctuation", "{"]]],
36 ["property-declaration", [
37 ["property", [
38 "background-",
39 ["interpolation", [
40 ["delimiter", "{"], "foo", ["delimiter", "}"]
41 ]]
42 ]],
43 ["punctuation", ":"],
44 " bar",
45 ["punctuation", ";"]
46 ]],
47 ["punctuation", "}"],
48 ["selector", ["div"]],
49 ["property-declaration", [
50 ["property", [
51 ["interpolation", [
52 ["delimiter", "{"], "foo", ["delimiter", "}"]
53 ]]
54 ]],
55 " bar"
56 ]],
57
58 ["selector", ["comment"]],
59 ["property-declaration", [
60 ["property", ["content"]],
61 ["string", "'http://www.example.com'"],
62 ["comment", "// comment"]
63 ]],
64 ["property-declaration", [
65 ["property", ["background"]],
66 ["url", "url(http://example.com)"],
67 ["comment", "/* comment */"]
68 ]],
69 ["property-declaration", [
70 ["property", ["background"]],
71 ["comment", "/* comment */"],
72 ["url", "url(\"http://example.com\")"]
73 ]],
74 ["property-declaration", [
75 ["property", ["content"]],
76 ["string", "'/* this is string not comment */'"]
77 ]]
78 ]
79
80 ----------------------------------------------------
81
82 Checks for property declarations.