/** * column-gap 规则 */ import { GAP_STR, NONNEGATIVE_NUMBER_REGEX_STR, UNIT_STR } from '../constant'; export default { regExp: new RegExp(`^c(olumn)?-gap-(((?${NONNEGATIVE_NUMBER_REGEX_STR})(?${UNIT_STR})?)|(?${GAP_STR}))$`), render: function ({ grops }) { let { num = Infinity, unit, value } = grops; if (!value) { value = num + unit; } return { name: 'column-gap', css: [`column-gap: ${value}`] } } }