diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css index 604004e0f..e46db9627 100644 --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -3657,6 +3657,18 @@ video { clear: both !important; } +.clear-left { + clear: left !important; +} + +.clear-right { + clear: right !important; +} + +.clear-both { + clear: both !important; +} + .font-sans { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important; } @@ -12979,6 +12991,18 @@ video { clear: both !important; } + .sm\:clear-left { + clear: left !important; + } + + .sm\:clear-right { + clear: right !important; + } + + .sm\:clear-both { + clear: both !important; + } + .sm\:font-sans { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important; } @@ -22302,6 +22326,18 @@ video { clear: both !important; } + .md\:clear-left { + clear: left !important; + } + + .md\:clear-right { + clear: right !important; + } + + .md\:clear-both { + clear: both !important; + } + .md\:font-sans { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important; } @@ -31625,6 +31661,18 @@ video { clear: both !important; } + .lg\:clear-left { + clear: left !important; + } + + .lg\:clear-right { + clear: right !important; + } + + .lg\:clear-both { + clear: both !important; + } + .lg\:font-sans { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important; } @@ -40948,6 +40996,18 @@ video { clear: both !important; } + .xl\:clear-left { + clear: left !important; + } + + .xl\:clear-right { + clear: right !important; + } + + .xl\:clear-both { + clear: both !important; + } + .xl\:font-sans { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important; } diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css index ab2421dda..05f564b16 100644 --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -3657,6 +3657,18 @@ video { clear: both; } +.clear-left { + clear: left; +} + +.clear-right { + clear: right; +} + +.clear-both { + clear: both; +} + .font-sans { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } @@ -12979,6 +12991,18 @@ video { clear: both; } + .sm\:clear-left { + clear: left; + } + + .sm\:clear-right { + clear: right; + } + + .sm\:clear-both { + clear: both; + } + .sm\:font-sans { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } @@ -22302,6 +22326,18 @@ video { clear: both; } + .md\:clear-left { + clear: left; + } + + .md\:clear-right { + clear: right; + } + + .md\:clear-both { + clear: both; + } + .md\:font-sans { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } @@ -31625,6 +31661,18 @@ video { clear: both; } + .lg\:clear-left { + clear: left; + } + + .lg\:clear-right { + clear: right; + } + + .lg\:clear-both { + clear: both; + } + .lg\:font-sans { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } @@ -40948,6 +40996,18 @@ video { clear: both; } + .xl\:clear-left { + clear: left; + } + + .xl\:clear-right { + clear: right; + } + + .xl\:clear-both { + clear: both; + } + .xl\:font-sans { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } diff --git a/src/corePlugins.js b/src/corePlugins.js index 495b22b0e..36da4ac31 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -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, diff --git a/src/plugins/clear.js b/src/plugins/clear.js new file mode 100644 index 000000000..12232ac9c --- /dev/null +++ b/src/plugins/clear.js @@ -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') + ) + } +} diff --git a/src/plugins/float.js b/src/plugins/float.js index 555c0f211..009554b07 100644 --- a/src/plugins/float.js +++ b/src/plugins/float.js @@ -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', diff --git a/stubs/defaultConfig.stub.js b/stubs/defaultConfig.stub.js index ebe5ece54..181513e58 100644 --- a/stubs/defaultConfig.stub.js +++ b/stubs/defaultConfig.stub.js @@ -475,6 +475,7 @@ module.exports = { flexShrink: ['responsive'], flexWrap: ['responsive'], float: ['responsive'], + clear: ['responsive'], fontFamily: ['responsive'], fontSize: ['responsive'], fontSmoothing: ['responsive'],