Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
### Fixed

- Allow `_` before numbers during candidate extraction ([#17961](https://github.com/tailwindlabs/tailwindcss/pull/17961))

## [4.1.6] - 2025-05-09

Expand Down
9 changes: 8 additions & 1 deletion crates/oxide/src/extractor/named_utility_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ impl Machine for NamedUtilityMachine<ParsingState> {
Class::Number => {
if !matches!(
cursor.prev.into(),
Class::Dash | Class::Dot | Class::Number | Class::AlphaLower
Class::Dash
| Class::Underscore
| Class::Dot
| Class::Number
| Class::AlphaLower
) {
return self.restart();
}
Expand Down Expand Up @@ -415,6 +419,9 @@ mod tests {
// With numbers
("px-5", vec!["px-5"]),
("px-2.5", vec!["px-2.5"]),
// Underscores followed by numbers
("header_1", vec!["header_1"]),
("header_1_2", vec!["header_1_2"]),
// With number followed by dash or underscore
("text-title1-strong", vec!["text-title1-strong"]),
("text-title1_strong", vec!["text-title1_strong"]),
Expand Down