use prism-tomorrow.css

This commit is contained in:
CyC2018
2018-12-19 14:09:39 +08:00
parent 0f00bcacaf
commit e9e604e6a7
1747 changed files with 100462 additions and 0 deletions

View File

@ -0,0 +1,31 @@
@media print
@import "reset.css"
@font-face {
@keyframes {
@media (max-{foo}: bar)
----------------------------------------------------
[
["atrule-declaration", [["atrule", "@media"], " print"]],
["atrule-declaration", [["atrule", "@import"], ["string", "\"reset.css\""]]],
["atrule-declaration", [["atrule", "@font-face"], ["punctuation", "{"]]],
["atrule-declaration", [["atrule", "@keyframes"], ["punctuation", "{"]]],
["atrule-declaration", [
["atrule", "@media"],
["punctuation", "("],
"max-",
["interpolation", [
["delimiter", "{"],
"foo",
["delimiter", "}"]
]],
["punctuation", ":"],
" bar",
["punctuation", ")"]
]]
]
----------------------------------------------------
Checks for at-rules.

View File

@ -0,0 +1,21 @@
a = true
b = false
----------------------------------------------------
[
["variable-declaration", [
["variable", "a"],
["operator", "="],
["boolean", "true"]
]],
["variable-declaration", [
["variable", "b"],
["operator", "="],
["boolean", "false"]
]]
]
----------------------------------------------------
Checks for booleans.

View File

@ -0,0 +1,18 @@
/**/
/* foo
bar */
//
// foobar
----------------------------------------------------
[
["comment", "/**/"],
["comment", "/* foo\r\nbar */"],
["comment", "//"],
["comment", "// foobar"]
]
----------------------------------------------------
Checks for comments.

View File

@ -0,0 +1,51 @@
border-radius(n)
-webkit-border-radius n
-moz-border-radius n
border-radius n
form input[type=button]
border-radius(5px)
color foo()
----------------------------------------------------
[
["func", [
["function", "border-radius"],
["punctuation", "("],
"n",
["punctuation", ")"]
]],
["property-declaration", [
["property", ["-webkit-border-radius"]],
" n"
]],
["property-declaration", [
["property", ["-moz-border-radius"]],
" n"
]],
["property-declaration", [
["property", ["border-radius"]],
" n"
]],
["selector", ["form input[type=button]"]],
["func", [
["function", "border-radius"],
["punctuation", "("],
["number", "5"],
"px",
["punctuation", ")"]
]],
["property-declaration", [
["property", ["color"]],
["func", [
["function", "foo"],
["punctuation", "("],
["punctuation", ")"]
]]
]]
]
----------------------------------------------------
Checks for functions.

View File

@ -0,0 +1,29 @@
color: #fff
color: #FA3
color: #f7c111
color: #9F4ABB
----------------------------------------------------
[
["property-declaration", [
["property", ["color"]], ["punctuation", ":"],
["hexcode", "#fff"]
]],
["property-declaration", [
["property", ["color"]], ["punctuation", ":"],
["hexcode", "#FA3"]
]],
["property-declaration", [
["property", ["color"]], ["punctuation", ":"],
["hexcode", "#f7c111"]
]],
["property-declaration", [
["property", ["color"]], ["punctuation", ":"],
["hexcode", "#9F4ABB"]
]]
]
----------------------------------------------------
Checks for hexadecimal values.

View File

@ -0,0 +1,22 @@
color: red !important
@extend foo !optional
----------------------------------------------------
[
["property-declaration", [
["property", ["color"]],
["punctuation", ":"],
" red ",
["important", "!important"]
]],
["atrule-declaration", [
["atrule", "@extend"],
" foo ",
["important", "!optional"]
]]
]
----------------------------------------------------
Checks for !important and !optional.

View File

@ -0,0 +1,44 @@
for i in 1..5
if a == 3
z-index: 1 unless @z-index;
return pair[1] if pair[0] == key for pair in hash
----------------------------------------------------
[
["statement", [
["keyword", "for"],
" i ",
["operator", "in"],
["number", "1"],
["operator", ".."],
["number", "5"]
]],
["statement", [
["keyword", "if"],
" a ",
["operator", "=="],
["number", "3"]
]],
["property-declaration", [
["property", ["z-index"]],
["punctuation", ":"],
["number", "1"],
["keyword", "unless"],
["keyword", "@z-index"],
["punctuation", ";"]
]],
["statement", [
["keyword", "return"], " pair",
["punctuation", "["], ["number", "1"], ["punctuation", "]"],
["keyword", "if"], " pair",
["punctuation", "["], ["number", "0"], ["punctuation", "]"],
["operator", "=="], " key ",
["keyword", "for"], " pair ",
["operator", "in"], " hash"
]]
]
----------------------------------------------------
Checks for statements and keywords.

View File

@ -0,0 +1,32 @@
z-index 42
foo = 3.14159
width: 23%
bar = 1.5%
----------------------------------------------------
[
["property-declaration", [
["property", ["z-index"]],
["number", "42"]
]],
["variable-declaration", [
["variable", "foo"],
["operator", "="],
["number", "3.14159"]
]],
["property-declaration", [
["property", ["width"]],
["punctuation", ":"],
["number", "23%"]
]],
["variable-declaration", [
["variable", "bar"],
["operator", "="],
["number", "1.5%"]
]]
]
----------------------------------------------------
Checks for numbers and percentages.

View File

@ -0,0 +1,273 @@
a = !b
b = b != a
c = ~b
d = c + b
d += a
e = d - c
e -= b
f = a * b
g = c ** d
g *= f
h = g / f
h /= e
i = h % g
i %= f
j = 1..5
k = 1...5
l = k < j
m = l <= k
n = m > l
o = n >= m
p = o ? n : m
q ?= p
r = q == p
s := r
t = s && r
u = t || s
v = u and t
w = v or u
x = 1 in w
y = true is true
z = true is not false
aa = z isnt y
ab = #fff is a 'rgba'
ac = ab is defined
ad = not ac
----------------------------------------------------
[
["variable-declaration", [
["variable", "a"],
["operator", "="],
["operator", "!"],
"b"
]],
["variable-declaration", [
["variable", "b"],
["operator", "="],
" b ",
["operator", "!="],
" a"
]],
["variable-declaration", [
["variable", "c"],
["operator", "="],
["operator", "~"],
"b"
]],
["variable-declaration", [
["variable", "d"],
["operator", "="],
" c ",
["operator", "+"],
" b"
]],
["variable-declaration", [
["variable", "d"],
["operator", "+="],
" a"
]],
["variable-declaration", [
["variable", "e"],
["operator", "="],
" d ",
["operator", "-"],
" c"
]],
["variable-declaration", [
["variable", "e"],
["operator", "-="],
" b"
]],
["variable-declaration", [
["variable", "f"],
["operator", "="],
" a ",
["operator", "*"],
" b"
]],
["variable-declaration", [
["variable", "g"],
["operator", "="],
" c ",
["operator", "**"],
" d"
]],
["variable-declaration", [
["variable", "g"],
["operator", "*="],
" f"
]],
["variable-declaration", [
["variable", "h"],
["operator", "="],
" g ",
["operator", "/"],
" f"
]],
["variable-declaration", [
["variable", "h"],
["operator", "/="],
" e"
]],
["variable-declaration", [
["variable", "i"],
["operator", "="],
" h ",
["operator", "%"],
" g"
]],
["variable-declaration", [
["variable", "i"],
["operator", "%="],
" f"
]],
["variable-declaration", [
["variable", "j"],
["operator", "="],
["number", "1"],
["operator", ".."],
["number", "5"]
]],
["variable-declaration", [
["variable", "k"],
["operator", "="],
["number", "1"],
["operator", "..."],
["number", "5"]
]],
["variable-declaration", [
["variable", "l"],
["operator", "="],
" k ",
["operator", "<"],
" j"
]],
["variable-declaration", [
["variable", "m"],
["operator", "="],
" l ",
["operator", "<="],
" k"
]],
["variable-declaration", [
["variable", "n"],
["operator", "="],
" m ",
["operator", ">"],
" l"
]],
["variable-declaration", [
["variable", "o"],
["operator", "="],
" n ",
["operator", ">="],
" m"
]],
["variable-declaration", [
["variable", "p"],
["operator", "="],
" o ",
["operator", "?"],
" n ",
["punctuation", ":"],
" m"
]],
["variable-declaration", [
["variable", "q"],
["operator", "?="],
" p"
]],
["variable-declaration", [
["variable", "r"],
["operator", "="],
" q ",
["operator", "=="],
" p"
]],
["variable-declaration", [
["variable", "s"],
["operator", ":="],
" r"
]],
["variable-declaration", [
["variable", "t"],
["operator", "="],
" s ",
["operator", "&&"],
" r"
]],
["variable-declaration", [
["variable", "u"],
["operator", "="],
" t ",
["operator", "||"],
" s"
]],
["variable-declaration", [
["variable", "v"],
["operator", "="],
" u ",
["operator", "and"],
" t"
]],
["variable-declaration", [
["variable", "w"],
["operator", "="],
" v ",
["operator", "or"],
" u"
]],
["variable-declaration", [
["variable", "x"],
["operator", "="],
["number", "1"],
["operator", "in"],
" w"
]],
["variable-declaration", [
["variable", "y"],
["operator", "="],
["boolean", "true"],
["operator", "is"],
["boolean", "true"]
]],
["variable-declaration", [
["variable", "z"],
["operator", "="],
["boolean", "true"],
["operator", "is not"],
["boolean", "false"]
]],
["variable-declaration", [
["variable", "aa"],
["operator", "="],
" z ",
["operator", "isnt"],
" y"
]],
["variable-declaration", [
["variable", "ab"],
["operator", "="],
["hexcode", "#fff"],
["operator", "is a"],
["string", "'rgba'"]
]],
["variable-declaration", [
["variable", "ac"],
["operator", "="],
" ab ",
["operator", "is defined"]
]],
["variable-declaration", [
["variable", "ad"],
["operator", "="],
["operator", "not"],
" ac"
]]
]
----------------------------------------------------
Checks for all operators.

View File

@ -0,0 +1,52 @@
div
width 40px
color: red
background: blue;
div {
background-{foo}: bar;
}
div
{foo} bar
----------------------------------------------------
[
["selector", ["div"]],
["property-declaration", [
["property", ["width"]], ["number", "40"], "px"
]],
["property-declaration", [
["property", ["color"]], ["punctuation", ":"], " red"
]],
["property-declaration", [
["property", ["background"]], ["punctuation", ":"], " blue", ["punctuation", ";"]
]],
["selector", ["div ", ["punctuation", "{"]]],
["property-declaration", [
["property", [
"background-",
["interpolation", [
["delimiter", "{"], "foo", ["delimiter", "}"]
]]
]],
["punctuation", ":"],
" bar",
["punctuation", ";"]
]],
["punctuation", "}"],
["selector", ["div"]],
["property-declaration", [
["property", [
["interpolation", [
["delimiter", "{"], "foo", ["delimiter", "}"]
]]
]],
" bar"
]]
]
----------------------------------------------------
Checks for property declarations.

View File

@ -0,0 +1,49 @@
div
span[foo=bar]
color red
div input,
input:nth-child(2n)
color red
#foo
.bar::before
color red
#foo
.bar {
color red
}
{foo} {bar}:hover
color red
----------------------------------------------------
[
["selector", ["div\r\nspan[foo=bar]"]],
["property-declaration", [["property", ["color"]], " red"]],
["selector", ["div input", ["punctuation", ","], "\r\ninput:nth-child(2n)"]],
["property-declaration", [["property", ["color"]], " red"]],
["selector", ["#foo"]],
["selector", [".bar::before"]],
["property-declaration", [["property", ["color"]], " red"]],
["selector", ["#foo"]],
["selector", [".bar ", ["punctuation", "{"]]],
["property-declaration", [["property", ["color"]], " red"]],
["punctuation", "}"],
["selector", [
["interpolation", [
["delimiter", "{"], "foo", ["delimiter", "}"]
]],
["interpolation", [
["delimiter", "{"], "bar", ["delimiter", "}"]
]],
":hover"
]],
["property-declaration", [["property", ["color"]], " red"]]
]
----------------------------------------------------
Checks for selectors.

View File

@ -0,0 +1,33 @@
content: ""
content: "foo"
content: ''
content: 'foo'
----------------------------------------------------
[
["property-declaration", [
["property", ["content"]],
["punctuation", ":"],
["string", "\"\""]
]],
["property-declaration", [
["property", ["content"]],
["punctuation", ":"],
["string", "\"foo\""]
]],
["property-declaration", [
["property", ["content"]],
["punctuation", ":"],
["string", "''"]
]],
["property-declaration", [
["property", ["content"]],
["punctuation", ":"],
["string", "'foo'"]
]]
]
----------------------------------------------------
Checks for strings.

View File

@ -0,0 +1,21 @@
background: url('foo.png')
background: url("foo/bar.jpg")
----------------------------------------------------
[
["property-declaration", [
["property", ["background"]],
["punctuation", ":"],
["url", "url('foo.png')"]
]],
["property-declaration", [
["property", ["background"]],
["punctuation", ":"],
["url", "url(\"foo/bar.jpg\")"]
]]
]
----------------------------------------------------
Checks for urls.

View File

@ -0,0 +1,33 @@
foo = 'bar'
a = 4
bar-baz = 5
a += 8
----------------------------------------------------
[
["variable-declaration", [
["variable", "foo"],
["operator", "="],
["string", "'bar'"]
]],
["variable-declaration", [
["variable", "a"],
["operator", "="],
["number", "4"]
]],
["variable-declaration", [
["variable", "bar-baz"],
["operator", "="],
["number", "5"]
]],
["variable-declaration", [
["variable", "a"],
["operator", "+="],
["number", "8"]
]]
]
----------------------------------------------------
Checks for variable declarations.