From 4ed557ea98fe7078b30e61e1e8543ceb6e2bd4c9 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Fri, 1 Mar 2019 14:13:39 -0500 Subject: [PATCH 1/3] Use progressive maxWidth scale --- .../fixtures/tailwind-output-important.css | 140 +++++++++++++----- __tests__/fixtures/tailwind-output.css | 140 +++++++++++++----- defaultTheme.js | 19 ++- 3 files changed, 211 insertions(+), 88 deletions(-) diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css index 6698fc65cf21..f67b53ee8502 100644 --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -3730,35 +3730,47 @@ table { } .max-w-sm { - max-width: 30rem !important; + max-width: 24rem !important; } .max-w-md { - max-width: 40rem !important; + max-width: 28rem !important; } .max-w-lg { - max-width: 50rem !important; + max-width: 32rem !important; } .max-w-xl { - max-width: 60rem !important; + max-width: 36rem !important; } .max-w-2xl { - max-width: 70rem !important; + max-width: 42rem !important; } .max-w-3xl { - max-width: 80rem !important; + max-width: 48rem !important; } .max-w-4xl { - max-width: 90rem !important; + max-width: 56rem !important; } .max-w-5xl { - max-width: 100rem !important; + max-width: 64rem !important; +} + +.max-w-7xl { + max-width: 72rem !important; +} + +.max-w-8xl { + max-width: 80rem !important; +} + +.max-w-9xl { + max-width: 90rem !important; } .max-w-full { @@ -9815,35 +9827,47 @@ table { } .sm\:max-w-sm { - max-width: 30rem !important; + max-width: 24rem !important; } .sm\:max-w-md { - max-width: 40rem !important; + max-width: 28rem !important; } .sm\:max-w-lg { - max-width: 50rem !important; + max-width: 32rem !important; } .sm\:max-w-xl { - max-width: 60rem !important; + max-width: 36rem !important; } .sm\:max-w-2xl { - max-width: 70rem !important; + max-width: 42rem !important; } .sm\:max-w-3xl { - max-width: 80rem !important; + max-width: 48rem !important; } .sm\:max-w-4xl { - max-width: 90rem !important; + max-width: 56rem !important; } .sm\:max-w-5xl { - max-width: 100rem !important; + max-width: 64rem !important; + } + + .sm\:max-w-7xl { + max-width: 72rem !important; + } + + .sm\:max-w-8xl { + max-width: 80rem !important; + } + + .sm\:max-w-9xl { + max-width: 90rem !important; } .sm\:max-w-full { @@ -15885,35 +15909,47 @@ table { } .md\:max-w-sm { - max-width: 30rem !important; + max-width: 24rem !important; } .md\:max-w-md { - max-width: 40rem !important; + max-width: 28rem !important; } .md\:max-w-lg { - max-width: 50rem !important; + max-width: 32rem !important; } .md\:max-w-xl { - max-width: 60rem !important; + max-width: 36rem !important; } .md\:max-w-2xl { - max-width: 70rem !important; + max-width: 42rem !important; } .md\:max-w-3xl { - max-width: 80rem !important; + max-width: 48rem !important; } .md\:max-w-4xl { - max-width: 90rem !important; + max-width: 56rem !important; } .md\:max-w-5xl { - max-width: 100rem !important; + max-width: 64rem !important; + } + + .md\:max-w-7xl { + max-width: 72rem !important; + } + + .md\:max-w-8xl { + max-width: 80rem !important; + } + + .md\:max-w-9xl { + max-width: 90rem !important; } .md\:max-w-full { @@ -21955,35 +21991,47 @@ table { } .lg\:max-w-sm { - max-width: 30rem !important; + max-width: 24rem !important; } .lg\:max-w-md { - max-width: 40rem !important; + max-width: 28rem !important; } .lg\:max-w-lg { - max-width: 50rem !important; + max-width: 32rem !important; } .lg\:max-w-xl { - max-width: 60rem !important; + max-width: 36rem !important; } .lg\:max-w-2xl { - max-width: 70rem !important; + max-width: 42rem !important; } .lg\:max-w-3xl { - max-width: 80rem !important; + max-width: 48rem !important; } .lg\:max-w-4xl { - max-width: 90rem !important; + max-width: 56rem !important; } .lg\:max-w-5xl { - max-width: 100rem !important; + max-width: 64rem !important; + } + + .lg\:max-w-7xl { + max-width: 72rem !important; + } + + .lg\:max-w-8xl { + max-width: 80rem !important; + } + + .lg\:max-w-9xl { + max-width: 90rem !important; } .lg\:max-w-full { @@ -28025,35 +28073,47 @@ table { } .xl\:max-w-sm { - max-width: 30rem !important; + max-width: 24rem !important; } .xl\:max-w-md { - max-width: 40rem !important; + max-width: 28rem !important; } .xl\:max-w-lg { - max-width: 50rem !important; + max-width: 32rem !important; } .xl\:max-w-xl { - max-width: 60rem !important; + max-width: 36rem !important; } .xl\:max-w-2xl { - max-width: 70rem !important; + max-width: 42rem !important; } .xl\:max-w-3xl { - max-width: 80rem !important; + max-width: 48rem !important; } .xl\:max-w-4xl { - max-width: 90rem !important; + max-width: 56rem !important; } .xl\:max-w-5xl { - max-width: 100rem !important; + max-width: 64rem !important; + } + + .xl\:max-w-7xl { + max-width: 72rem !important; + } + + .xl\:max-w-8xl { + max-width: 80rem !important; + } + + .xl\:max-w-9xl { + max-width: 90rem !important; } .xl\:max-w-full { diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css index b0c2065ee0e1..6536ea87f5a3 100644 --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -3730,35 +3730,47 @@ table { } .max-w-sm { - max-width: 30rem; + max-width: 24rem; } .max-w-md { - max-width: 40rem; + max-width: 28rem; } .max-w-lg { - max-width: 50rem; + max-width: 32rem; } .max-w-xl { - max-width: 60rem; + max-width: 36rem; } .max-w-2xl { - max-width: 70rem; + max-width: 42rem; } .max-w-3xl { - max-width: 80rem; + max-width: 48rem; } .max-w-4xl { - max-width: 90rem; + max-width: 56rem; } .max-w-5xl { - max-width: 100rem; + max-width: 64rem; +} + +.max-w-7xl { + max-width: 72rem; +} + +.max-w-8xl { + max-width: 80rem; +} + +.max-w-9xl { + max-width: 90rem; } .max-w-full { @@ -9815,35 +9827,47 @@ table { } .sm\:max-w-sm { - max-width: 30rem; + max-width: 24rem; } .sm\:max-w-md { - max-width: 40rem; + max-width: 28rem; } .sm\:max-w-lg { - max-width: 50rem; + max-width: 32rem; } .sm\:max-w-xl { - max-width: 60rem; + max-width: 36rem; } .sm\:max-w-2xl { - max-width: 70rem; + max-width: 42rem; } .sm\:max-w-3xl { - max-width: 80rem; + max-width: 48rem; } .sm\:max-w-4xl { - max-width: 90rem; + max-width: 56rem; } .sm\:max-w-5xl { - max-width: 100rem; + max-width: 64rem; + } + + .sm\:max-w-7xl { + max-width: 72rem; + } + + .sm\:max-w-8xl { + max-width: 80rem; + } + + .sm\:max-w-9xl { + max-width: 90rem; } .sm\:max-w-full { @@ -15885,35 +15909,47 @@ table { } .md\:max-w-sm { - max-width: 30rem; + max-width: 24rem; } .md\:max-w-md { - max-width: 40rem; + max-width: 28rem; } .md\:max-w-lg { - max-width: 50rem; + max-width: 32rem; } .md\:max-w-xl { - max-width: 60rem; + max-width: 36rem; } .md\:max-w-2xl { - max-width: 70rem; + max-width: 42rem; } .md\:max-w-3xl { - max-width: 80rem; + max-width: 48rem; } .md\:max-w-4xl { - max-width: 90rem; + max-width: 56rem; } .md\:max-w-5xl { - max-width: 100rem; + max-width: 64rem; + } + + .md\:max-w-7xl { + max-width: 72rem; + } + + .md\:max-w-8xl { + max-width: 80rem; + } + + .md\:max-w-9xl { + max-width: 90rem; } .md\:max-w-full { @@ -21955,35 +21991,47 @@ table { } .lg\:max-w-sm { - max-width: 30rem; + max-width: 24rem; } .lg\:max-w-md { - max-width: 40rem; + max-width: 28rem; } .lg\:max-w-lg { - max-width: 50rem; + max-width: 32rem; } .lg\:max-w-xl { - max-width: 60rem; + max-width: 36rem; } .lg\:max-w-2xl { - max-width: 70rem; + max-width: 42rem; } .lg\:max-w-3xl { - max-width: 80rem; + max-width: 48rem; } .lg\:max-w-4xl { - max-width: 90rem; + max-width: 56rem; } .lg\:max-w-5xl { - max-width: 100rem; + max-width: 64rem; + } + + .lg\:max-w-7xl { + max-width: 72rem; + } + + .lg\:max-w-8xl { + max-width: 80rem; + } + + .lg\:max-w-9xl { + max-width: 90rem; } .lg\:max-w-full { @@ -28025,35 +28073,47 @@ table { } .xl\:max-w-sm { - max-width: 30rem; + max-width: 24rem; } .xl\:max-w-md { - max-width: 40rem; + max-width: 28rem; } .xl\:max-w-lg { - max-width: 50rem; + max-width: 32rem; } .xl\:max-w-xl { - max-width: 60rem; + max-width: 36rem; } .xl\:max-w-2xl { - max-width: 70rem; + max-width: 42rem; } .xl\:max-w-3xl { - max-width: 80rem; + max-width: 48rem; } .xl\:max-w-4xl { - max-width: 90rem; + max-width: 56rem; } .xl\:max-w-5xl { - max-width: 100rem; + max-width: 64rem; + } + + .xl\:max-w-7xl { + max-width: 72rem; + } + + .xl\:max-w-8xl { + max-width: 80rem; + } + + .xl\:max-w-9xl { + max-width: 90rem; } .xl\:max-w-full { diff --git a/defaultTheme.js b/defaultTheme.js index 374d0090e66f..2a4e5da028c9 100644 --- a/defaultTheme.js +++ b/defaultTheme.js @@ -256,14 +256,17 @@ module.exports = function() { }, maxWidth: { xs: '20rem', - sm: '30rem', - md: '40rem', - lg: '50rem', - xl: '60rem', - '2xl': '70rem', - '3xl': '80rem', - '4xl': '90rem', - '5xl': '100rem', + sm: '24rem', + md: '28rem', + lg: '32rem', + xl: '36rem', + '2xl': '42rem', + '3xl': '48rem', + '4xl': '56rem', + '5xl': '64rem', + '7xl': '72rem', + '8xl': '80rem', + '9xl': '90rem', full: '100%', }, maxHeight: { From 2dcea512fc79ba9ae06eb8f1ba960f7d65119240 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Sat, 2 Mar 2019 15:58:31 -0500 Subject: [PATCH 2/3] Renumber scale to account for missing value Somehow I skipped 6xl? I'm an idiot. --- .../fixtures/tailwind-output-important.css | 30 +++++++++---------- __tests__/fixtures/tailwind-output.css | 30 +++++++++---------- defaultTheme.js | 6 ++-- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css index f67b53ee8502..e285aef652da 100644 --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -3761,15 +3761,15 @@ table { max-width: 64rem !important; } -.max-w-7xl { +.max-w-6xl { max-width: 72rem !important; } -.max-w-8xl { +.max-w-7xl { max-width: 80rem !important; } -.max-w-9xl { +.max-w-8xl { max-width: 90rem !important; } @@ -9858,15 +9858,15 @@ table { max-width: 64rem !important; } - .sm\:max-w-7xl { + .sm\:max-w-6xl { max-width: 72rem !important; } - .sm\:max-w-8xl { + .sm\:max-w-7xl { max-width: 80rem !important; } - .sm\:max-w-9xl { + .sm\:max-w-8xl { max-width: 90rem !important; } @@ -15940,15 +15940,15 @@ table { max-width: 64rem !important; } - .md\:max-w-7xl { + .md\:max-w-6xl { max-width: 72rem !important; } - .md\:max-w-8xl { + .md\:max-w-7xl { max-width: 80rem !important; } - .md\:max-w-9xl { + .md\:max-w-8xl { max-width: 90rem !important; } @@ -22022,15 +22022,15 @@ table { max-width: 64rem !important; } - .lg\:max-w-7xl { + .lg\:max-w-6xl { max-width: 72rem !important; } - .lg\:max-w-8xl { + .lg\:max-w-7xl { max-width: 80rem !important; } - .lg\:max-w-9xl { + .lg\:max-w-8xl { max-width: 90rem !important; } @@ -28104,15 +28104,15 @@ table { max-width: 64rem !important; } - .xl\:max-w-7xl { + .xl\:max-w-6xl { max-width: 72rem !important; } - .xl\:max-w-8xl { + .xl\:max-w-7xl { max-width: 80rem !important; } - .xl\:max-w-9xl { + .xl\:max-w-8xl { max-width: 90rem !important; } diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css index 6536ea87f5a3..29b837394d02 100644 --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -3761,15 +3761,15 @@ table { max-width: 64rem; } -.max-w-7xl { +.max-w-6xl { max-width: 72rem; } -.max-w-8xl { +.max-w-7xl { max-width: 80rem; } -.max-w-9xl { +.max-w-8xl { max-width: 90rem; } @@ -9858,15 +9858,15 @@ table { max-width: 64rem; } - .sm\:max-w-7xl { + .sm\:max-w-6xl { max-width: 72rem; } - .sm\:max-w-8xl { + .sm\:max-w-7xl { max-width: 80rem; } - .sm\:max-w-9xl { + .sm\:max-w-8xl { max-width: 90rem; } @@ -15940,15 +15940,15 @@ table { max-width: 64rem; } - .md\:max-w-7xl { + .md\:max-w-6xl { max-width: 72rem; } - .md\:max-w-8xl { + .md\:max-w-7xl { max-width: 80rem; } - .md\:max-w-9xl { + .md\:max-w-8xl { max-width: 90rem; } @@ -22022,15 +22022,15 @@ table { max-width: 64rem; } - .lg\:max-w-7xl { + .lg\:max-w-6xl { max-width: 72rem; } - .lg\:max-w-8xl { + .lg\:max-w-7xl { max-width: 80rem; } - .lg\:max-w-9xl { + .lg\:max-w-8xl { max-width: 90rem; } @@ -28104,15 +28104,15 @@ table { max-width: 64rem; } - .xl\:max-w-7xl { + .xl\:max-w-6xl { max-width: 72rem; } - .xl\:max-w-8xl { + .xl\:max-w-7xl { max-width: 80rem; } - .xl\:max-w-9xl { + .xl\:max-w-8xl { max-width: 90rem; } diff --git a/defaultTheme.js b/defaultTheme.js index 2a4e5da028c9..5ef87ef18f3b 100644 --- a/defaultTheme.js +++ b/defaultTheme.js @@ -264,9 +264,9 @@ module.exports = function() { '3xl': '48rem', '4xl': '56rem', '5xl': '64rem', - '7xl': '72rem', - '8xl': '80rem', - '9xl': '90rem', + '6xl': '72rem', + '7xl': '80rem', + '8xl': '90rem', full: '100%', }, maxHeight: { From d1d9492c91b23bda8c1386f22b1e910d47c3f3d5 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Sat, 2 Mar 2019 16:00:05 -0500 Subject: [PATCH 3/3] Remove 7xl and 8xl Now that I plan to add max-w-screen-* variations, I don't think these huge options provide any real value. --- .../fixtures/tailwind-output-important.css | 40 ------------------- __tests__/fixtures/tailwind-output.css | 40 ------------------- defaultTheme.js | 2 - 3 files changed, 82 deletions(-) diff --git a/__tests__/fixtures/tailwind-output-important.css b/__tests__/fixtures/tailwind-output-important.css index e285aef652da..ec43d5a242c2 100644 --- a/__tests__/fixtures/tailwind-output-important.css +++ b/__tests__/fixtures/tailwind-output-important.css @@ -3765,14 +3765,6 @@ table { max-width: 72rem !important; } -.max-w-7xl { - max-width: 80rem !important; -} - -.max-w-8xl { - max-width: 90rem !important; -} - .max-w-full { max-width: 100% !important; } @@ -9862,14 +9854,6 @@ table { max-width: 72rem !important; } - .sm\:max-w-7xl { - max-width: 80rem !important; - } - - .sm\:max-w-8xl { - max-width: 90rem !important; - } - .sm\:max-w-full { max-width: 100% !important; } @@ -15944,14 +15928,6 @@ table { max-width: 72rem !important; } - .md\:max-w-7xl { - max-width: 80rem !important; - } - - .md\:max-w-8xl { - max-width: 90rem !important; - } - .md\:max-w-full { max-width: 100% !important; } @@ -22026,14 +22002,6 @@ table { max-width: 72rem !important; } - .lg\:max-w-7xl { - max-width: 80rem !important; - } - - .lg\:max-w-8xl { - max-width: 90rem !important; - } - .lg\:max-w-full { max-width: 100% !important; } @@ -28108,14 +28076,6 @@ table { max-width: 72rem !important; } - .xl\:max-w-7xl { - max-width: 80rem !important; - } - - .xl\:max-w-8xl { - max-width: 90rem !important; - } - .xl\:max-w-full { max-width: 100% !important; } diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css index 29b837394d02..c4fa2f982920 100644 --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -3765,14 +3765,6 @@ table { max-width: 72rem; } -.max-w-7xl { - max-width: 80rem; -} - -.max-w-8xl { - max-width: 90rem; -} - .max-w-full { max-width: 100%; } @@ -9862,14 +9854,6 @@ table { max-width: 72rem; } - .sm\:max-w-7xl { - max-width: 80rem; - } - - .sm\:max-w-8xl { - max-width: 90rem; - } - .sm\:max-w-full { max-width: 100%; } @@ -15944,14 +15928,6 @@ table { max-width: 72rem; } - .md\:max-w-7xl { - max-width: 80rem; - } - - .md\:max-w-8xl { - max-width: 90rem; - } - .md\:max-w-full { max-width: 100%; } @@ -22026,14 +22002,6 @@ table { max-width: 72rem; } - .lg\:max-w-7xl { - max-width: 80rem; - } - - .lg\:max-w-8xl { - max-width: 90rem; - } - .lg\:max-w-full { max-width: 100%; } @@ -28108,14 +28076,6 @@ table { max-width: 72rem; } - .xl\:max-w-7xl { - max-width: 80rem; - } - - .xl\:max-w-8xl { - max-width: 90rem; - } - .xl\:max-w-full { max-width: 100%; } diff --git a/defaultTheme.js b/defaultTheme.js index 5ef87ef18f3b..882b503306aa 100644 --- a/defaultTheme.js +++ b/defaultTheme.js @@ -265,8 +265,6 @@ module.exports = function() { '4xl': '56rem', '5xl': '64rem', '6xl': '72rem', - '7xl': '80rem', - '8xl': '90rem', full: '100%', }, maxHeight: {