Last change
on this file since 84d0fbb was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
617 bytes
|
Line | |
---|
1 | module.exports = function compressFontWeight(node) {
|
---|
2 | var value = node.children.head.data;
|
---|
3 |
|
---|
4 | if (value.type === 'Identifier') {
|
---|
5 | switch (value.name) {
|
---|
6 | case 'normal':
|
---|
7 | node.children.head.data = {
|
---|
8 | type: 'Number',
|
---|
9 | loc: value.loc,
|
---|
10 | value: '400'
|
---|
11 | };
|
---|
12 | break;
|
---|
13 | case 'bold':
|
---|
14 | node.children.head.data = {
|
---|
15 | type: 'Number',
|
---|
16 | loc: value.loc,
|
---|
17 | value: '700'
|
---|
18 | };
|
---|
19 | break;
|
---|
20 | }
|
---|
21 | }
|
---|
22 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.