[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var emmet = (exports.emmet = {
|
---|
| 4 | // Visual Formatting;
|
---|
| 5 | pos: 'position',
|
---|
| 6 | t: 'top',
|
---|
| 7 | r: 'right',
|
---|
| 8 | b: 'bottom',
|
---|
| 9 | l: 'left',
|
---|
| 10 | z: 'z-index',
|
---|
| 11 | fl: 'float',
|
---|
| 12 | cl: 'clear',
|
---|
| 13 | d: 'display',
|
---|
| 14 | v: 'visibility',
|
---|
| 15 | ov: 'overflow',
|
---|
| 16 | ovx: 'overflow-x',
|
---|
| 17 | ovy: 'overflow-y',
|
---|
| 18 | ovs: 'overflow-style',
|
---|
| 19 | zm: 'zoom',
|
---|
| 20 | cp: 'clip',
|
---|
| 21 | rsz: 'resize',
|
---|
| 22 | cur: 'cursor',
|
---|
| 23 | // Margin & Padding;
|
---|
| 24 | m: 'margin',
|
---|
| 25 | mt: 'margin-top',
|
---|
| 26 | mr: 'margin-right',
|
---|
| 27 | mb: 'margin-bottom',
|
---|
| 28 | ml: 'margin-left',
|
---|
| 29 | p: 'padding',
|
---|
| 30 | pt: 'padding-top',
|
---|
| 31 | pr: 'padding-right',
|
---|
| 32 | pb: 'padding-bottom',
|
---|
| 33 | pl: 'padding-left',
|
---|
| 34 | // Box Sizing;
|
---|
| 35 | bxz: 'box-sizing',
|
---|
| 36 | bxsh: 'box-shadow',
|
---|
| 37 | w: 'width',
|
---|
| 38 | h: 'height',
|
---|
| 39 | maw: 'max-width',
|
---|
| 40 | mah: 'max-height',
|
---|
| 41 | miw: 'min-width',
|
---|
| 42 | mih: 'min-height',
|
---|
| 43 | // Font;
|
---|
| 44 | f: 'font',
|
---|
| 45 | fw: 'font-weight',
|
---|
| 46 | fs: 'font-style',
|
---|
| 47 | fv: 'font-variant',
|
---|
| 48 | fz: 'font-size',
|
---|
| 49 | ff: 'font-family',
|
---|
| 50 | fsm: 'font-smooth',
|
---|
| 51 | fst: 'font-stretch',
|
---|
| 52 | // Text;
|
---|
| 53 | va: 'vertical-align',
|
---|
| 54 | ta: 'text-align',
|
---|
| 55 | td: 'text-decoration',
|
---|
| 56 | te: 'text-emphasis',
|
---|
| 57 | ti: 'text-indent',
|
---|
| 58 | tj: 'text-justify',
|
---|
| 59 | tt: 'text-transform',
|
---|
| 60 | tsh: 'text-shadow',
|
---|
| 61 | lh: 'line-height',
|
---|
| 62 | lts: 'letter-spacing',
|
---|
| 63 | whs: 'white-space',
|
---|
| 64 | wob: 'word-break',
|
---|
| 65 | wos: 'word-spacing',
|
---|
| 66 | wow: 'word-wrap',
|
---|
| 67 | // Background;
|
---|
| 68 | bg: 'background',
|
---|
| 69 | bgc: 'background-color',
|
---|
| 70 | bgi: 'background-image',
|
---|
| 71 | bgr: 'background-repeat',
|
---|
| 72 | bga: 'background-attachment',
|
---|
| 73 | bgp: 'background-position',
|
---|
| 74 | bgpx: 'background-position-x',
|
---|
| 75 | bgpy: 'background-position-y',
|
---|
| 76 | bgcp: 'background-clip',
|
---|
| 77 | bgo: 'background-origin',
|
---|
| 78 | bgsz: 'background-size',
|
---|
| 79 | // Color;
|
---|
| 80 | c: 'color',
|
---|
| 81 | op: 'opacity',
|
---|
| 82 | // Generated Content;
|
---|
| 83 | ct: 'content',
|
---|
| 84 | q: 'quotes',
|
---|
| 85 | coi: 'counter-increment',
|
---|
| 86 | cor: 'counter-reset',
|
---|
| 87 | // Outline;
|
---|
| 88 | ol: 'outline',
|
---|
| 89 | olo: 'outline-offset',
|
---|
| 90 | olw: 'outline-width',
|
---|
| 91 | ols: 'outline-style',
|
---|
| 92 | olc: 'outline-color',
|
---|
| 93 | // Tables;
|
---|
| 94 | tbl: 'table-layout',
|
---|
| 95 | cps: 'caption-side',
|
---|
| 96 | ec: 'empty-cells',
|
---|
| 97 | // Border;
|
---|
| 98 | bd: 'border',
|
---|
| 99 | bdcl: 'border-collapse',
|
---|
| 100 | bdc: 'border-color',
|
---|
| 101 | bdi: 'border-image',
|
---|
| 102 | bds: 'border-style',
|
---|
| 103 | bdw: 'border-width',
|
---|
| 104 | bdt: 'border-top',
|
---|
| 105 | bdtw: 'border-top-width',
|
---|
| 106 | bdts: 'border-top-style',
|
---|
| 107 | bdtc: 'border-top-color',
|
---|
| 108 | bdr: 'border-right',
|
---|
| 109 | bdrw: 'border-right-width',
|
---|
| 110 | bdrst: 'border-right-style',
|
---|
| 111 | bdrc: 'border-right-color',
|
---|
| 112 | bdb: 'border-bottom',
|
---|
| 113 | bdbw: 'border-bottom-width',
|
---|
| 114 | bdbs: 'border-bottom-style',
|
---|
| 115 | bdbc: 'border-bottom-color',
|
---|
| 116 | bdl: 'border-left',
|
---|
| 117 | bdlw: 'border-left-width',
|
---|
| 118 | bdls: 'border-left-style',
|
---|
| 119 | bdlc: 'border-left-color',
|
---|
| 120 | bdrs: 'border-radius',
|
---|
| 121 | bdtlrs: 'border-top-left-radius',
|
---|
| 122 | bdtrrs: 'border-top-right-radius',
|
---|
| 123 | bdbrrs: 'border-bottom-right-radius',
|
---|
| 124 | bdblrs: 'border-bottom-left-radius',
|
---|
| 125 | // Lists;
|
---|
| 126 | lis: 'list-style',
|
---|
| 127 | lisp: 'list-style-position',
|
---|
| 128 | list: 'list-style-type',
|
---|
| 129 | lisi: 'list-style-image',
|
---|
| 130 | // Flexbox Parent/Child Properties;
|
---|
| 131 | ac: 'align-content',
|
---|
| 132 | ai: 'align-items',
|
---|
| 133 | as: 'align-self',
|
---|
| 134 | jc: 'justify-content',
|
---|
| 135 | fx: 'flex',
|
---|
| 136 | fxb: 'flex-basis',
|
---|
| 137 | fxd: 'flex-direction',
|
---|
| 138 | fxf: 'flex-flow',
|
---|
| 139 | fxg: 'flex-grow',
|
---|
| 140 | fxs: 'flex-shrink',
|
---|
| 141 | fxw: 'flex-wrap',
|
---|
| 142 | ord: 'order',
|
---|
| 143 | // CSS Grid Layout;
|
---|
| 144 | colm: 'columns',
|
---|
| 145 | colmc: 'column-count',
|
---|
| 146 | colmf: 'column-fill',
|
---|
| 147 | colmg: 'column-gap',
|
---|
| 148 | colmr: 'column-rule',
|
---|
| 149 | colmrc: 'column-rule-color',
|
---|
| 150 | colmrs: 'column-rule-style',
|
---|
| 151 | colmrw: 'column-rule-width',
|
---|
| 152 | colms: 'column-span',
|
---|
| 153 | colmw: 'column-width',
|
---|
| 154 | // CSS Transitions;
|
---|
| 155 | trf: 'transform',
|
---|
| 156 | trfo: 'transform-origin',
|
---|
| 157 | trfs: 'transform-style',
|
---|
| 158 | trs: 'transition',
|
---|
| 159 | trsde: 'transition-delay',
|
---|
| 160 | trsdu: 'transition-duration',
|
---|
| 161 | trsp: 'transition-property',
|
---|
| 162 | trstf: 'transition-timing-function',
|
---|
| 163 | // Others;
|
---|
| 164 | bfv: 'backface-visibility',
|
---|
| 165 | tov: 'text-overflow',
|
---|
| 166 | mar: 'max-resolution',
|
---|
| 167 | mir: 'min-resolution',
|
---|
| 168 | ori: 'orientation',
|
---|
| 169 | us: 'user-select',
|
---|
| 170 | });
|
---|
| 171 |
|
---|
| 172 | exports.addon = function(renderer) {
|
---|
| 173 | var originalDecl = renderer.decl;
|
---|
| 174 | renderer.decl = function(key, value) {
|
---|
| 175 | return originalDecl(emmet[key] || key, value);
|
---|
| 176 | };
|
---|
| 177 | };
|
---|