diff --git a/__tests__/fixtures/tailwind-output-flagged.css b/__tests__/fixtures/tailwind-output-flagged.css index 7b3b20864147..019a049d6bfb 100644 --- a/__tests__/fixtures/tailwind-output-flagged.css +++ b/__tests__/fixtures/tailwind-output-flagged.css @@ -19234,6 +19234,10 @@ video { white-space: nowrap; } +.whitespace-nowrap { + white-space: nowrap; +} + .whitespace-pre { white-space: pre; } @@ -42214,6 +42218,10 @@ video { white-space: nowrap; } + .sm\:whitespace-nowrap { + white-space: nowrap; + } + .sm\:whitespace-pre { white-space: pre; } @@ -65164,6 +65172,10 @@ video { white-space: nowrap; } + .md\:whitespace-nowrap { + white-space: nowrap; + } + .md\:whitespace-pre { white-space: pre; } @@ -88114,6 +88126,10 @@ video { white-space: nowrap; } + .lg\:whitespace-nowrap { + white-space: nowrap; + } + .lg\:whitespace-pre { white-space: pre; } @@ -111064,6 +111080,10 @@ video { white-space: nowrap; } + .xl\:whitespace-nowrap { + white-space: nowrap; + } + .xl\:whitespace-pre { white-space: pre; } @@ -134014,6 +134034,10 @@ video { white-space: nowrap; } + .\32xl\:whitespace-nowrap { + white-space: nowrap; + } + .\32xl\:whitespace-pre { white-space: pre; } diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css index bba7fb627848..6da78663ceb0 100644 --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -19234,6 +19234,10 @@ video { white-space: nowrap !important; } +.whitespace-nowrap { + white-space: nowrap !important; +} + .whitespace-pre { white-space: pre !important; } @@ -42214,6 +42218,10 @@ video { white-space: nowrap !important; } + .sm\:whitespace-nowrap { + white-space: nowrap !important; + } + .sm\:whitespace-pre { white-space: pre !important; } @@ -65164,6 +65172,10 @@ video { white-space: nowrap !important; } + .md\:whitespace-nowrap { + white-space: nowrap !important; + } + .md\:whitespace-pre { white-space: pre !important; } @@ -88114,6 +88126,10 @@ video { white-space: nowrap !important; } + .lg\:whitespace-nowrap { + white-space: nowrap !important; + } + .lg\:whitespace-pre { white-space: pre !important; } @@ -111064,6 +111080,10 @@ video { white-space: nowrap !important; } + .xl\:whitespace-nowrap { + white-space: nowrap !important; + } + .xl\:whitespace-pre { white-space: pre !important; } @@ -134014,6 +134034,10 @@ video { white-space: nowrap !important; } + .\32xl\:whitespace-nowrap { + white-space: nowrap !important; + } + .\32xl\:whitespace-pre { white-space: pre !important; } diff --git a/__tests__/fixtures/tailwind-output-no-color-opacity.css b/__tests__/fixtures/tailwind-output-no-color-opacity.css index 29c6936be9d0..0cb5fca207b2 100644 --- a/__tests__/fixtures/tailwind-output-no-color-opacity.css +++ b/__tests__/fixtures/tailwind-output-no-color-opacity.css @@ -17374,6 +17374,10 @@ video { white-space: nowrap; } +.whitespace-nowrap { + white-space: nowrap; +} + .whitespace-pre { white-space: pre; } @@ -38494,6 +38498,10 @@ video { white-space: nowrap; } + .sm\:whitespace-nowrap { + white-space: nowrap; + } + .sm\:whitespace-pre { white-space: pre; } @@ -59584,6 +59592,10 @@ video { white-space: nowrap; } + .md\:whitespace-nowrap { + white-space: nowrap; + } + .md\:whitespace-pre { white-space: pre; } @@ -80674,6 +80686,10 @@ video { white-space: nowrap; } + .lg\:whitespace-nowrap { + white-space: nowrap; + } + .lg\:whitespace-pre { white-space: pre; } @@ -101764,6 +101780,10 @@ video { white-space: nowrap; } + .xl\:whitespace-nowrap { + white-space: nowrap; + } + .xl\:whitespace-pre { white-space: pre; } @@ -122854,6 +122874,10 @@ video { white-space: nowrap; } + .\32xl\:whitespace-nowrap { + white-space: nowrap; + } + .\32xl\:whitespace-pre { white-space: pre; } diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css index 7b3b20864147..019a049d6bfb 100644 --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -19234,6 +19234,10 @@ video { white-space: nowrap; } +.whitespace-nowrap { + white-space: nowrap; +} + .whitespace-pre { white-space: pre; } @@ -42214,6 +42218,10 @@ video { white-space: nowrap; } + .sm\:whitespace-nowrap { + white-space: nowrap; + } + .sm\:whitespace-pre { white-space: pre; } @@ -65164,6 +65172,10 @@ video { white-space: nowrap; } + .md\:whitespace-nowrap { + white-space: nowrap; + } + .md\:whitespace-pre { white-space: pre; } @@ -88114,6 +88126,10 @@ video { white-space: nowrap; } + .lg\:whitespace-nowrap { + white-space: nowrap; + } + .lg\:whitespace-pre { white-space: pre; } @@ -111064,6 +111080,10 @@ video { white-space: nowrap; } + .xl\:whitespace-nowrap { + white-space: nowrap; + } + .xl\:whitespace-pre { white-space: pre; } @@ -134014,6 +134034,10 @@ video { white-space: nowrap; } + .\32xl\:whitespace-nowrap { + white-space: nowrap; + } + .\32xl\:whitespace-pre { white-space: pre; } diff --git a/__tests__/purgeUnusedStyles.test.js b/__tests__/purgeUnusedStyles.test.js index 0deb240d939f..5b532217fb6c 100644 --- a/__tests__/purgeUnusedStyles.test.js +++ b/__tests__/purgeUnusedStyles.test.js @@ -92,7 +92,7 @@ function assertPurged(result) { expect(result.css).toContain('.font-mono') expect(result.css).toContain('.col-span-4') expect(result.css).toContain('.tracking-tight') - expect(result.css).toContain('.whitespace-no-wrap') + expect(result.css).toContain('.whitespace-nowrap') } test('purges unused classes', () => { diff --git a/src/plugins/whitespace.js b/src/plugins/whitespace.js index feca9f82162a..1938652dfe2a 100644 --- a/src/plugins/whitespace.js +++ b/src/plugins/whitespace.js @@ -3,7 +3,7 @@ export default function () { addUtilities( { '.whitespace-normal': { 'white-space': 'normal' }, - '.whitespace-no-wrap': { 'white-space': 'nowrap' }, + '.whitespace-nowrap': { 'white-space': 'nowrap' }, '.whitespace-pre': { 'white-space': 'pre' }, '.whitespace-pre-line': { 'white-space': 'pre-line' }, '.whitespace-pre-wrap': { 'white-space': 'pre-wrap' },