You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
429 B
JavaScript

import { defineConfig } from "unocss";
const rules = [
[/^mg-([\.\d]+)$/, ([_, num]) => ({ margin: `${num}px` })],
[/^mg-t-([\.\d]+)$/, ([_, num]) => ({ marginTop: `${num}px` })],
[/^mg-b-([\.\d]+)$/, ([_, num]) => ({ marginBottom: `${num}px` })],
[/^mg-r-([\.\d]+)$/, ([_, num]) => ({ marginRight: `${num}px` })],
[/^mg-l-([\.\d]+)$/, ([_, num]) => ({ marginLeft: `${num}px` })]
]
export default defineConfig({
rules,
})