From 8f8469fd626dac71f63b6937036941421e1e74fa Mon Sep 17 00:00:00 2001 From: Jake Dohm Date: Mon, 6 Nov 2017 09:06:13 -0500 Subject: [PATCH 1/2] Moved `lists` utility nearer to the top, so other utilities (padding, margin, etc.) would override; --- src/lib/generateUtilities.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/generateUtilities.js b/src/lib/generateUtilities.js index bf658fcc0..546246cb6 100644 --- a/src/lib/generateUtilities.js +++ b/src/lib/generateUtilities.js @@ -45,6 +45,7 @@ export default function(config) { if (atRule.params === 'utilities') { const utilities = _.flatten([ forms(options), + lists(options), textSizes(options), textWeights(options), textFonts(options), @@ -78,7 +79,6 @@ export default function(config) { pointerEvents(options), resize(options), cursor(options), - lists(options), ]) atRule.before(container(options)) From 78d66429bd3566a5238192332a947196f3417dcc Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Mon, 6 Nov 2017 11:37:01 -0500 Subject: [PATCH 2/2] Move list utilities to very top, fix tests --- __tests__/fixtures/tailwind-output.css | 60 +++++++++++++------------- src/lib/generateUtilities.js | 2 +- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css index ca223d766..09d365dfc 100644 --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -586,6 +586,12 @@ button, } } +.list-reset { + list-style: none; + margin: 0; + padding: 0; +} + .appearance-none { appearance: none; } @@ -3534,18 +3540,18 @@ button, cursor: not-allowed; } -.list-reset { - list-style: none; - margin: 0; - padding: 0; -} - .example { font-weight: 700; color: #e3342f; } @media (min-width: 576px) { + .sm\:list-reset { + list-style: none; + margin: 0; + padding: 0; + } + .sm\:appearance-none { appearance: none; } @@ -6494,12 +6500,6 @@ button, cursor: not-allowed; } - .sm\:list-reset { - list-style: none; - margin: 0; - padding: 0; - } - .sm\:example { font-weight: 700; color: #e3342f; @@ -6507,6 +6507,12 @@ button, } @media (min-width: 768px) { + .md\:list-reset { + list-style: none; + margin: 0; + padding: 0; + } + .md\:appearance-none { appearance: none; } @@ -9455,12 +9461,6 @@ button, cursor: not-allowed; } - .md\:list-reset { - list-style: none; - margin: 0; - padding: 0; - } - .md\:example { font-weight: 700; color: #e3342f; @@ -9468,6 +9468,12 @@ button, } @media (min-width: 992px) { + .lg\:list-reset { + list-style: none; + margin: 0; + padding: 0; + } + .lg\:appearance-none { appearance: none; } @@ -12416,12 +12422,6 @@ button, cursor: not-allowed; } - .lg\:list-reset { - list-style: none; - margin: 0; - padding: 0; - } - .lg\:example { font-weight: 700; color: #e3342f; @@ -12429,6 +12429,12 @@ button, } @media (min-width: 1200px) { + .xl\:list-reset { + list-style: none; + margin: 0; + padding: 0; + } + .xl\:appearance-none { appearance: none; } @@ -15377,12 +15383,6 @@ button, cursor: not-allowed; } - .xl\:list-reset { - list-style: none; - margin: 0; - padding: 0; - } - .xl\:example { font-weight: 700; color: #e3342f; diff --git a/src/lib/generateUtilities.js b/src/lib/generateUtilities.js index 546246cb6..75dd4e7de 100644 --- a/src/lib/generateUtilities.js +++ b/src/lib/generateUtilities.js @@ -44,8 +44,8 @@ export default function(config) { css.walkAtRules('tailwind', atRule => { if (atRule.params === 'utilities') { const utilities = _.flatten([ - forms(options), lists(options), + forms(options), textSizes(options), textWeights(options), textFonts(options),