/** * letter-spacing 规则 */ import { UNIT_STR, NONNEGATIVE_NUMBER_REGEX_STR } from '../constant'; export default { regExp: new RegExp(`^letter-spacing-(?m-)?(?${NONNEGATIVE_NUMBER_REGEX_STR})(?${UNIT_STR})?$`), render: function ({ grops }) { let { isMinus, num, unit } = grops; if (isMinus) { num = 0 - num; } return { name: 'letter-spacing', num, css: [`letter-spacing: ${num}${unit}`] } } }