From 543da3f4e576ea23a971b66a0bcd97121a4e779a Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 19 Dec 2025 05:45:15 -0500 Subject: [PATCH] Detect utilities when containing capital letters followed by numbers (#19465) Fixes #19463 --- CHANGELOG.md | 1 + crates/oxide/src/extractor/named_utility_machine.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b776a93e5..bf75d28e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Do not wrap `color-mix` in a `@supports` rule if one already exists ([#19450](https://github.com/tailwindlabs/tailwindcss/pull/19450)) - Allow whitespace around `@source inline()` argument ([#19461](https://github.com/tailwindlabs/tailwindcss/pull/19461)) - CLI: Emit comment when source maps are saved to files ([#19447](https://github.com/tailwindlabs/tailwindcss/pull/19447)) +- Detect utilities when containing capital letters followed by numbers ([#19465](https://github.com/tailwindlabs/tailwindcss/pull/19465)) ### Added diff --git a/crates/oxide/src/extractor/named_utility_machine.rs b/crates/oxide/src/extractor/named_utility_machine.rs index 7c847a2e2..d218dbeb7 100644 --- a/crates/oxide/src/extractor/named_utility_machine.rs +++ b/crates/oxide/src/extractor/named_utility_machine.rs @@ -284,6 +284,7 @@ impl Machine for NamedUtilityMachine { | Class::Dot | Class::Number | Class::AlphaLower + | Class::AlphaUpper ) { return self.restart(); } @@ -425,6 +426,8 @@ mod tests { // With number followed by dash or underscore ("text-title1-strong", vec!["text-title1-strong"]), ("text-title1_strong", vec!["text-title1_strong"]), + // With capital letter followed by number + ("text-titleV1-strong", vec!["text-titleV1-strong"]), // With trailing % sign ("from-15%", vec!["from-15%"]), // Arbitrary value with bracket notation