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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Upgrade: Do not migrate declarations that look like candidates in `<style>` blocks ([#18057](https://github.com/tailwindlabs/tailwindcss/pull/18057), [18068](https://github.com/tailwindlabs/tailwindcss/pull/18068))
- Upgrade: Improve `pnpm` workspaces support ([#18065](https://github.com/tailwindlabs/tailwindcss/pull/18065))
- Support Leptos `class:` attributes when extracting classes ([#18093](https://github.com/tailwindlabs/tailwindcss/pull/18093))

## [4.1.7] - 2025-05-15

Expand Down
17 changes: 17 additions & 0 deletions crates/oxide/src/extractor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,23 @@ mod tests {
);
}

// See: https://github.com/tailwindlabs/tailwindcss/issues/18092
#[test]
fn test_leptos_rs_view_class_colon_syntax() {
for (input, expected) in [
(
r#"<div class:px-6=true>"#,
vec!["class", "px-6"],
),
(
r#"view! { <div class:px-6=true> }"#,
vec!["class", "px-6", "view!"],
),
] {
assert_extract_sorted_candidates(&pre_process_input(input, "svelte"), expected);
}
}

#[test]
fn test_extract_css_variables() {
for (input, expected) in [
Expand Down
2 changes: 1 addition & 1 deletion crates/oxide/src/scanner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ pub fn pre_process_input(content: &[u8], extension: &str) -> Vec<u8> {
"pug" => Pug.process(content),
"rb" | "erb" => Ruby.process(content),
"slim" => Slim.process(content),
"svelte" => Svelte.process(content),
"svelte" | "rs" => Svelte.process(content),
"vue" => Vue.process(content),
_ => content.to_vec(),
}
Expand Down