aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@vue/component-compiler-utils/lib/stylePlugins/trim.ts
blob: a7e9a0db731389e92f8982deb0840477d5982f27 (plain)
1
2
3
4
5
6
7
8
9
10
import { Root } from 'postcss'
import * as postcss from 'postcss'

export default postcss.plugin('trim', () => (css: Root) => {
  css.walk(({ type, raws }) => {
    if (type === 'rule' || type === 'atrule') {
      raws.before = raws.after = '\n'
    }
  })
})