-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcss_whitelist.moon
More file actions
48 lines (39 loc) · 969 Bytes
/
css_whitelist.moon
File metadata and controls
48 lines (39 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import
Number
String
Ident
Hash
Function
Url
from require "web_sanitize.css_types"
Color = Ident + Hash + Function
properties = {
"margin-top": Number + Ident
"margin-right": Number + Ident
"margin-bottom": Number + Ident
"margin-left": Number + Ident
"margin": (Number + Ident)^-4
"padding-top": Number
"padding-right": Number
"padding-bottom": Number
"padding-left": Number
"padding": Number^-4
"font-size": Number + Ident
"text-align": Ident
"color": Color
"background-color": Color
"background": Url + Ident + Hash -- function could be other things here, need to be strict about color function
"background-image": Url + Ident
"opacity": Number
"border": Number * (Ident * Color)^-1
"border-width": Number^-4
"border-color": Color
"border-style": Ident^-4
"width": Number
"height": Number
"max-width": Number
"min-width": Number
"max-height": Number
"min-height": Number
}
{ :properties }