test_class_shorthand_followed_by_parens() — tailwindcss Function Reference
Architecture documentation for the test_class_shorthand_followed_by_parens() function in pug.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 7e53d600_5e05_3aae_bb75_8057e5d7cc34["test_class_shorthand_followed_by_parens()"] ef660f09_55dc_9359_d9d2_abe4a9db93b0["pug.rs"] 7e53d600_5e05_3aae_bb75_8057e5d7cc34 -->|defined in| ef660f09_55dc_9359_d9d2_abe4a9db93b0 style 7e53d600_5e05_3aae_bb75_8057e5d7cc34 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/oxide/src/extractor/pre_processors/pug.rs lines 157–180
fn test_class_shorthand_followed_by_parens() {
let input = r#"
.text-sky-600.bg-neutral-900(title="A tooltip") This div has an HTML attribute.
"#;
Pug::test_extract_contains(input, vec!["text-sky-600", "bg-neutral-900"]);
// Additional test with CSS Variable shorthand syntax in the attribute itself because `(`
// and `)` are not valid in the class shorthand version.
//
// Also included an arbitrary value including `(` and `)` to make sure that we don't
// accidentally remove those either.
let input = r#"
.p-8(class="bg-(--my-color) bg-(--my-color)/(--my-opacity) bg-[url(https://example.com)]")
"#;
Pug::test_extract_contains(
input,
vec![
"p-8",
"bg-(--my-color)",
"bg-(--my-color)/(--my-opacity)",
"bg-[url(https://example.com)]",
],
);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_class_shorthand_followed_by_parens() do?
test_class_shorthand_followed_by_parens() is a function in the tailwindcss codebase, defined in crates/oxide/src/extractor/pre_processors/pug.rs.
Where is test_class_shorthand_followed_by_parens() defined?
test_class_shorthand_followed_by_parens() is defined in crates/oxide/src/extractor/pre_processors/pug.rs at line 157.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free