Last change
on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
569 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var resolveName = require('css-tree').property;
|
---|
| 2 | var handlers = {
|
---|
| 3 | 'font': require('./property/font'),
|
---|
| 4 | 'font-weight': require('./property/font-weight'),
|
---|
| 5 | 'background': require('./property/background'),
|
---|
| 6 | 'border': require('./property/border'),
|
---|
| 7 | 'outline': require('./property/border')
|
---|
| 8 | };
|
---|
| 9 |
|
---|
| 10 | module.exports = function compressValue(node) {
|
---|
| 11 | if (!this.declaration) {
|
---|
| 12 | return;
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | var property = resolveName(this.declaration.property);
|
---|
| 16 |
|
---|
| 17 | if (handlers.hasOwnProperty(property.basename)) {
|
---|
| 18 | handlers[property.basename](node);
|
---|
| 19 | }
|
---|
| 20 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.