Move clear to it's own plugin
This commit is contained in:
parent
ee6241a3b7
commit
ff4f4eb808
6 changed files with 135 additions and 3 deletions
|
|
@ -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
12
src/plugins/clear.js
Normal 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')
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue