From 79e92de68e5c22983c3bb9226a11cdcd135e8bdc Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Thu, 26 Oct 2023 14:14:43 -0400 Subject: [PATCH] Add spacing scale to `min-width`, `min-height`, and `max-width` (#12300) * Add spacing scale to `min-width`, `min-height`, and `max-width` * Update snapshots * Update changelog --- CHANGELOG.md | 1 + stubs/config.full.js | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e09437be4c76..d9c28895ac5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Increase default values for `grid-rows-*` utilities from 1–6 to 1–12 ([#12180](https://github.com/tailwindlabs/tailwindcss/pull/12180)) - Add `size-*` utilities ([#12287](https://github.com/tailwindlabs/tailwindcss/pull/12287)) - Add utilities for CSS subgrid ([#12298](https://github.com/tailwindlabs/tailwindcss/pull/12298)) +- Add spacing scale to `min-w-*`, `min-h-*`, and `max-w-*` utilities ([#12300](https://github.com/tailwindlabs/tailwindcss/pull/12300)) ## [3.3.6] - 2023-12-04 diff --git a/stubs/config.full.js b/stubs/config.full.js index dc864644c4ad..e1578c6e7171 100644 --- a/stubs/config.full.js +++ b/stubs/config.full.js @@ -658,8 +658,8 @@ module.exports = { fit: 'fit-content', }), maxWidth: ({ theme, breakpoints }) => ({ + ...theme('spacing'), none: 'none', - 0: '0rem', xs: '20rem', sm: '24rem', md: '28rem', @@ -678,8 +678,8 @@ module.exports = { prose: '65ch', ...breakpoints(theme('screens')), }), - minHeight: { - 0: '0px', + minHeight: ({ theme }) => ({ + ...theme('spacing'), full: '100%', screen: '100vh', svh: '100svh', @@ -688,14 +688,14 @@ module.exports = { min: 'min-content', max: 'max-content', fit: 'fit-content', - }, - minWidth: { - 0: '0px', + }), + minWidth: ({ theme }) => ({ + ...theme('spacing'), full: '100%', min: 'min-content', max: 'max-content', fit: 'fit-content', - }, + }), objectPosition: { bottom: 'bottom', center: 'center',