-
Notifications
You must be signed in to change notification settings - Fork 0
/
emmet.js
122 lines (109 loc) · 2.3 KB
/
emmet.js
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// Loosely translated from: https://docs.emmet.io/cheat-sheet/
const emmet = {
pos: 'position',
t: 'top',
r: 'right',
b: 'bottom',
l: 'left',
z: 'z-index',
fl: 'float',
cl: 'clear',
d: 'display',
v: 'visibility',
ov: 'overflow',
ovx: 'overflow-x',
ovy: 'overflow-y',
zm: 'zoom',
cp: 'clip',
rsz: 'resize',
cur: 'cursor',
m: 'margin',
mt: 'margin-top',
mr: 'margin-right',
mb: 'margin-bottom',
ml: 'margin-left',
p: 'padding',
pt: 'padding-top',
pr: 'padding-right',
pb: 'padding-bottom',
pl: 'padding-left',
bxz: 'box-sizing',
bxsh: 'box-shadow',
w: 'width',
h: 'height',
maw: 'max-width',
mah: 'max-height',
miw: 'min-width',
mih: 'min-height',
f: 'font',
fw: 'font-weight',
fs: 'font-style',
fv: 'font-variant',
fz: 'font-size',
ff: 'font-family',
va: 'vertical-align',
ta: 'text-align',
td: 'text-decoration',
ti: 'text-indent',
tt: 'text-transform',
tsh: 'text-shadow',
lh: 'line-height',
lts: 'letter-spacing',
whs: 'white-space',
wob: 'word-break',
wow: 'word-wrap',
bg: 'background',
bgc: 'background-color',
bgi: 'background-image',
bgr: 'background-repeat',
bgo: 'background-origin',
bgsz: 'background-size',
c: 'color',
o: 'opacity',
ol: 'outline',
br: 'border-radius',
bd: 'border',
bdr: 'border-right',
bdb: 'border-bottom',
bdl: 'border-left',
bdt: 'border-top',
bdc: 'border-color',
fx: 'flex',
fxb: 'flex-basis',
fxd: 'flex-direction',
fxf: 'flex-flow',
fxg: 'flex-grow',
fxsh: 'flex-shrink',
fxw: 'flex-wrap',
jc: 'justify-content',
ji: 'justify-items',
js: 'justify-selv',
ac: 'align-content',
ai: 'align-items',
as: 'align-self',
pc: 'place-content',
pi: 'place-items',
ps: 'place-self',
mar: 'max-resolution',
mir: 'min-resolution',
trs: 'transition',
g: 'grid',
gt: 'grid-template',
gtr: 'grid-template-rows',
gtc: 'grid-template-columns',
gta: 'grid-template-areas',
ga: 'grid-area',
gg: 'grid-gap',
gcg: 'grid-column-gap',
grg: 'grid-row-gap',
gac: 'grid-auto-columns',
gar: 'grid-auto-rows',
gaf: 'grid-auto-flow',
gc: 'grid-column',
gcs: 'grid-column-start',
gce: 'grid-column-end',
gr: 'grid-row',
grs: 'grid-row-start',
gre: 'grid-row-end'
}
module.exports = (p, v) => emmet[p] != null ? [[emmet[p], v]] : null