Move clear to it's own plugin

This commit is contained in:
Adam Wathan 2019-12-27 09:27:18 -05:00
parent ee6241a3b7
commit ff4f4eb808
6 changed files with 135 additions and 3 deletions

View file

@ -26,6 +26,7 @@ import flexGrow from './plugins/flexGrow'
import flexShrink from './plugins/flexShrink'
import order from './plugins/order'
import float from './plugins/float'
import clear from './plugins/clear'
import fontFamily from './plugins/fontFamily'
import fontWeight from './plugins/fontWeight'
import height from './plugins/height'
@ -105,6 +106,7 @@ export default function({ corePlugins: corePluginConfig }) {
flexShrink,
order,
float,
clear,
fontFamily,
fontWeight,
height,

12
src/plugins/clear.js Normal file
View file

@ -0,0 +1,12 @@
export default function() {
return function({ addUtilities, variants }) {
addUtilities(
{
'.clear-left': { clear: 'left' },
'.clear-right': { clear: 'right' },
'.clear-both': { clear: 'both' },
},
variants('clear')
)
}
}

View file

@ -5,9 +5,6 @@ export default function() {
'.float-right': { float: 'right' },
'.float-left': { float: 'left' },
'.float-none': { float: 'none' },
'.clear-left': { clear: 'left' },
'.clear-right': { clear: 'right' },
'.clear-both': { clear: 'both' },
'.clearfix:after': {
content: '""',
display: 'table',