From 5366d242c25aa5e008c38a53cdfeca1cf0a22e44 Mon Sep 17 00:00:00 2001 From: Yuhei Yasuda Date: Tue, 19 Sep 2023 21:49:20 +0900 Subject: [PATCH] Add support for `text-wrap: pretty` (#12031) * Add support for `text-wrap: pretty` * Update changelog --------- Co-authored-by: Jonathan Reinink --- CHANGELOG.md | 2 +- src/corePlugins.js | 1 + tests/plugins/textWrap.test.js | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 692533c2e..8a3fb5bcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Process and inline `@import` at-rules natively ([#11239](https://github.com/tailwindlabs/tailwindcss/pull/11239)) - Add `svh`, `lvh`, and `dvh` values to default `height`/`min-height`/`max-height` theme ([#11317](https://github.com/tailwindlabs/tailwindcss/pull/11317)) - Add `has-*` variants for `:has(...)` pseudo-class ([#11318](https://github.com/tailwindlabs/tailwindcss/pull/11318)) -- Add `text-wrap` utilities including `text-balance` ([#11320](https://github.com/tailwindlabs/tailwindcss/pull/11320)) +- Add `text-wrap` utilities including `text-balance` and `text-pretty` ([#11320](https://github.com/tailwindlabs/tailwindcss/pull/11320), [#12031](https://github.com/tailwindlabs/tailwindcss/pull/12031)) - Explicitly configure Lightning CSS features, and prefer user browserslist over default browserslist ([#11402](https://github.com/tailwindlabs/tailwindcss/pull/11402), [#11412](https://github.com/tailwindlabs/tailwindcss/pull/11412)) - Extend default `opacity` scale to include all steps of 5 ([#11832](https://github.com/tailwindlabs/tailwindcss/pull/11832)) - Update Preflight `html` styles to include shadow DOM `:host` pseudo-class ([#11200](https://github.com/tailwindlabs/tailwindcss/pull/11200)) diff --git a/src/corePlugins.js b/src/corePlugins.js index 5182835b9..bfe6ca6fb 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -1528,6 +1528,7 @@ export let corePlugins = { '.text-wrap': { 'text-wrap': 'wrap' }, '.text-nowrap': { 'text-wrap': 'nowrap' }, '.text-balance': { 'text-wrap': 'balance' }, + '.text-pretty': { 'text-wrap': 'pretty' }, }) }, diff --git a/tests/plugins/textWrap.test.js b/tests/plugins/textWrap.test.js index 03fbddf3a..15421512e 100644 --- a/tests/plugins/textWrap.test.js +++ b/tests/plugins/textWrap.test.js @@ -10,4 +10,7 @@ quickPluginTest('textWrap').toMatchFormattedCss(css` .text-balance { text-wrap: balance; } + .text-pretty { + text-wrap: pretty; + } `)