Opal-Estate-Pro/node_modules/csso/lib/compressor/compress/property/font-weight.js
2019-09-13 11:27:52 +07:00

23 lines
621 B
JavaScript
Executable File

module.exports = function compressFontWeight(node) {
var value = node.sequence.head.data;
if (value.type === 'Identifier') {
switch (value.name) {
case 'normal':
node.sequence.head.data = {
type: 'Number',
info: value.info,
value: '400'
};
break;
case 'bold':
node.sequence.head.data = {
type: 'Number',
info: value.info,
value: '700'
};
break;
}
}
};