mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Update fixtures and code style
This commit is contained in:
parent
02ed29e3e9
commit
2ae6ee6c12
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,8 @@ function buildDistFile(filename) {
|
||||
fs.readFile(`./${filename}.css`, (err, css) => {
|
||||
if (err) throw err
|
||||
|
||||
return postcss([tailwind(), require('autoprefixer')])
|
||||
// return postcss([tailwind(), require('autoprefixer')])
|
||||
return postcss([tailwind()])
|
||||
.process(css, {
|
||||
from: `./${filename}.css`,
|
||||
to: `./dist/${filename}.css`,
|
||||
|
||||
@ -3,16 +3,8 @@ import createUtilityPlugin from '../util/createUtilityPlugin'
|
||||
export default function() {
|
||||
return function(...args) {
|
||||
;[
|
||||
createUtilityPlugin(
|
||||
'translate-x',
|
||||
'translate',
|
||||
'--transform-translate-x'
|
||||
),
|
||||
createUtilityPlugin(
|
||||
'translate-y',
|
||||
'translate',
|
||||
'--transform-translate-y'
|
||||
),
|
||||
createUtilityPlugin('translate-x', 'translate', '--transform-translate-x'),
|
||||
createUtilityPlugin('translate-y', 'translate', '--transform-translate-y'),
|
||||
].forEach(f => f(...args))
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,11 +13,7 @@ function className(classPrefix, key) {
|
||||
return `${classPrefix}-${key}`
|
||||
}
|
||||
|
||||
export default function createUtilityPlugin(
|
||||
classPrefix,
|
||||
themeKey,
|
||||
property = themeKey
|
||||
) {
|
||||
export default function createUtilityPlugin(classPrefix, themeKey, property = themeKey) {
|
||||
return function({ e, addUtilities, variants, theme }) {
|
||||
return addUtilities(
|
||||
fromPairs(
|
||||
|
||||
@ -3,3 +3,10 @@
|
||||
@tailwind components;
|
||||
|
||||
@tailwind utilities;
|
||||
|
||||
@responsive {
|
||||
.example {
|
||||
@apply .font-bold;
|
||||
color: theme('colors.red.500');
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user