From c2935e16300cf6a0ccec4a3f3f77e8a67494fbdb Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Tue, 30 May 2023 11:58:16 -0400 Subject: [PATCH 01/22] Add `svh`, `lvh`, and `dvh` values to default theme (#11317) * Add svh, lvh, and dvh values to default theme * Update changelog --------- Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com> --- CHANGELOG.md | 4 +++ stubs/config.full.js | 12 +++++++++ tests/basic-usage.oxide.test.css | 45 ++++++++++++++++++++++++++++++++ tests/basic-usage.test.css | 45 ++++++++++++++++++++++++++++++++ tests/basic-usage.test.js | 5 ++-- 5 files changed, 109 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81e9fc50a..847c21b06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix support for container query utilities with arbitrary values ([#12534](https://github.com/tailwindlabs/tailwindcss/pull/12534)) +### Added + +- Add `svh`, `lvh`, and `dvh` values to default `height`/`min-height`/`max-height` theme ([#11317](https://github.com/tailwindlabs/tailwindcss/pull/11317)) + ## [3.3.6] - 2023-12-04 ### Fixed diff --git a/stubs/config.full.js b/stubs/config.full.js index 2dd01c6fd..ed0b5a986 100644 --- a/stubs/config.full.js +++ b/stubs/config.full.js @@ -517,6 +517,9 @@ module.exports = { '5/6': '83.333333%', full: '100%', screen: '100vh', + svh: '100svh', + lvh: '100lvh', + dvh: '100dvh', min: 'min-content', max: 'max-content', fit: 'fit-content', @@ -621,6 +624,9 @@ module.exports = { none: 'none', full: '100%', screen: '100vh', + svh: '100svh', + lvh: '100lvh', + dvh: '100dvh', min: 'min-content', max: 'max-content', fit: 'fit-content', @@ -650,6 +656,9 @@ module.exports = { 0: '0px', full: '100%', screen: '100vh', + svh: '100svh', + lvh: '100lvh', + dvh: '100dvh', min: 'min-content', max: 'max-content', fit: 'fit-content', @@ -967,6 +976,9 @@ module.exports = { '11/12': '91.666667%', full: '100%', screen: '100vw', + svw: '100svw', + lvw: '100lvw', + dvw: '100dvw', min: 'min-content', max: 'max-content', fit: 'fit-content', diff --git a/tests/basic-usage.oxide.test.css b/tests/basic-usage.oxide.test.css index 6a01dc045..455e672ee 100644 --- a/tests/basic-usage.oxide.test.css +++ b/tests/basic-usage.oxide.test.css @@ -201,15 +201,60 @@ .aspect-video { aspect-ratio: 16 / 9; } +.h-0 { + height: 0; +} .h-16 { height: 4rem; } +.h-dvh { + height: 100dvh; +} +.h-full { + height: 100%; +} +.h-lvh { + height: 100lvh; +} +.h-screen { + height: 100vh; +} +.h-svh { + height: 100svh; +} +.max-h-0 { + max-height: 0; +} +.max-h-dvh { + max-height: 100dvh; +} +.max-h-full { + max-height: 100%; +} +.max-h-lvh { + max-height: 100lvh; +} .max-h-screen { max-height: 100vh; } +.max-h-svh { + max-height: 100svh; +} .min-h-0 { min-height: 0; } +.min-h-dvh { + min-height: 100dvh; +} +.min-h-full { + min-height: 100%; +} +.min-h-lvh { + min-height: 100lvh; +} +.min-h-svh { + min-height: 100svh; +} .w-12 { width: 3rem; } diff --git a/tests/basic-usage.test.css b/tests/basic-usage.test.css index 720c783e9..8d1ba2da8 100644 --- a/tests/basic-usage.test.css +++ b/tests/basic-usage.test.css @@ -201,15 +201,60 @@ .aspect-video { aspect-ratio: 16 / 9; } +.h-0 { + height: 0; +} .h-16 { height: 4rem; } +.h-dvh { + height: 100dvh; +} +.h-full { + height: 100%; +} +.h-lvh { + height: 100lvh; +} +.h-screen { + height: 100vh; +} +.h-svh { + height: 100svh; +} +.max-h-0 { + max-height: 0; +} +.max-h-dvh { + max-height: 100dvh; +} +.max-h-full { + max-height: 100%; +} +.max-h-lvh { + max-height: 100lvh; +} .max-h-screen { max-height: 100vh; } +.max-h-svh { + max-height: 100svh; +} .min-h-0 { min-height: 0; } +.min-h-dvh { + min-height: 100dvh; +} +.min-h-full { + min-height: 100%; +} +.min-h-lvh { + min-height: 100lvh; +} +.min-h-svh { + min-height: 100svh; +} .w-12 { width: 3rem; } diff --git a/tests/basic-usage.test.js b/tests/basic-usage.test.js index 24bae0e68..c8a560c3b 100644 --- a/tests/basic-usage.test.js +++ b/tests/basic-usage.test.js @@ -91,9 +91,10 @@ crosscheck(({ stable, oxide, engine }) => {
-
+ +
-
+
From 8b737f61c6a98dca630e1526ee0971985886d7b4 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Tue, 30 May 2023 12:21:08 -0400 Subject: [PATCH 02/22] Add `has-*` variants for `:has(...)` pseudo-class (#11318) * Add `has-*` variants for `:has(...)` pseudo-class * Update changelog * Fix mistake in test --------- Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com> --- CHANGELOG.md | 1 + src/corePlugins.js | 20 +++++ src/lib/setupContextUtils.js | 1 + tests/arbitrary-variants.test.js | 126 +++++++++++++++++++++++++++++++ 4 files changed, 148 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 847c21b06..84ca401c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - 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)) ## [3.3.6] - 2023-12-04 diff --git a/src/corePlugins.js b/src/corePlugins.js index 5db1fdb74..b8bf04279 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -392,6 +392,26 @@ export let variantPlugins = { ) }, + hasVariants: ({ matchVariant }) => { + matchVariant('has', (value) => `&:has(${normalize(value)})`, { values: {} }) + matchVariant( + 'group-has', + (value, { modifier }) => + modifier + ? `:merge(.group\\/${modifier}):has(${normalize(value)}) &` + : `:merge(.group):has(${normalize(value)}) &`, + { values: {} } + ) + matchVariant( + 'peer-has', + (value, { modifier }) => + modifier + ? `:merge(.peer\\/${modifier}):has(${normalize(value)}) ~ &` + : `:merge(.peer):has(${normalize(value)}) ~ &`, + { values: {} } + ) + }, + ariaVariants: ({ matchVariant, theme }) => { matchVariant('aria', (value) => `&[aria-${normalize(value)}]`, { values: theme('aria') ?? {} }) matchVariant( diff --git a/src/lib/setupContextUtils.js b/src/lib/setupContextUtils.js index 59c261d69..4fc8468a4 100644 --- a/src/lib/setupContextUtils.js +++ b/src/lib/setupContextUtils.js @@ -758,6 +758,7 @@ function resolvePlugins(context, root) { let beforeVariants = [ variantPlugins['pseudoElementVariants'], variantPlugins['pseudoClassVariants'], + variantPlugins['hasVariants'], variantPlugins['ariaVariants'], variantPlugins['dataVariants'], ] diff --git a/tests/arbitrary-variants.test.js b/tests/arbitrary-variants.test.js index b210bdc77..c4f8960dc 100644 --- a/tests/arbitrary-variants.test.js +++ b/tests/arbitrary-variants.test.js @@ -845,6 +845,132 @@ crosscheck(({ stable, oxide }) => { }) }) + test('has-* variants with arbitrary values', () => { + let config = { + theme: {}, + content: [ + { + raw: html` +
+
+
+
+
+
+
+
+
+
+ `, + }, + ], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + .has-\[\.foo\:hover\]\:block:has(.foo:hover) { + display: block; + } + .has-\[figcaption\]\:inline-block:has(figcaption) { + display: inline-block; + } + .has-\[\[data-active\]\]\:inline:has([data-active]) { + display: inline; + } + .has-\[\.foo\]\:flex:has(.foo) { + display: flex; + } + .has-\[\>_\.potato\]\:table:has(> .potato) { + display: table; + } + .has-\[\+_h2\]\:grid:has(+ h2) { + display: grid; + } + .has-\[\>_h1_\+_h2\]\:contents:has(> h1 + h2) { + display: contents; + } + .has-\[h2\]\:has-\[\.banana\]\:hidden:has(.banana):has(h2) { + display: none; + } + `) + }) + }) + + test('group-has-* variants with arbitrary values', () => { + let config = { + theme: {}, + content: [ + { + raw: html` +
+
+
+
+
+
+ `, + }, + ], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + .group:has(> h1 + .foo) .group-has-\[\>_h1_\+_\.foo\]\:block { + display: block; + } + .group\/two:has(> h1 + .foo) .group-has-\[\>_h1_\+_\.foo\]\/two\:flex { + display: flex; + } + `) + }) + }) + + test('peer-has-* variants with arbitrary values', () => { + let config = { + theme: {}, + content: [ + { + raw: html` +
+
+
+
+
+
+
+
+ `, + }, + ], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind utilities; + ` + + return run(input, config).then((result) => { + expect(result.css).toMatchFormattedCss(css` + .peer:has(> h1 + .foo) ~ .peer-has-\[\>_h1_\+_\.foo\]\:block { + display: block; + } + .peer\/two:has(> h1 + .foo) ~ .peer-has-\[\>_h1_\+_\.foo\]\/two\:flex { + display: flex; + } + `) + }) + }) + it('should be possible to use modifiers and arbitrary groups', () => { let config = { content: [ From a38b946c62c53dd4a0745e610e7ea24e8e1644ff Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Tue, 30 May 2023 15:26:27 -0400 Subject: [PATCH 03/22] Add support for `text-wrap` property (#11320) Update changelog Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com> --- CHANGELOG.md | 1 + src/corePlugins.js | 8 ++++++++ tests/basic-usage.oxide.test.css | 9 +++++++++ tests/basic-usage.test.css | 9 +++++++++ tests/basic-usage.test.js | 1 + 5 files changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84ca401c6..3b2b99f9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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)) ## [3.3.6] - 2023-12-04 diff --git a/src/corePlugins.js b/src/corePlugins.js index b8bf04279..c8ee027b0 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -1529,6 +1529,14 @@ export let corePlugins = { }) }, + textWrap: ({ addUtilities }) => { + addUtilities({ + '.text-wrap': { 'text-wrap': 'wrap' }, + '.text-nowrap': { 'text-wrap': 'nowrap' }, + '.text-balance': { 'text-wrap': 'balance' }, + }) + }, + wordBreak: ({ addUtilities }) => { addUtilities({ '.break-normal': { 'overflow-wrap': 'normal', 'word-break': 'normal' }, diff --git a/tests/basic-usage.oxide.test.css b/tests/basic-usage.oxide.test.css index 455e672ee..6e2d6652d 100644 --- a/tests/basic-usage.oxide.test.css +++ b/tests/basic-usage.oxide.test.css @@ -593,6 +593,15 @@ .whitespace-nowrap { white-space: nowrap; } +.text-wrap { + text-wrap: wrap; +} +.text-nowrap { + text-wrap: nowrap; +} +.text-balance { + text-wrap: balance; +} .break-words { overflow-wrap: break-word; } diff --git a/tests/basic-usage.test.css b/tests/basic-usage.test.css index 8d1ba2da8..80c406bf6 100644 --- a/tests/basic-usage.test.css +++ b/tests/basic-usage.test.css @@ -597,6 +597,15 @@ .whitespace-nowrap { white-space: nowrap; } +.text-wrap { + text-wrap: wrap; +} +.text-nowrap { + text-wrap: nowrap; +} +.text-balance { + text-wrap: balance; +} .break-words { overflow-wrap: break-word; } diff --git a/tests/basic-usage.test.js b/tests/basic-usage.test.js index c8a560c3b..facc87ee2 100644 --- a/tests/basic-usage.test.js +++ b/tests/basic-usage.test.js @@ -193,6 +193,7 @@ crosscheck(({ stable, oxide, engine }) => {
+
From c726806a824c5dabd89a0f5e10e15ed2e2c4212f Mon Sep 17 00:00:00 2001 From: Yuhei Yasuda Date: Tue, 19 Sep 2023 21:49:20 +0900 Subject: [PATCH 04/22] 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 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b2b99f9e..ca1b943a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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)) ## [3.3.6] - 2023-12-04 diff --git a/src/corePlugins.js b/src/corePlugins.js index c8ee027b0..9cb62af58 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -1534,6 +1534,7 @@ export let corePlugins = { '.text-wrap': { 'text-wrap': 'wrap' }, '.text-nowrap': { 'text-wrap': 'nowrap' }, '.text-balance': { 'text-wrap': 'balance' }, + '.text-pretty': { 'text-wrap': 'pretty' }, }) }, From 9a8ef8d1ae544e3b7bfe2813f04587881a68808e Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Wed, 16 Aug 2023 11:44:14 -0400 Subject: [PATCH 05/22] Extend opacity scale to include all steps of 5 (#11832) * Extend opacity scale to include all steps of 5 * Update changelog --------- Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com> --- CHANGELOG.md | 1 + stubs/config.full.js | 6 ++++++ tests/getClassList.test.js | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca1b943a6..e228f098f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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` and `text-pretty` ([#11320](https://github.com/tailwindlabs/tailwindcss/pull/11320), [#12031](https://github.com/tailwindlabs/tailwindcss/pull/12031)) +- Extend default `opacity` scale to include all steps of 5 ([#11832](https://github.com/tailwindlabs/tailwindcss/pull/11832)) ## [3.3.6] - 2023-12-04 diff --git a/stubs/config.full.js b/stubs/config.full.js index ed0b5a986..11d1d0bd7 100644 --- a/stubs/config.full.js +++ b/stubs/config.full.js @@ -685,15 +685,21 @@ module.exports = { 0: '0', 5: '0.05', 10: '0.1', + 15: '0.15', 20: '0.2', 25: '0.25', 30: '0.3', + 35: '0.35', 40: '0.4', + 45: '0.45', 50: '0.5', + 55: '0.55', 60: '0.6', + 65: '0.65', 70: '0.7', 75: '0.75', 80: '0.8', + 85: '0.85', 90: '0.9', 95: '0.95', 100: '1', diff --git a/tests/getClassList.test.js b/tests/getClassList.test.js index 671a767ec..65ca7a074 100644 --- a/tests/getClassList.test.js +++ b/tests/getClassList.test.js @@ -97,15 +97,21 @@ crosscheck(() => { '0', '5', '10', + '15', '20', '25', '30', + '35', '40', + '45', '50', + '55', '60', + '65', '70', '75', '80', + '85', '90', '95', '100', From bbc401828515ebab32c46b3f5f3d51263d985e8e Mon Sep 17 00:00:00 2001 From: Brandon McConnell Date: Fri, 8 Sep 2023 08:46:57 -0700 Subject: [PATCH 06/22] Update Preflight `html` styles to include shadow DOM `:host` pseudo-class (#11200) * Extend current preflight `html` styles to support other root/host scopes Supports SVG root scope, ShadowDOM, and presumably other root scopes * Replace `:root` with `html` * Update tests * Update changelog --------- Co-authored-by: Jonathan Reinink --- CHANGELOG.md | 1 + src/css/preflight.css | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e228f098f..d3aeea290 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `has-*` variants for `:has(...)` pseudo-class ([#11318](https://github.com/tailwindlabs/tailwindcss/pull/11318)) - 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)) - 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)) ## [3.3.6] - 2023-12-04 diff --git a/src/css/preflight.css b/src/css/preflight.css index 8783e9b93..a3fcfc249 100644 --- a/src/css/preflight.css +++ b/src/css/preflight.css @@ -26,7 +26,8 @@ 6. Use the user's configured `sans` font-variation-settings by default. */ -html { +html, +:host { line-height: 1.5; /* 1 */ -webkit-text-size-adjust: 100%; /* 2 */ -moz-tab-size: 4; /* 3 */ From c54a8e7dbde4eca72c1176b82df7dbc4be825ad5 Mon Sep 17 00:00:00 2001 From: bandogora <26842354+bandogora@users.noreply.github.com> Date: Wed, 11 Oct 2023 21:00:22 -0400 Subject: [PATCH 07/22] Equal number of grid columns and rows (#12180) Update test snapshots --- stubs/config.full.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/stubs/config.full.js b/stubs/config.full.js index 11d1d0bd7..a4931114f 100644 --- a/stubs/config.full.js +++ b/stubs/config.full.js @@ -451,6 +451,12 @@ module.exports = { 'span-4': 'span 4 / span 4', 'span-5': 'span 5 / span 5', 'span-6': 'span 6 / span 6', + 'span-7': 'span 7 / span 7', + 'span-8': 'span 8 / span 8', + 'span-9': 'span 9 / span 9', + 'span-10': 'span 10 / span 10', + 'span-11': 'span 11 / span 11', + 'span-12': 'span 12 / span 12', 'span-full': '1 / -1', }, gridRowEnd: { @@ -462,6 +468,12 @@ module.exports = { 5: '5', 6: '6', 7: '7', + 8: '8', + 9: '9', + 10: '10', + 11: '11', + 12: '12', + 13: '13', }, gridRowStart: { auto: 'auto', @@ -472,6 +484,12 @@ module.exports = { 5: '5', 6: '6', 7: '7', + 8: '8', + 9: '9', + 10: '10', + 11: '11', + 12: '12', + 13: '13', }, gridTemplateColumns: { none: 'none', @@ -496,6 +514,12 @@ module.exports = { 4: 'repeat(4, minmax(0, 1fr))', 5: 'repeat(5, minmax(0, 1fr))', 6: 'repeat(6, minmax(0, 1fr))', + 7: 'repeat(7, minmax(0, 1fr))', + 8: 'repeat(8, minmax(0, 1fr))', + 9: 'repeat(9, minmax(0, 1fr))', + 10: 'repeat(10, minmax(0, 1fr))', + 11: 'repeat(11, minmax(0, 1fr))', + 12: 'repeat(12, minmax(0, 1fr))', }, height: ({ theme }) => ({ auto: 'auto', From 81c8a0cccc460bdfc3b42b4242b7ad0d4fbc126a Mon Sep 17 00:00:00 2001 From: Adam Wathan <4323180+adamwathan@users.noreply.github.com> Date: Wed, 11 Oct 2023 21:01:50 -0400 Subject: [PATCH 08/22] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3aeea290..24c79eda9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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)) - 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)) +- Increase default values for `grid-rows-*` utilities from 1–6 to 1–12 ([#12180](https://github.com/tailwindlabs/tailwindcss/pull/12180)) ## [3.3.6] - 2023-12-04 From 075665351f6491ca4744f23561fe6df86a5f3b62 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Mon, 4 Dec 2023 15:13:57 -0500 Subject: [PATCH 09/22] Add `size-*` shorthand (#12287) * Add `size-*` shorthand Add plugin tests Adjust options wip * Update changelog --- CHANGELOG.md | 1 + src/corePlugins.js | 2 ++ stubs/config.full.js | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24c79eda9..ae305c5fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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)) - 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)) ## [3.3.6] - 2023-12-04 diff --git a/src/corePlugins.js b/src/corePlugins.js index 9cb62af58..8f296bb0f 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -779,6 +779,8 @@ export let corePlugins = { aspectRatio: createUtilityPlugin('aspectRatio', [['aspect', ['aspect-ratio']]]), + size: createUtilityPlugin('size', [['size', ['width', 'height']]]), + height: createUtilityPlugin('height', [['h', ['height']]]), maxHeight: createUtilityPlugin('maxHeight', [['max-h', ['maxHeight']]]), minHeight: createUtilityPlugin('minHeight', [['min-h', ['minHeight']]]), diff --git a/stubs/config.full.js b/stubs/config.full.js index a4931114f..2e78294ab 100644 --- a/stubs/config.full.js +++ b/stubs/config.full.js @@ -975,6 +975,40 @@ module.exports = { '3/4': '75%', full: '100%', }), + size: ({ theme }) => ({ + auto: 'auto', + ...theme('spacing'), + '1/2': '50%', + '1/3': '33.333333%', + '2/3': '66.666667%', + '1/4': '25%', + '2/4': '50%', + '3/4': '75%', + '1/5': '20%', + '2/5': '40%', + '3/5': '60%', + '4/5': '80%', + '1/6': '16.666667%', + '2/6': '33.333333%', + '3/6': '50%', + '4/6': '66.666667%', + '5/6': '83.333333%', + '1/12': '8.333333%', + '2/12': '16.666667%', + '3/12': '25%', + '4/12': '33.333333%', + '5/12': '41.666667%', + '6/12': '50%', + '7/12': '58.333333%', + '8/12': '66.666667%', + '9/12': '75%', + '10/12': '83.333333%', + '11/12': '91.666667%', + full: '100%', + min: 'min-content', + max: 'max-content', + fit: 'fit-content', + }), width: ({ theme }) => ({ auto: 'auto', ...theme('spacing'), From 08916a5aa65c83a077aee530ecaf7775eba180d0 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Thu, 26 Oct 2023 12:52:39 -0400 Subject: [PATCH 10/22] Add subgrid utilities (#12298) * Add subgrid utilities * Update CHANGELOG --------- Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com> --- CHANGELOG.md | 1 + stubs/config.full.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae305c5fa..e09437be4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update Preflight `html` styles to include shadow DOM `:host` pseudo-class ([#11200](https://github.com/tailwindlabs/tailwindcss/pull/11200)) - 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)) ## [3.3.6] - 2023-12-04 diff --git a/stubs/config.full.js b/stubs/config.full.js index 2e78294ab..dc864644c 100644 --- a/stubs/config.full.js +++ b/stubs/config.full.js @@ -493,6 +493,7 @@ module.exports = { }, gridTemplateColumns: { none: 'none', + subgrid: 'subgrid', 1: 'repeat(1, minmax(0, 1fr))', 2: 'repeat(2, minmax(0, 1fr))', 3: 'repeat(3, minmax(0, 1fr))', @@ -508,6 +509,7 @@ module.exports = { }, gridTemplateRows: { none: 'none', + subgrid: 'subgrid', 1: 'repeat(1, minmax(0, 1fr))', 2: 'repeat(2, minmax(0, 1fr))', 3: 'repeat(3, minmax(0, 1fr))', From 79e92de68e5c22983c3bb9226a11cdcd135e8bdc Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Thu, 26 Oct 2023 14:14:43 -0400 Subject: [PATCH 11/22] 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 e09437be4..d9c28895a 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 dc864644c..e1578c6e7 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', From 5cb0c3dcce987d051d712f81aeb96b8fcceab2b7 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Thu, 2 Nov 2023 16:48:11 +0000 Subject: [PATCH 12/22] Add `forced-color-adjust` utilities (#11931) * Add forced-colors-adjust utilities * Update forcedColorsAdjust.test.js * use `toMatchSnapshot` instead of `toMatchFormattedCss` More info: https://github.com/tailwindlabs/tailwindcss/pull/12170 * rename `forced-colors-adjust` -> `forced-color-adjust` Dropped the `s` in `colors`. * update changelog * fix typo * use full `forced-color-adjust-auto` and `forced-color-adjust-none` names --------- Co-authored-by: Robin Malfait --- CHANGELOG.md | 1 + src/corePlugins.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9c28895a..40796f139 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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)) +- Add `forced-color-adjust` utilities ([#11931](https://github.com/tailwindlabs/tailwindcss/pull/11931)) ## [3.3.6] - 2023-12-04 diff --git a/src/corePlugins.js b/src/corePlugins.js index 8f296bb0f..7f4aa6a9c 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -2883,4 +2883,10 @@ export let corePlugins = { content: createUtilityPlugin('content', [ ['content', ['--tw-content', ['content', 'var(--tw-content)']]], ]), + forcedColorAdjust: ({ addUtilities }) => { + addUtilities({ + '.forced-color-adjust-auto': { 'forced-color-adjust': 'auto' }, + '.forced-color-adjust-none': { 'forced-color-adjust': 'none' }, + }) + }, } From 02fb5df775ee00ac5a13dce03d8c2941b9b05ef4 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Thu, 2 Nov 2023 19:28:50 +0000 Subject: [PATCH 13/22] Add `forced-colors` variant (#11694) * Add forced-colors variant Also add a contrast-custom variant to match custom contrast preferences * use `toMatchSnapshot` instead of `toMatchFormattedCss` More info: https://github.com/tailwindlabs/tailwindcss/pull/12170 * remove `contrast-custom` variant * move `forcedColorsVariants` next to `prefersContrastVariants` * update changelog --------- Co-authored-by: Robin Malfait --- CHANGELOG.md | 1 + src/corePlugins.js | 4 ++++ src/lib/setupContextUtils.js | 1 + 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40796f139..8d60c3e1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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)) - Add `forced-color-adjust` utilities ([#11931](https://github.com/tailwindlabs/tailwindcss/pull/11931)) +- Add `forced-colors` variant ([#11694](https://github.com/tailwindlabs/tailwindcss/pull/11694)) ## [3.3.6] - 2023-12-04 diff --git a/src/corePlugins.js b/src/corePlugins.js index 7f4aa6a9c..9e7eb9b70 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -461,6 +461,10 @@ export let variantPlugins = { addVariant('contrast-more', '@media (prefers-contrast: more)') addVariant('contrast-less', '@media (prefers-contrast: less)') }, + + forcedColorsVariants: ({ addVariant }) => { + addVariant('forced-colors', '@media (forced-colors: active)') + }, } let cssTransformValue = [ diff --git a/src/lib/setupContextUtils.js b/src/lib/setupContextUtils.js index 4fc8468a4..28991dc83 100644 --- a/src/lib/setupContextUtils.js +++ b/src/lib/setupContextUtils.js @@ -767,6 +767,7 @@ function resolvePlugins(context, root) { variantPlugins['directionVariants'], variantPlugins['reducedMotionVariants'], variantPlugins['prefersContrastVariants'], + variantPlugins['forcedColorsVariants'], variantPlugins['darkVariants'], variantPlugins['printVariant'], variantPlugins['screenVariants'], From 05965b7da02aa3738ec4aa33207f1aeb7b4492fa Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Sun, 12 Nov 2023 11:22:35 -0500 Subject: [PATCH 14/22] Add `appearance-auto` utility (#12404) * Add `appearance-auto` utility * Update CHANGELOG --------- Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com> --- CHANGELOG.md | 1 + src/corePlugins.js | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d60c3e1a..ad4a42449 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add spacing scale to `min-w-*`, `min-h-*`, and `max-w-*` utilities ([#12300](https://github.com/tailwindlabs/tailwindcss/pull/12300)) - Add `forced-color-adjust` utilities ([#11931](https://github.com/tailwindlabs/tailwindcss/pull/11931)) - Add `forced-colors` variant ([#11694](https://github.com/tailwindlabs/tailwindcss/pull/11694)) +- Add `appearance-none` utility ([#12404](https://github.com/tailwindlabs/tailwindcss/pull/12404)) ## [3.3.6] - 2023-12-04 diff --git a/src/corePlugins.js b/src/corePlugins.js index 9e7eb9b70..a54c709c8 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -1135,6 +1135,7 @@ export let corePlugins = { appearance: ({ addUtilities }) => { addUtilities({ '.appearance-none': { appearance: 'none' }, + '.appearance-auto': { appearance: 'auto' }, }) }, From 82f72949652c56dfc1b591feeb315c7bfbe7da81 Mon Sep 17 00:00:00 2001 From: Adam Wathan <4323180+adamwathan@users.noreply.github.com> Date: Fri, 17 Nov 2023 12:12:24 -0500 Subject: [PATCH 15/22] Fix typo in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad4a42449..fa1052f51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add spacing scale to `min-w-*`, `min-h-*`, and `max-w-*` utilities ([#12300](https://github.com/tailwindlabs/tailwindcss/pull/12300)) - Add `forced-color-adjust` utilities ([#11931](https://github.com/tailwindlabs/tailwindcss/pull/11931)) - Add `forced-colors` variant ([#11694](https://github.com/tailwindlabs/tailwindcss/pull/11694)) -- Add `appearance-none` utility ([#12404](https://github.com/tailwindlabs/tailwindcss/pull/12404)) +- Add `appearance-auto` utility ([#12404](https://github.com/tailwindlabs/tailwindcss/pull/12404)) ## [3.3.6] - 2023-12-04 From 736f2f1b424e0690b30e352f0c6192a4c8d9977d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ng=C3=B4=20Qu=E1=BB=91c=20=C4=90=E1=BA=A1t?= Date: Mon, 27 Nov 2023 21:12:58 +0700 Subject: [PATCH 16/22] Add logical properties support for float and clear (#12480) --- src/corePlugins.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corePlugins.js b/src/corePlugins.js index a54c709c8..76443f554 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -690,6 +690,8 @@ export let corePlugins = { float: ({ addUtilities }) => { addUtilities({ + '.float-start': { float: 'inline-start' }, + '.float-end': { float: 'inline-end' }, '.float-right': { float: 'right' }, '.float-left': { float: 'left' }, '.float-none': { float: 'none' }, @@ -698,6 +700,8 @@ export let corePlugins = { clear: ({ addUtilities }) => { addUtilities({ + '.clear-start': { clear: 'inline-start' }, + '.clear-end': { clear: 'inline-end' }, '.clear-left': { clear: 'left' }, '.clear-right': { clear: 'right' }, '.clear-both': { clear: 'both' }, From 394f6e9e97d8fc39434ea4e4ebf00e0c59abf1e1 Mon Sep 17 00:00:00 2001 From: Adam Wathan <4323180+adamwathan@users.noreply.github.com> Date: Mon, 27 Nov 2023 09:13:56 -0500 Subject: [PATCH 17/22] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa1052f51..3e4607230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `forced-color-adjust` utilities ([#11931](https://github.com/tailwindlabs/tailwindcss/pull/11931)) - Add `forced-colors` variant ([#11694](https://github.com/tailwindlabs/tailwindcss/pull/11694)) - Add `appearance-auto` utility ([#12404](https://github.com/tailwindlabs/tailwindcss/pull/12404)) +- Add logical property values for `float` and `clear` utilities ([#12480](https://github.com/tailwindlabs/tailwindcss/pull/12480)) ## [3.3.6] - 2023-12-04 From d0d2ba15f19c939d08b8bb84dd39ce8fcf004981 Mon Sep 17 00:00:00 2001 From: Emilia Date: Tue, 8 Aug 2023 06:26:30 -0400 Subject: [PATCH 18/22] feat(preflight): simplify sans-serif font stack (#11748) * feat(preflight): simplify sans-serif font stack `-apple-system` and `BlinkMacSystemFont` were historically needed for IE11 and chakra-based Edge (The one that wasn't chromium-based). https://caniuse.com/font-family-system-ui has more details around it. * further simplify `font-family` * update tests * update changelog --------- Co-authored-by: Robin Malfait --- CHANGELOG.md | 4 + src/css/preflight.css | 2 +- stubs/config.full.js | 7 - tests/basic-usage.oxide.test.css | 5 +- tests/basic-usage.test.css | 5 +- tests/kitchen-sink.test.js | 6 +- tests/raw-content.oxide.test.css | 5 +- tests/raw-content.test.css | 5 +- tests/resolveConfig.test.js | 4 +- tests/source-maps.test.js | 574 +++++++++++++++---------------- 10 files changed, 304 insertions(+), 313 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e4607230..502df72ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add `appearance-auto` utility ([#12404](https://github.com/tailwindlabs/tailwindcss/pull/12404)) - Add logical property values for `float` and `clear` utilities ([#12480](https://github.com/tailwindlabs/tailwindcss/pull/12480)) +### Changed + +- Simplify the `sans` font-family stack ([#11748](https://github.com/tailwindlabs/tailwindcss/pull/11748)) + ## [3.3.6] - 2023-12-04 ### Fixed diff --git a/src/css/preflight.css b/src/css/preflight.css index a3fcfc249..42d2c65cf 100644 --- a/src/css/preflight.css +++ b/src/css/preflight.css @@ -32,7 +32,7 @@ html, -webkit-text-size-adjust: 100%; /* 2 */ -moz-tab-size: 4; /* 3 */ tab-size: 4; /* 3 */ - font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */ + font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */ font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */ font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */ } diff --git a/stubs/config.full.js b/stubs/config.full.js index e1578c6e7..8eddd4898 100644 --- a/stubs/config.full.js +++ b/stubs/config.full.js @@ -303,13 +303,6 @@ module.exports = { sans: [ 'ui-sans-serif', 'system-ui', - '-apple-system', - 'BlinkMacSystemFont', - '"Segoe UI"', - 'Roboto', - '"Helvetica Neue"', - 'Arial', - '"Noto Sans"', 'sans-serif', '"Apple Color Emoji"', '"Segoe UI Emoji"', diff --git a/tests/basic-usage.oxide.test.css b/tests/basic-usage.oxide.test.css index 6e2d6652d..2c102b7a3 100644 --- a/tests/basic-usage.oxide.test.css +++ b/tests/basic-usage.oxide.test.css @@ -767,9 +767,8 @@ vertical-align: middle; } .font-sans { - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, - Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, - Noto Color Emoji; + font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, + Segoe UI Symbol, Noto Color Emoji; } .text-2xl { font-size: 1.5rem; diff --git a/tests/basic-usage.test.css b/tests/basic-usage.test.css index 80c406bf6..17600764a 100644 --- a/tests/basic-usage.test.css +++ b/tests/basic-usage.test.css @@ -785,9 +785,8 @@ vertical-align: middle; } .font-sans { - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, - Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, - Noto Color Emoji; + font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, + Segoe UI Symbol, Noto Color Emoji; } .text-2xl { font-size: 1.5rem; diff --git a/tests/kitchen-sink.test.js b/tests/kitchen-sink.test.js index 3b02c8966..5923de27e 100644 --- a/tests/kitchen-sink.test.js +++ b/tests/kitchen-sink.test.js @@ -240,8 +240,7 @@ crosscheck(({ stable, oxide }) => { stable.expect(result.css).toMatchFormattedCss(css` .theme-test { color: #3b82f6; - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, - Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, + font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji; } @media (min-width: 1024px) { @@ -813,8 +812,7 @@ crosscheck(({ stable, oxide }) => { oxide.expect(result.css).toMatchFormattedCss(css` .theme-test { color: #3b82f6; - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, - Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, + font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji; } @media (min-width: 1024px) { diff --git a/tests/raw-content.oxide.test.css b/tests/raw-content.oxide.test.css index aa5abd127..3408975df 100644 --- a/tests/raw-content.oxide.test.css +++ b/tests/raw-content.oxide.test.css @@ -512,9 +512,8 @@ vertical-align: middle; } .font-sans { - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, - Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, - Noto Color Emoji; + font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, + Segoe UI Symbol, Noto Color Emoji; } .text-2xl { font-size: 1.5rem; diff --git a/tests/raw-content.test.css b/tests/raw-content.test.css index dba9f3194..a6be31fd0 100644 --- a/tests/raw-content.test.css +++ b/tests/raw-content.test.css @@ -524,9 +524,8 @@ vertical-align: middle; } .font-sans { - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, - Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, - Noto Color Emoji; + font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, + Segoe UI Symbol, Noto Color Emoji; } .text-2xl { font-size: 1.5rem; diff --git a/tests/resolveConfig.test.js b/tests/resolveConfig.test.js index c99a986de..69a62bba5 100644 --- a/tests/resolveConfig.test.js +++ b/tests/resolveConfig.test.js @@ -150,7 +150,7 @@ crosscheck(() => { 'grey-lighter': '#f1f5f8', }, fonts: { - sans: ['system-ui', 'BlinkMacSystemFont', '-apple-system', 'Roboto', 'sans-serif'], + sans: ['system-ui', 'Roboto', 'sans-serif'], serif: ['Constantia', 'Lucida Bright', 'Georgia', 'serif'], }, screens: { @@ -176,7 +176,7 @@ crosscheck(() => { 'grey-lighter': '#f1f5f8', }, fonts: { - sans: ['system-ui', 'BlinkMacSystemFont', '-apple-system', 'Roboto', 'sans-serif'], + sans: ['system-ui', 'Roboto', 'sans-serif'], serif: ['Constantia', 'Lucida Bright', 'Georgia', 'serif'], }, screens: { diff --git a/tests/source-maps.test.js b/tests/source-maps.test.js index 75bfd84fc..e783137a6 100644 --- a/tests/source-maps.test.js +++ b/tests/source-maps.test.js @@ -100,307 +100,307 @@ crosscheck(({ stable, oxide }) => { '2:6 -> 22:0', '2:20 -> 29:1', '2:6 -> 31:0', - '2:6-20 -> 32:2-26', - '2:6-20 -> 33:2-40', - '2:6-20 -> 34:2-26', - '2:6-20 -> 35:2-21', - '2:6-20 -> 36:2-230', - '2:6-20 -> 37:2-39', - '2:6-20 -> 38:2-41', - '2:20 -> 39:0', - '2:6 -> 41:0', - '2:20 -> 44:1', - '2:6 -> 46:0', - '2:6-20 -> 47:2-19', - '2:6-20 -> 48:2-30', - '2:20 -> 49:0', - '2:6 -> 51:0', - '2:20 -> 55:1', - '2:6 -> 57:0', - '2:6-20 -> 58:2-19', - '2:6-20 -> 59:2-24', - '2:6-20 -> 60:2-31', - '2:20 -> 61:0', - '2:6 -> 63:0', - '2:20 -> 65:1', - '2:6 -> 67:0', - '2:6-20 -> 68:2-35', - '2:20 -> 69:0', - '2:6 -> 71:0', - '2:20 -> 73:1', - '2:6 -> 75:0', - '2:6-20 -> 81:2-20', - '2:6-20 -> 82:2-22', - '2:20 -> 83:0', - '2:6 -> 85:0', - '2:20 -> 87:1', - '2:6 -> 89:0', - '2:6-20 -> 90:2-16', - '2:6-20 -> 91:2-26', - '2:20 -> 92:0', - '2:6 -> 94:0', - '2:20 -> 96:1', - '2:6 -> 98:0', - '2:6-20 -> 100:2-21', - '2:20 -> 101:0', - '2:6 -> 103:0', - '2:20 -> 108:1', - '2:6 -> 110:0', - '2:6-20 -> 114:2-121', - '2:6-20 -> 115:2-39', - '2:6-20 -> 116:2-41', - '2:6-20 -> 117:2-24', - '2:20 -> 118:0', - '2:6 -> 120:0', - '2:20 -> 122:1', - '2:6 -> 124:0', - '2:6-20 -> 125:2-16', - '2:20 -> 126:0', - '2:6 -> 128:0', - '2:20 -> 130:1', - '2:6 -> 132:0', - '2:6-20 -> 134:2-16', + '2:6-20 -> 33:2-26', + '2:6-20 -> 34:2-40', + '2:6-20 -> 35:2-26', + '2:6-20 -> 36:2-21', + '2:6-20 -> 37:2-137', + '2:6-20 -> 38:2-39', + '2:6-20 -> 39:2-41', + '2:20 -> 40:0', + '2:6 -> 42:0', + '2:20 -> 45:1', + '2:6 -> 47:0', + '2:6-20 -> 48:2-19', + '2:6-20 -> 49:2-30', + '2:20 -> 50:0', + '2:6 -> 52:0', + '2:20 -> 56:1', + '2:6 -> 58:0', + '2:6-20 -> 59:2-19', + '2:6-20 -> 60:2-24', + '2:6-20 -> 61:2-31', + '2:20 -> 62:0', + '2:6 -> 64:0', + '2:20 -> 66:1', + '2:6 -> 68:0', + '2:6-20 -> 69:2-35', + '2:20 -> 70:0', + '2:6 -> 72:0', + '2:20 -> 74:1', + '2:6 -> 76:0', + '2:6-20 -> 82:2-20', + '2:6-20 -> 83:2-22', + '2:20 -> 84:0', + '2:6 -> 86:0', + '2:20 -> 88:1', + '2:6 -> 90:0', + '2:6-20 -> 91:2-16', + '2:6-20 -> 92:2-26', + '2:20 -> 93:0', + '2:6 -> 95:0', + '2:20 -> 97:1', + '2:6 -> 99:0', + '2:6-20 -> 101:2-21', + '2:20 -> 102:0', + '2:6 -> 104:0', + '2:20 -> 109:1', + '2:6 -> 111:0', + '2:6-20 -> 115:2-121', + '2:6-20 -> 116:2-39', + '2:6-20 -> 117:2-41', + '2:6-20 -> 118:2-24', + '2:20 -> 119:0', + '2:6 -> 121:0', + '2:20 -> 123:1', + '2:6 -> 125:0', + '2:6-20 -> 126:2-16', + '2:20 -> 127:0', + '2:6 -> 129:0', + '2:20 -> 131:1', + '2:6 -> 133:0', '2:6-20 -> 135:2-16', - '2:6-20 -> 136:2-20', - '2:6-20 -> 137:2-26', - '2:20 -> 138:0', - '2:6 -> 140:0', - '2:6-20 -> 141:2-17', - '2:20 -> 142:0', - '2:6 -> 144:0', - '2:6-20 -> 145:2-13', - '2:20 -> 146:0', - '2:6 -> 148:0', - '2:20 -> 152:1', - '2:6 -> 154:0', - '2:6-20 -> 155:2-24', - '2:6-20 -> 156:2-31', - '2:6-20 -> 157:2-35', - '2:20 -> 158:0', - '2:6 -> 160:0', - '2:20 -> 164:1', - '2:6 -> 166:0', - '2:6-20 -> 171:2-30', - '2:6-20 -> 172:2-40', - '2:6-20 -> 173:2-42', - '2:6-20 -> 174:2-25', - '2:6-20 -> 175:2-30', + '2:6-20 -> 136:2-16', + '2:6-20 -> 137:2-20', + '2:6-20 -> 138:2-26', + '2:20 -> 139:0', + '2:6 -> 141:0', + '2:6-20 -> 142:2-17', + '2:20 -> 143:0', + '2:6 -> 145:0', + '2:6-20 -> 146:2-13', + '2:20 -> 147:0', + '2:6 -> 149:0', + '2:20 -> 153:1', + '2:6 -> 155:0', + '2:6-20 -> 156:2-24', + '2:6-20 -> 157:2-31', + '2:6-20 -> 158:2-35', + '2:20 -> 159:0', + '2:6 -> 161:0', + '2:20 -> 165:1', + '2:6 -> 167:0', + '2:6-20 -> 172:2-30', + '2:6-20 -> 173:2-40', + '2:6-20 -> 174:2-42', + '2:6-20 -> 175:2-25', '2:6-20 -> 176:2-30', - '2:6-20 -> 177:2-24', - '2:6-20 -> 178:2-19', - '2:6-20 -> 179:2-20', - '2:20 -> 180:0', - '2:6 -> 182:0', - '2:20 -> 184:1', - '2:6 -> 186:0', - '2:6-20 -> 188:2-22', - '2:20 -> 189:0', - '2:6 -> 191:0', - '2:20 -> 194:1', - '2:6 -> 196:0', - '2:6-20 -> 200:2-36', - '2:6-20 -> 201:2-39', - '2:6-20 -> 202:2-32', - '2:20 -> 203:0', - '2:6 -> 205:0', - '2:20 -> 207:1', - '2:6 -> 209:0', - '2:6-20 -> 210:2-15', - '2:20 -> 211:0', - '2:6 -> 213:0', - '2:20 -> 215:1', - '2:6 -> 217:0', - '2:6-20 -> 218:2-18', - '2:20 -> 219:0', - '2:6 -> 221:0', - '2:20 -> 223:1', - '2:6 -> 225:0', - '2:6-20 -> 226:2-26', - '2:20 -> 227:0', - '2:6 -> 229:0', - '2:20 -> 231:1', - '2:6 -> 233:0', - '2:6-20 -> 235:2-14', - '2:20 -> 236:0', - '2:6 -> 238:0', - '2:20 -> 241:1', - '2:6 -> 243:0', - '2:6-20 -> 244:2-39', - '2:6-20 -> 245:2-30', - '2:20 -> 246:0', - '2:6 -> 248:0', - '2:20 -> 250:1', - '2:6 -> 252:0', - '2:6-20 -> 253:2-26', - '2:20 -> 254:0', - '2:6 -> 256:0', - '2:20 -> 259:1', - '2:6 -> 261:0', - '2:6-20 -> 262:2-36', - '2:6-20 -> 263:2-23', - '2:20 -> 264:0', - '2:6 -> 266:0', - '2:20 -> 268:1', - '2:6 -> 270:0', - '2:6-20 -> 271:2-20', - '2:20 -> 272:0', - '2:6 -> 274:0', - '2:20 -> 276:1', - '2:6 -> 278:0', - '2:6-20 -> 291:2-11', - '2:20 -> 292:0', - '2:6 -> 294:0', - '2:6-20 -> 295:2-11', - '2:6-20 -> 296:2-12', - '2:20 -> 297:0', - '2:6 -> 299:0', - '2:6-20 -> 300:2-12', - '2:20 -> 301:0', - '2:6 -> 303:0', - '2:6-20 -> 306:2-18', - '2:6-20 -> 307:2-11', - '2:6-20 -> 308:2-12', - '2:20 -> 309:0', - '2:6 -> 311:0', - '2:20 -> 313:1', - '2:6 -> 314:0', - '2:6-20 -> 315:2-12', - '2:20 -> 316:0', - '2:6 -> 318:0', - '2:20 -> 320:1', - '2:6 -> 322:0', - '2:6-20 -> 323:2-18', - '2:20 -> 324:0', - '2:6 -> 326:0', - '2:20 -> 329:1', - '2:6 -> 331:0', - '2:6-20 -> 333:2-20', - '2:6-20 -> 334:2-24', - '2:20 -> 335:0', - '2:6 -> 337:0', - '2:20 -> 339:1', - '2:6 -> 341:0', - '2:6-20 -> 343:2-17', - '2:20 -> 344:0', - '2:6 -> 346:0', - '2:20 -> 348:1', - '2:6 -> 349:0', - '2:6-20 -> 350:2-17', - '2:20 -> 351:0', - '2:6 -> 353:0', - '2:20 -> 357:1', - '2:6 -> 359:0', - '2:6-20 -> 367:2-24', - '2:6-20 -> 368:2-32', - '2:20 -> 369:0', - '2:6 -> 371:0', - '2:20 -> 373:1', - '2:6 -> 375:0', - '2:6-20 -> 377:2-17', - '2:6-20 -> 378:2-14', - '2:20 -> 379:0', - '2:6-20 -> 381:0-72', - '2:6 -> 382:0', - '2:6-20 -> 383:2-15', - '2:20 -> 384:0', - '2:6 -> 386:0', - '2:6-20 -> 387:2-26', + '2:6-20 -> 177:2-30', + '2:6-20 -> 178:2-24', + '2:6-20 -> 179:2-19', + '2:6-20 -> 180:2-20', + '2:20 -> 181:0', + '2:6 -> 183:0', + '2:20 -> 185:1', + '2:6 -> 187:0', + '2:6-20 -> 189:2-22', + '2:20 -> 190:0', + '2:6 -> 192:0', + '2:20 -> 195:1', + '2:6 -> 197:0', + '2:6-20 -> 201:2-36', + '2:6-20 -> 202:2-39', + '2:6-20 -> 203:2-32', + '2:20 -> 204:0', + '2:6 -> 206:0', + '2:20 -> 208:1', + '2:6 -> 210:0', + '2:6-20 -> 211:2-15', + '2:20 -> 212:0', + '2:6 -> 214:0', + '2:20 -> 216:1', + '2:6 -> 218:0', + '2:6-20 -> 219:2-18', + '2:20 -> 220:0', + '2:6 -> 222:0', + '2:20 -> 224:1', + '2:6 -> 226:0', + '2:6-20 -> 227:2-26', + '2:20 -> 228:0', + '2:6 -> 230:0', + '2:20 -> 232:1', + '2:6 -> 234:0', + '2:6-20 -> 236:2-14', + '2:20 -> 237:0', + '2:6 -> 239:0', + '2:20 -> 242:1', + '2:6 -> 244:0', + '2:6-20 -> 245:2-39', + '2:6-20 -> 246:2-30', + '2:20 -> 247:0', + '2:6 -> 249:0', + '2:20 -> 251:1', + '2:6 -> 253:0', + '2:6-20 -> 254:2-26', + '2:20 -> 255:0', + '2:6 -> 257:0', + '2:20 -> 260:1', + '2:6 -> 262:0', + '2:6-20 -> 263:2-36', + '2:6-20 -> 264:2-23', + '2:20 -> 265:0', + '2:6 -> 267:0', + '2:20 -> 269:1', + '2:6 -> 271:0', + '2:6-20 -> 272:2-20', + '2:20 -> 273:0', + '2:6 -> 275:0', + '2:20 -> 277:1', + '2:6 -> 279:0', + '2:6-20 -> 292:2-11', + '2:20 -> 293:0', + '2:6 -> 295:0', + '2:6-20 -> 296:2-11', + '2:6-20 -> 297:2-12', + '2:20 -> 298:0', + '2:6 -> 300:0', + '2:6-20 -> 301:2-12', + '2:20 -> 302:0', + '2:6 -> 304:0', + '2:6-20 -> 307:2-18', + '2:6-20 -> 308:2-11', + '2:6-20 -> 309:2-12', + '2:20 -> 310:0', + '2:6 -> 312:0', + '2:20 -> 314:1', + '2:6 -> 315:0', + '2:6-20 -> 316:2-12', + '2:20 -> 317:0', + '2:6 -> 319:0', + '2:20 -> 321:1', + '2:6 -> 323:0', + '2:6-20 -> 324:2-18', + '2:20 -> 325:0', + '2:6 -> 327:0', + '2:20 -> 330:1', + '2:6 -> 332:0', + '2:6-20 -> 334:2-20', + '2:6-20 -> 335:2-24', + '2:20 -> 336:0', + '2:6 -> 338:0', + '2:20 -> 340:1', + '2:6 -> 342:0', + '2:6-20 -> 344:2-17', + '2:20 -> 345:0', + '2:6 -> 347:0', + '2:20 -> 349:1', + '2:6 -> 350:0', + '2:6-20 -> 351:2-17', + '2:20 -> 352:0', + '2:6 -> 354:0', + '2:20 -> 358:1', + '2:6 -> 360:0', + '2:6-20 -> 368:2-24', + '2:6-20 -> 369:2-32', + '2:20 -> 370:0', + '2:6 -> 372:0', + '2:20 -> 374:1', + '2:6 -> 376:0', + '2:6-20 -> 378:2-17', + '2:6-20 -> 379:2-14', + '2:20 -> 380:0', + '2:6-20 -> 382:0-72', + '2:6 -> 383:0', + '2:6-20 -> 384:2-15', + '2:20 -> 385:0', + '2:6 -> 387:0', '2:6-20 -> 388:2-26', - '2:6-20 -> 389:2-21', + '2:6-20 -> 389:2-26', '2:6-20 -> 390:2-21', - '2:6-20 -> 391:2-16', + '2:6-20 -> 391:2-21', '2:6-20 -> 392:2-16', '2:6-20 -> 393:2-16', - '2:6-20 -> 394:2-17', + '2:6-20 -> 394:2-16', '2:6-20 -> 395:2-17', - '2:6-20 -> 396:2-15', + '2:6-20 -> 396:2-17', '2:6-20 -> 397:2-15', - '2:6-20 -> 398:2-20', - '2:6-20 -> 399:2-40', - '2:6-20 -> 400:2-32', - '2:6-20 -> 401:2-31', - '2:6-20 -> 402:2-30', - '2:6-20 -> 403:2-17', - '2:6-20 -> 404:2-22', - '2:6-20 -> 405:2-24', - '2:6-20 -> 406:2-25', - '2:6-20 -> 407:2-26', - '2:6-20 -> 408:2-20', - '2:6-20 -> 409:2-29', - '2:6-20 -> 410:2-30', - '2:6-20 -> 411:2-40', - '2:6-20 -> 412:2-36', - '2:6-20 -> 413:2-29', - '2:6-20 -> 414:2-24', - '2:6-20 -> 415:2-32', - '2:6-20 -> 416:2-14', - '2:6-20 -> 417:2-20', - '2:6-20 -> 418:2-18', - '2:6-20 -> 419:2-19', - '2:6-20 -> 420:2-20', - '2:6-20 -> 421:2-16', - '2:6-20 -> 422:2-18', - '2:6-20 -> 423:2-15', - '2:6-20 -> 424:2-21', - '2:6-20 -> 425:2-23', - '2:6-20 -> 426:2-29', - '2:6-20 -> 427:2-27', - '2:6-20 -> 428:2-28', - '2:6-20 -> 429:2-29', - '2:6-20 -> 430:2-25', - '2:6-20 -> 431:2-26', - '2:6-20 -> 432:2-27', - '2:6 -> 433:2', - '2:20 -> 434:0', - '2:6 -> 436:0', - '2:6-20 -> 437:2-26', + '2:6-20 -> 398:2-15', + '2:6-20 -> 399:2-20', + '2:6-20 -> 400:2-40', + '2:6-20 -> 401:2-32', + '2:6-20 -> 402:2-31', + '2:6-20 -> 403:2-30', + '2:6-20 -> 404:2-17', + '2:6-20 -> 405:2-22', + '2:6-20 -> 406:2-24', + '2:6-20 -> 407:2-25', + '2:6-20 -> 408:2-26', + '2:6-20 -> 409:2-20', + '2:6-20 -> 410:2-29', + '2:6-20 -> 411:2-30', + '2:6-20 -> 412:2-40', + '2:6-20 -> 413:2-36', + '2:6-20 -> 414:2-29', + '2:6-20 -> 415:2-24', + '2:6-20 -> 416:2-32', + '2:6-20 -> 417:2-14', + '2:6-20 -> 418:2-20', + '2:6-20 -> 419:2-18', + '2:6-20 -> 420:2-19', + '2:6-20 -> 421:2-20', + '2:6-20 -> 422:2-16', + '2:6-20 -> 423:2-18', + '2:6-20 -> 424:2-15', + '2:6-20 -> 425:2-21', + '2:6-20 -> 426:2-23', + '2:6-20 -> 427:2-29', + '2:6-20 -> 428:2-27', + '2:6-20 -> 429:2-28', + '2:6-20 -> 430:2-29', + '2:6-20 -> 431:2-25', + '2:6-20 -> 432:2-26', + '2:6-20 -> 433:2-27', + '2:6 -> 434:2', + '2:20 -> 435:0', + '2:6 -> 437:0', '2:6-20 -> 438:2-26', - '2:6-20 -> 439:2-21', + '2:6-20 -> 439:2-26', '2:6-20 -> 440:2-21', - '2:6-20 -> 441:2-16', + '2:6-20 -> 441:2-21', '2:6-20 -> 442:2-16', '2:6-20 -> 443:2-16', - '2:6-20 -> 444:2-17', + '2:6-20 -> 444:2-16', '2:6-20 -> 445:2-17', - '2:6-20 -> 446:2-15', + '2:6-20 -> 446:2-17', '2:6-20 -> 447:2-15', - '2:6-20 -> 448:2-20', - '2:6-20 -> 449:2-40', - '2:6-20 -> 450:2-32', - '2:6-20 -> 451:2-31', - '2:6-20 -> 452:2-30', - '2:6-20 -> 453:2-17', - '2:6-20 -> 454:2-22', - '2:6-20 -> 455:2-24', - '2:6-20 -> 456:2-25', - '2:6-20 -> 457:2-26', - '2:6-20 -> 458:2-20', - '2:6-20 -> 459:2-29', - '2:6-20 -> 460:2-30', - '2:6-20 -> 461:2-40', - '2:6-20 -> 462:2-36', - '2:6-20 -> 463:2-29', - '2:6-20 -> 464:2-24', - '2:6-20 -> 465:2-32', - '2:6-20 -> 466:2-14', - '2:6-20 -> 467:2-20', - '2:6-20 -> 468:2-18', - '2:6-20 -> 469:2-19', - '2:6-20 -> 470:2-20', - '2:6-20 -> 471:2-16', - '2:6-20 -> 472:2-18', - '2:6-20 -> 473:2-15', - '2:6-20 -> 474:2-21', - '2:6-20 -> 475:2-23', - '2:6-20 -> 476:2-29', - '2:6-20 -> 477:2-27', - '2:6-20 -> 478:2-28', - '2:6-20 -> 479:2-29', - '2:6-20 -> 480:2-25', - '2:6-20 -> 481:2-26', - '2:6-20 -> 482:2-27', - '2:6 -> 483:2', - '2:20 -> 484:0', + '2:6-20 -> 448:2-15', + '2:6-20 -> 449:2-20', + '2:6-20 -> 450:2-40', + '2:6-20 -> 451:2-32', + '2:6-20 -> 452:2-31', + '2:6-20 -> 453:2-30', + '2:6-20 -> 454:2-17', + '2:6-20 -> 455:2-22', + '2:6-20 -> 456:2-24', + '2:6-20 -> 457:2-25', + '2:6-20 -> 458:2-26', + '2:6-20 -> 459:2-20', + '2:6-20 -> 460:2-29', + '2:6-20 -> 461:2-30', + '2:6-20 -> 462:2-40', + '2:6-20 -> 463:2-36', + '2:6-20 -> 464:2-29', + '2:6-20 -> 465:2-24', + '2:6-20 -> 466:2-32', + '2:6-20 -> 467:2-14', + '2:6-20 -> 468:2-20', + '2:6-20 -> 469:2-18', + '2:6-20 -> 470:2-19', + '2:6-20 -> 471:2-20', + '2:6-20 -> 472:2-16', + '2:6-20 -> 473:2-18', + '2:6-20 -> 474:2-15', + '2:6-20 -> 475:2-21', + '2:6-20 -> 476:2-23', + '2:6-20 -> 477:2-29', + '2:6-20 -> 478:2-27', + '2:6-20 -> 479:2-28', + '2:6-20 -> 480:2-29', + '2:6-20 -> 481:2-25', + '2:6-20 -> 482:2-26', + '2:6-20 -> 483:2-27', + '2:6 -> 484:2', + '2:20 -> 485:0', ]) }) From 65fd47f25665481acb3464639030ed68fdec4b4d Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Thu, 26 Oct 2023 13:09:38 -0400 Subject: [PATCH 19/22] Disable tap highlights on iOS (#12299) * Disable tap highlights on iOS * Update changelog * Update snapshots * Update changelog --- CHANGELOG.md | 1 + src/css/preflight.css | 2 + tests/source-maps.test.js | 603 +++++++++++++++++++------------------- 3 files changed, 305 insertions(+), 301 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 502df72ec..811961325 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Simplify the `sans` font-family stack ([#11748](https://github.com/tailwindlabs/tailwindcss/pull/11748)) +- Disable the tap highlight overlay on iOS ([#12299](https://github.com/tailwindlabs/tailwindcss/pull/12299)) ## [3.3.6] - 2023-12-04 diff --git a/src/css/preflight.css b/src/css/preflight.css index 42d2c65cf..3e4fa0663 100644 --- a/src/css/preflight.css +++ b/src/css/preflight.css @@ -24,6 +24,7 @@ 4. Use the user's configured `sans` font-family by default. 5. Use the user's configured `sans` font-feature-settings by default. 6. Use the user's configured `sans` font-variation-settings by default. +7. Disable tap highlights on iOS */ html, @@ -35,6 +36,7 @@ html, font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */ font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */ font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */ + -webkit-tap-highlight-color: transparent; /* 7 */ } /* diff --git a/tests/source-maps.test.js b/tests/source-maps.test.js index e783137a6..686ec14ea 100644 --- a/tests/source-maps.test.js +++ b/tests/source-maps.test.js @@ -98,309 +98,310 @@ crosscheck(({ stable, oxide }) => { '2:6-20 -> 19:2-18', '2:20 -> 20:0', '2:6 -> 22:0', - '2:20 -> 29:1', - '2:6 -> 31:0', - '2:6-20 -> 33:2-26', - '2:6-20 -> 34:2-40', - '2:6-20 -> 35:2-26', - '2:6-20 -> 36:2-21', - '2:6-20 -> 37:2-137', - '2:6-20 -> 38:2-39', - '2:6-20 -> 39:2-41', - '2:20 -> 40:0', - '2:6 -> 42:0', - '2:20 -> 45:1', - '2:6 -> 47:0', - '2:6-20 -> 48:2-19', - '2:6-20 -> 49:2-30', - '2:20 -> 50:0', - '2:6 -> 52:0', - '2:20 -> 56:1', - '2:6 -> 58:0', - '2:6-20 -> 59:2-19', - '2:6-20 -> 60:2-24', - '2:6-20 -> 61:2-31', - '2:20 -> 62:0', - '2:6 -> 64:0', - '2:20 -> 66:1', - '2:6 -> 68:0', - '2:6-20 -> 69:2-35', - '2:20 -> 70:0', - '2:6 -> 72:0', - '2:20 -> 74:1', - '2:6 -> 76:0', - '2:6-20 -> 82:2-20', - '2:6-20 -> 83:2-22', - '2:20 -> 84:0', - '2:6 -> 86:0', - '2:20 -> 88:1', - '2:6 -> 90:0', - '2:6-20 -> 91:2-16', - '2:6-20 -> 92:2-26', - '2:20 -> 93:0', - '2:6 -> 95:0', - '2:20 -> 97:1', - '2:6 -> 99:0', - '2:6-20 -> 101:2-21', - '2:20 -> 102:0', - '2:6 -> 104:0', - '2:20 -> 109:1', - '2:6 -> 111:0', - '2:6-20 -> 115:2-121', - '2:6-20 -> 116:2-39', - '2:6-20 -> 117:2-41', - '2:6-20 -> 118:2-24', - '2:20 -> 119:0', - '2:6 -> 121:0', - '2:20 -> 123:1', - '2:6 -> 125:0', - '2:6-20 -> 126:2-16', - '2:20 -> 127:0', - '2:6 -> 129:0', - '2:20 -> 131:1', - '2:6 -> 133:0', - '2:6-20 -> 135:2-16', - '2:6-20 -> 136:2-16', - '2:6-20 -> 137:2-20', - '2:6-20 -> 138:2-26', - '2:20 -> 139:0', - '2:6 -> 141:0', - '2:6-20 -> 142:2-17', - '2:20 -> 143:0', - '2:6 -> 145:0', - '2:6-20 -> 146:2-13', - '2:20 -> 147:0', - '2:6 -> 149:0', - '2:20 -> 153:1', - '2:6 -> 155:0', - '2:6-20 -> 156:2-24', - '2:6-20 -> 157:2-31', - '2:6-20 -> 158:2-35', - '2:20 -> 159:0', - '2:6 -> 161:0', - '2:20 -> 165:1', - '2:6 -> 167:0', - '2:6-20 -> 172:2-30', - '2:6-20 -> 173:2-40', - '2:6-20 -> 174:2-42', - '2:6-20 -> 175:2-25', - '2:6-20 -> 176:2-30', - '2:6-20 -> 177:2-30', - '2:6-20 -> 178:2-24', - '2:6-20 -> 179:2-19', - '2:6-20 -> 180:2-20', - '2:20 -> 181:0', - '2:6 -> 183:0', - '2:20 -> 185:1', - '2:6 -> 187:0', - '2:6-20 -> 189:2-22', - '2:20 -> 190:0', - '2:6 -> 192:0', - '2:20 -> 195:1', - '2:6 -> 197:0', - '2:6-20 -> 201:2-36', - '2:6-20 -> 202:2-39', - '2:6-20 -> 203:2-32', - '2:20 -> 204:0', - '2:6 -> 206:0', - '2:20 -> 208:1', - '2:6 -> 210:0', - '2:6-20 -> 211:2-15', - '2:20 -> 212:0', - '2:6 -> 214:0', - '2:20 -> 216:1', - '2:6 -> 218:0', - '2:6-20 -> 219:2-18', - '2:20 -> 220:0', - '2:6 -> 222:0', - '2:20 -> 224:1', - '2:6 -> 226:0', - '2:6-20 -> 227:2-26', - '2:20 -> 228:0', - '2:6 -> 230:0', - '2:20 -> 232:1', - '2:6 -> 234:0', - '2:6-20 -> 236:2-14', - '2:20 -> 237:0', - '2:6 -> 239:0', - '2:20 -> 242:1', - '2:6 -> 244:0', - '2:6-20 -> 245:2-39', - '2:6-20 -> 246:2-30', - '2:20 -> 247:0', - '2:6 -> 249:0', - '2:20 -> 251:1', - '2:6 -> 253:0', - '2:6-20 -> 254:2-26', - '2:20 -> 255:0', - '2:6 -> 257:0', - '2:20 -> 260:1', - '2:6 -> 262:0', - '2:6-20 -> 263:2-36', - '2:6-20 -> 264:2-23', - '2:20 -> 265:0', - '2:6 -> 267:0', - '2:20 -> 269:1', - '2:6 -> 271:0', - '2:6-20 -> 272:2-20', - '2:20 -> 273:0', - '2:6 -> 275:0', - '2:20 -> 277:1', - '2:6 -> 279:0', - '2:6-20 -> 292:2-11', - '2:20 -> 293:0', - '2:6 -> 295:0', - '2:6-20 -> 296:2-11', - '2:6-20 -> 297:2-12', - '2:20 -> 298:0', - '2:6 -> 300:0', - '2:6-20 -> 301:2-12', - '2:20 -> 302:0', - '2:6 -> 304:0', - '2:6-20 -> 307:2-18', - '2:6-20 -> 308:2-11', - '2:6-20 -> 309:2-12', - '2:20 -> 310:0', - '2:6 -> 312:0', - '2:20 -> 314:1', - '2:6 -> 315:0', - '2:6-20 -> 316:2-12', - '2:20 -> 317:0', - '2:6 -> 319:0', - '2:20 -> 321:1', - '2:6 -> 323:0', - '2:6-20 -> 324:2-18', - '2:20 -> 325:0', - '2:6 -> 327:0', - '2:20 -> 330:1', - '2:6 -> 332:0', - '2:6-20 -> 334:2-20', - '2:6-20 -> 335:2-24', - '2:20 -> 336:0', - '2:6 -> 338:0', - '2:20 -> 340:1', - '2:6 -> 342:0', - '2:6-20 -> 344:2-17', - '2:20 -> 345:0', - '2:6 -> 347:0', - '2:20 -> 349:1', - '2:6 -> 350:0', - '2:6-20 -> 351:2-17', - '2:20 -> 352:0', - '2:6 -> 354:0', - '2:20 -> 358:1', - '2:6 -> 360:0', - '2:6-20 -> 368:2-24', - '2:6-20 -> 369:2-32', - '2:20 -> 370:0', - '2:6 -> 372:0', - '2:20 -> 374:1', - '2:6 -> 376:0', - '2:6-20 -> 378:2-17', - '2:6-20 -> 379:2-14', - '2:20 -> 380:0', - '2:6-20 -> 382:0-72', - '2:6 -> 383:0', - '2:6-20 -> 384:2-15', - '2:20 -> 385:0', - '2:6 -> 387:0', - '2:6-20 -> 388:2-26', - '2:6-20 -> 389:2-26', - '2:6-20 -> 390:2-21', - '2:6-20 -> 391:2-21', - '2:6-20 -> 392:2-16', - '2:6-20 -> 393:2-16', + '2:20 -> 30:1', + '2:6 -> 32:0', + '2:6-20 -> 34:2-26', + '2:6-20 -> 35:2-40', + '2:6-20 -> 36:2-26', + '2:6-20 -> 37:2-21', + '2:6-20 -> 38:2-137', + '2:6-20 -> 39:2-39', + '2:6-20 -> 40:2-41', + '2:6-20 -> 41:2-50', + '2:20 -> 42:0', + '2:6 -> 44:0', + '2:20 -> 47:1', + '2:6 -> 49:0', + '2:6-20 -> 50:2-19', + '2:6-20 -> 51:2-30', + '2:20 -> 52:0', + '2:6 -> 54:0', + '2:20 -> 58:1', + '2:6 -> 60:0', + '2:6-20 -> 61:2-19', + '2:6-20 -> 62:2-24', + '2:6-20 -> 63:2-31', + '2:20 -> 64:0', + '2:6 -> 66:0', + '2:20 -> 68:1', + '2:6 -> 70:0', + '2:6-20 -> 71:2-35', + '2:20 -> 72:0', + '2:6 -> 74:0', + '2:20 -> 76:1', + '2:6 -> 78:0', + '2:6-20 -> 84:2-20', + '2:6-20 -> 85:2-22', + '2:20 -> 86:0', + '2:6 -> 88:0', + '2:20 -> 90:1', + '2:6 -> 92:0', + '2:6-20 -> 93:2-16', + '2:6-20 -> 94:2-26', + '2:20 -> 95:0', + '2:6 -> 97:0', + '2:20 -> 99:1', + '2:6 -> 101:0', + '2:6-20 -> 103:2-21', + '2:20 -> 104:0', + '2:6 -> 106:0', + '2:20 -> 111:1', + '2:6 -> 113:0', + '2:6-20 -> 117:2-121', + '2:6-20 -> 118:2-39', + '2:6-20 -> 119:2-41', + '2:6-20 -> 120:2-24', + '2:20 -> 121:0', + '2:6 -> 123:0', + '2:20 -> 125:1', + '2:6 -> 127:0', + '2:6-20 -> 128:2-16', + '2:20 -> 129:0', + '2:6 -> 131:0', + '2:20 -> 133:1', + '2:6 -> 135:0', + '2:6-20 -> 137:2-16', + '2:6-20 -> 138:2-16', + '2:6-20 -> 139:2-20', + '2:6-20 -> 140:2-26', + '2:20 -> 141:0', + '2:6 -> 143:0', + '2:6-20 -> 144:2-17', + '2:20 -> 145:0', + '2:6 -> 147:0', + '2:6-20 -> 148:2-13', + '2:20 -> 149:0', + '2:6 -> 151:0', + '2:20 -> 155:1', + '2:6 -> 157:0', + '2:6-20 -> 158:2-24', + '2:6-20 -> 159:2-31', + '2:6-20 -> 160:2-35', + '2:20 -> 161:0', + '2:6 -> 163:0', + '2:20 -> 167:1', + '2:6 -> 169:0', + '2:6-20 -> 174:2-30', + '2:6-20 -> 175:2-40', + '2:6-20 -> 176:2-42', + '2:6-20 -> 177:2-25', + '2:6-20 -> 178:2-30', + '2:6-20 -> 179:2-30', + '2:6-20 -> 180:2-24', + '2:6-20 -> 181:2-19', + '2:6-20 -> 182:2-20', + '2:20 -> 183:0', + '2:6 -> 185:0', + '2:20 -> 187:1', + '2:6 -> 189:0', + '2:6-20 -> 191:2-22', + '2:20 -> 192:0', + '2:6 -> 194:0', + '2:20 -> 197:1', + '2:6 -> 199:0', + '2:6-20 -> 203:2-36', + '2:6-20 -> 204:2-39', + '2:6-20 -> 205:2-32', + '2:20 -> 206:0', + '2:6 -> 208:0', + '2:20 -> 210:1', + '2:6 -> 212:0', + '2:6-20 -> 213:2-15', + '2:20 -> 214:0', + '2:6 -> 216:0', + '2:20 -> 218:1', + '2:6 -> 220:0', + '2:6-20 -> 221:2-18', + '2:20 -> 222:0', + '2:6 -> 224:0', + '2:20 -> 226:1', + '2:6 -> 228:0', + '2:6-20 -> 229:2-26', + '2:20 -> 230:0', + '2:6 -> 232:0', + '2:20 -> 234:1', + '2:6 -> 236:0', + '2:6-20 -> 238:2-14', + '2:20 -> 239:0', + '2:6 -> 241:0', + '2:20 -> 244:1', + '2:6 -> 246:0', + '2:6-20 -> 247:2-39', + '2:6-20 -> 248:2-30', + '2:20 -> 249:0', + '2:6 -> 251:0', + '2:20 -> 253:1', + '2:6 -> 255:0', + '2:6-20 -> 256:2-26', + '2:20 -> 257:0', + '2:6 -> 259:0', + '2:20 -> 262:1', + '2:6 -> 264:0', + '2:6-20 -> 265:2-36', + '2:6-20 -> 266:2-23', + '2:20 -> 267:0', + '2:6 -> 269:0', + '2:20 -> 271:1', + '2:6 -> 273:0', + '2:6-20 -> 274:2-20', + '2:20 -> 275:0', + '2:6 -> 277:0', + '2:20 -> 279:1', + '2:6 -> 281:0', + '2:6-20 -> 294:2-11', + '2:20 -> 295:0', + '2:6 -> 297:0', + '2:6-20 -> 298:2-11', + '2:6-20 -> 299:2-12', + '2:20 -> 300:0', + '2:6 -> 302:0', + '2:6-20 -> 303:2-12', + '2:20 -> 304:0', + '2:6 -> 306:0', + '2:6-20 -> 309:2-18', + '2:6-20 -> 310:2-11', + '2:6-20 -> 311:2-12', + '2:20 -> 312:0', + '2:6 -> 314:0', + '2:20 -> 316:1', + '2:6 -> 317:0', + '2:6-20 -> 318:2-12', + '2:20 -> 319:0', + '2:6 -> 321:0', + '2:20 -> 323:1', + '2:6 -> 325:0', + '2:6-20 -> 326:2-18', + '2:20 -> 327:0', + '2:6 -> 329:0', + '2:20 -> 332:1', + '2:6 -> 334:0', + '2:6-20 -> 336:2-20', + '2:6-20 -> 337:2-24', + '2:20 -> 338:0', + '2:6 -> 340:0', + '2:20 -> 342:1', + '2:6 -> 344:0', + '2:6-20 -> 346:2-17', + '2:20 -> 347:0', + '2:6 -> 349:0', + '2:20 -> 351:1', + '2:6 -> 352:0', + '2:6-20 -> 353:2-17', + '2:20 -> 354:0', + '2:6 -> 356:0', + '2:20 -> 360:1', + '2:6 -> 362:0', + '2:6-20 -> 370:2-24', + '2:6-20 -> 371:2-32', + '2:20 -> 372:0', + '2:6 -> 374:0', + '2:20 -> 376:1', + '2:6 -> 378:0', + '2:6-20 -> 380:2-17', + '2:6-20 -> 381:2-14', + '2:20 -> 382:0', + '2:6-20 -> 384:0-72', + '2:6 -> 385:0', + '2:6-20 -> 386:2-15', + '2:20 -> 387:0', + '2:6 -> 389:0', + '2:6-20 -> 390:2-26', + '2:6-20 -> 391:2-26', + '2:6-20 -> 392:2-21', + '2:6-20 -> 393:2-21', '2:6-20 -> 394:2-16', - '2:6-20 -> 395:2-17', - '2:6-20 -> 396:2-17', - '2:6-20 -> 397:2-15', - '2:6-20 -> 398:2-15', - '2:6-20 -> 399:2-20', - '2:6-20 -> 400:2-40', - '2:6-20 -> 401:2-32', - '2:6-20 -> 402:2-31', - '2:6-20 -> 403:2-30', - '2:6-20 -> 404:2-17', - '2:6-20 -> 405:2-22', - '2:6-20 -> 406:2-24', - '2:6-20 -> 407:2-25', - '2:6-20 -> 408:2-26', - '2:6-20 -> 409:2-20', - '2:6-20 -> 410:2-29', - '2:6-20 -> 411:2-30', - '2:6-20 -> 412:2-40', - '2:6-20 -> 413:2-36', - '2:6-20 -> 414:2-29', - '2:6-20 -> 415:2-24', - '2:6-20 -> 416:2-32', - '2:6-20 -> 417:2-14', - '2:6-20 -> 418:2-20', - '2:6-20 -> 419:2-18', - '2:6-20 -> 420:2-19', - '2:6-20 -> 421:2-20', - '2:6-20 -> 422:2-16', - '2:6-20 -> 423:2-18', - '2:6-20 -> 424:2-15', - '2:6-20 -> 425:2-21', - '2:6-20 -> 426:2-23', - '2:6-20 -> 427:2-29', - '2:6-20 -> 428:2-27', - '2:6-20 -> 429:2-28', - '2:6-20 -> 430:2-29', - '2:6-20 -> 431:2-25', - '2:6-20 -> 432:2-26', - '2:6-20 -> 433:2-27', - '2:6 -> 434:2', - '2:20 -> 435:0', - '2:6 -> 437:0', - '2:6-20 -> 438:2-26', - '2:6-20 -> 439:2-26', - '2:6-20 -> 440:2-21', - '2:6-20 -> 441:2-21', - '2:6-20 -> 442:2-16', - '2:6-20 -> 443:2-16', + '2:6-20 -> 395:2-16', + '2:6-20 -> 396:2-16', + '2:6-20 -> 397:2-17', + '2:6-20 -> 398:2-17', + '2:6-20 -> 399:2-15', + '2:6-20 -> 400:2-15', + '2:6-20 -> 401:2-20', + '2:6-20 -> 402:2-40', + '2:6-20 -> 403:2-32', + '2:6-20 -> 404:2-31', + '2:6-20 -> 405:2-30', + '2:6-20 -> 406:2-17', + '2:6-20 -> 407:2-22', + '2:6-20 -> 408:2-24', + '2:6-20 -> 409:2-25', + '2:6-20 -> 410:2-26', + '2:6-20 -> 411:2-20', + '2:6-20 -> 412:2-29', + '2:6-20 -> 413:2-30', + '2:6-20 -> 414:2-40', + '2:6-20 -> 415:2-36', + '2:6-20 -> 416:2-29', + '2:6-20 -> 417:2-24', + '2:6-20 -> 418:2-32', + '2:6-20 -> 419:2-14', + '2:6-20 -> 420:2-20', + '2:6-20 -> 421:2-18', + '2:6-20 -> 422:2-19', + '2:6-20 -> 423:2-20', + '2:6-20 -> 424:2-16', + '2:6-20 -> 425:2-18', + '2:6-20 -> 426:2-15', + '2:6-20 -> 427:2-21', + '2:6-20 -> 428:2-23', + '2:6-20 -> 429:2-29', + '2:6-20 -> 430:2-27', + '2:6-20 -> 431:2-28', + '2:6-20 -> 432:2-29', + '2:6-20 -> 433:2-25', + '2:6-20 -> 434:2-26', + '2:6-20 -> 435:2-27', + '2:6 -> 436:2', + '2:20 -> 437:0', + '2:6 -> 439:0', + '2:6-20 -> 440:2-26', + '2:6-20 -> 441:2-26', + '2:6-20 -> 442:2-21', + '2:6-20 -> 443:2-21', '2:6-20 -> 444:2-16', - '2:6-20 -> 445:2-17', - '2:6-20 -> 446:2-17', - '2:6-20 -> 447:2-15', - '2:6-20 -> 448:2-15', - '2:6-20 -> 449:2-20', - '2:6-20 -> 450:2-40', - '2:6-20 -> 451:2-32', - '2:6-20 -> 452:2-31', - '2:6-20 -> 453:2-30', - '2:6-20 -> 454:2-17', - '2:6-20 -> 455:2-22', - '2:6-20 -> 456:2-24', - '2:6-20 -> 457:2-25', - '2:6-20 -> 458:2-26', - '2:6-20 -> 459:2-20', - '2:6-20 -> 460:2-29', - '2:6-20 -> 461:2-30', - '2:6-20 -> 462:2-40', - '2:6-20 -> 463:2-36', - '2:6-20 -> 464:2-29', - '2:6-20 -> 465:2-24', - '2:6-20 -> 466:2-32', - '2:6-20 -> 467:2-14', - '2:6-20 -> 468:2-20', - '2:6-20 -> 469:2-18', - '2:6-20 -> 470:2-19', - '2:6-20 -> 471:2-20', - '2:6-20 -> 472:2-16', - '2:6-20 -> 473:2-18', - '2:6-20 -> 474:2-15', - '2:6-20 -> 475:2-21', - '2:6-20 -> 476:2-23', - '2:6-20 -> 477:2-29', - '2:6-20 -> 478:2-27', - '2:6-20 -> 479:2-28', - '2:6-20 -> 480:2-29', - '2:6-20 -> 481:2-25', - '2:6-20 -> 482:2-26', - '2:6-20 -> 483:2-27', - '2:6 -> 484:2', - '2:20 -> 485:0', + '2:6-20 -> 445:2-16', + '2:6-20 -> 446:2-16', + '2:6-20 -> 447:2-17', + '2:6-20 -> 448:2-17', + '2:6-20 -> 449:2-15', + '2:6-20 -> 450:2-15', + '2:6-20 -> 451:2-20', + '2:6-20 -> 452:2-40', + '2:6-20 -> 453:2-32', + '2:6-20 -> 454:2-31', + '2:6-20 -> 455:2-30', + '2:6-20 -> 456:2-17', + '2:6-20 -> 457:2-22', + '2:6-20 -> 458:2-24', + '2:6-20 -> 459:2-25', + '2:6-20 -> 460:2-26', + '2:6-20 -> 461:2-20', + '2:6-20 -> 462:2-29', + '2:6-20 -> 463:2-30', + '2:6-20 -> 464:2-40', + '2:6-20 -> 465:2-36', + '2:6-20 -> 466:2-29', + '2:6-20 -> 467:2-24', + '2:6-20 -> 468:2-32', + '2:6-20 -> 469:2-14', + '2:6-20 -> 470:2-20', + '2:6-20 -> 471:2-18', + '2:6-20 -> 472:2-19', + '2:6-20 -> 473:2-20', + '2:6-20 -> 474:2-16', + '2:6-20 -> 475:2-18', + '2:6-20 -> 476:2-15', + '2:6-20 -> 477:2-21', + '2:6-20 -> 478:2-23', + '2:6-20 -> 479:2-29', + '2:6-20 -> 480:2-27', + '2:6-20 -> 481:2-28', + '2:6-20 -> 482:2-29', + '2:6-20 -> 483:2-25', + '2:6-20 -> 484:2-26', + '2:6-20 -> 485:2-27', + '2:6 -> 486:2', + '2:20 -> 487:0', ]) }) From e6d5accd89850bcaac9b84d8481c6234580313b1 Mon Sep 17 00:00:00 2001 From: Adam Wathan <4323180+adamwathan@users.noreply.github.com> Date: Sat, 9 Dec 2023 09:26:43 -0500 Subject: [PATCH 20/22] Port child variant --- src/corePlugins.js | 3 +++ src/lib/setupContextUtils.js | 1 + tests/variants.test.js | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) diff --git a/src/corePlugins.js b/src/corePlugins.js index 76443f554..a0687ab67 100644 --- a/src/corePlugins.js +++ b/src/corePlugins.js @@ -25,6 +25,9 @@ import { normalize } from './util/dataTypes' import { INTERNAL_FEATURES } from './lib/setupContextUtils' export let variantPlugins = { + childVariant: ({ addVariant }) => { + addVariant('*', '& > *') + }, pseudoElementVariants: ({ addVariant }) => { addVariant('first-letter', '&::first-letter') addVariant('first-line', '&::first-line') diff --git a/src/lib/setupContextUtils.js b/src/lib/setupContextUtils.js index 28991dc83..d47620218 100644 --- a/src/lib/setupContextUtils.js +++ b/src/lib/setupContextUtils.js @@ -756,6 +756,7 @@ function resolvePlugins(context, root) { // TODO: This is a workaround for backwards compatibility, since custom variants // were historically sorted before screen/stackable variants. let beforeVariants = [ + variantPlugins['childVariant'], variantPlugins['pseudoElementVariants'], variantPlugins['pseudoClassVariants'], variantPlugins['hasVariants'], diff --git a/tests/variants.test.js b/tests/variants.test.js index 55facc122..e54b37720 100644 --- a/tests/variants.test.js +++ b/tests/variants.test.js @@ -1202,3 +1202,36 @@ crosscheck(({ stable, oxide }) => { `) }) }) + +test('* is matched by the parser as the children variant', async () => { + let config = { + content: [ + { + raw: html` +
+
+
+
+
+ `, + }, + ], + corePlugins: { preflight: false }, + } + + let input = css` + @tailwind utilities; + ` + + let result = await run(input, config) + + expect(result.css).toMatchFormattedCss(css` + .\*\:italic > *, + .\*\:hover\:italic:hover > *, + .hover\:\*\:italic > :hover, + .data-\[slot\=label\]\:\*\:hover\:italic:hover > [data-slot='label'], + .\[\&_p\]\:\*\:hover\:italic:hover > * p { + font-style: italic; + } + `) +}) From 68e9295084b0a1e99a039175c5044546d88eeb8e Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Mon, 11 Dec 2023 18:12:44 -0500 Subject: [PATCH 21/22] Fix failing test --- oxide/crates/core/src/parser.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oxide/crates/core/src/parser.rs b/oxide/crates/core/src/parser.rs index 16831afff..6781b14a8 100644 --- a/oxide/crates/core/src/parser.rs +++ b/oxide/crates/core/src/parser.rs @@ -278,7 +278,7 @@ impl<'a> Extractor<'a> { } // Allowed first characters. - b'@' | b'!' | b'-' | b'<' | b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' => { + b'@' | b'!' | b'-' | b'<' | b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' | b'*' => { // TODO: A bunch of characters that we currently support but maybe we only want it behind // a flag. E.g.: '' | '$' | '^' | '_' @@ -329,6 +329,7 @@ impl<'a> Extractor<'a> { | b'!' | b'@' | b'%' + | b'*' if prev != b']' => { /* TODO: The `b'@'` is necessary for custom separators like _@, maybe we can handle this in a better way... */ From 48864d468680c927c802714f7d413f1152e876e6 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Mon, 11 Dec 2023 18:13:11 -0500 Subject: [PATCH 22/22] Move test --- tests/variants.test.js | 63 +++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/tests/variants.test.js b/tests/variants.test.js index e54b37720..776fac2a2 100644 --- a/tests/variants.test.js +++ b/tests/variants.test.js @@ -1201,37 +1201,38 @@ crosscheck(({ stable, oxide }) => { } `) }) -}) -test('* is matched by the parser as the children variant', async () => { - let config = { - content: [ - { - raw: html` -
-
-
-
-
- `, - }, - ], - corePlugins: { preflight: false }, - } - - let input = css` - @tailwind utilities; - ` - - let result = await run(input, config) - - expect(result.css).toMatchFormattedCss(css` - .\*\:italic > *, - .\*\:hover\:italic:hover > *, - .hover\:\*\:italic > :hover, - .data-\[slot\=label\]\:\*\:hover\:italic:hover > [data-slot='label'], - .\[\&_p\]\:\*\:hover\:italic:hover > * p { - font-style: italic; + test('* is matched by the parser as the children variant', async () => { + let config = { + content: [ + { + raw: html` +
+
+
+
+
+ `, + }, + ], + corePlugins: { preflight: false }, } - `) + + let input = css` + @tailwind utilities; + ` + + let result = await run(input, config) + + expect(result.css).toMatchFormattedCss(css` + .\*\:italic > *, + .\*\:hover\:italic:hover > *, + .hover\:\*\:italic > :hover, + .data-\[slot\=label\]\:\*\:hover\:italic:hover > [data-slot='label'], + .\[\&_p\]\:\*\:hover\:italic:hover > * p { + font-style: italic; + } + `) + }) }) +