mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
16 lines
350 B
JavaScript
16 lines
350 B
JavaScript
import fs from 'fs'
|
|
import postcss from 'postcss'
|
|
|
|
export default function() {
|
|
return function(css) {
|
|
css.walkAtRules('tailwind', atRule => {
|
|
if (atRule.params !== 'preflight') {
|
|
return
|
|
}
|
|
|
|
atRule.before(postcss.parse(fs.readFileSync(`${__dirname}/../../css/preflight.css`, 'utf8')))
|
|
atRule.remove()
|
|
})
|
|
}
|
|
}
|