cssnano
Version:
A modular CSS minifier, built on top of the PostCSS ecosystem.
17 lines (12 loc) • 356 B
JavaScript
import cssnanoUtils from '#utils';
const { asciiLowerCase } = cssnanoUtils;
/** @param {string} value */
const minifyWeight = function (value) {
const lowerCasedValue = asciiLowerCase(value);
if (lowerCasedValue === 'normal') {
return '400';
} else {
return lowerCasedValue === 'bold' ? '700' : value;
}
};
export default minifyWeight;