@@ -2488,39 +2488,8 @@ fn element_spacer() {
24882488
24892489// --- Badge element ---
24902490
2491−#[test]
2492−fn element_badge() {
2493− let output = compile("@page T\n@badge [background red, color white] 3");
2494− assert!(
2495− output.contains("<span"),
2496− "badge renders as span: {}",
2497− output
2498− );
2499− assert!(
2500− output.contains("border-radius:9999px"),
2501− "badge should be pill-shaped: {}",
2502− output
2503− );
2504− assert!(output.contains("3"), "badge content: {}", output);
2505−}
2506−
25072491// --- Tooltip element ---
25082492
2509−#[test]
2510−fn element_tooltip() {
2511− let output = compile("@page T\n@tooltip [tip Hover for info]\n @text Help");
2512− assert!(
2513− output.contains("title=\"Hover for info\""),
2514− "tooltip should have title attr: {}",
2515− output
2516− );
2517− assert!(
2518− output.contains("cursor:help"),
2519− "tooltip should have cursor:help: {}",
2520− output
2521− );
2522−}
2523−
25242493// --- @each step ---
25252494
25262495#[test]
@@ -2695,7 +2664,7 @@ fn no_warning_direction_attr() {
26952664
26962665#[test]
26972666fn no_warning_new_elements() {
2698− // Grid, stack, spacer, badge, tooltip should all parse without errors
2667+ // Grid and spacer parse without errors
26992668 let diags = parse_diagnostics("@grid\n @text A");
27002669 assert!(
27012670 !diags
@@ -2712,22 +2681,6 @@ fn no_warning_new_elements() {
27122681 "spacer should parse, got: {:?}",
27132682 diags
27142683 );
2715− let diags = parse_diagnostics("@badge [background red] 5");
2716− assert!(
2717− !diags
2718− .iter()
2719− .any(|d| d.severity == htmlang::parser::Severity::Error),
2720− "badge should parse, got: {:?}",
2721− diags
2722− );
2723− let diags = parse_diagnostics("@tooltip Help text\n @text Hover");
2724− assert!(
2725− !diags
2726− .iter()
2727− .any(|d| d.severity == htmlang::parser::Severity::Error),
2728− "tooltip should parse, got: {:?}",
2729− diags
2730− );
27312684}
27322685
27332686// --- New feature tests ---
@@ -2737,11 +2690,6 @@ fn snapshot_variable_filters() {
27372690 snapshot_test("variable_filters");
27382691}
27392692
2740−#[test]
2741−fn snapshot_new_elements_5() {
2742− snapshot_test("new_elements_5");
2743−}
2744−
27452693#[test]
27462694fn snapshot_css_shorthands() {
27472695 snapshot_test("css_shorthands");
@@ -2804,49 +2752,6 @@ fn test_variable_filters() {
28042752 );
28052753}
28062754
2807−#[test]
2808−fn test_new_elements_parse() {
2809− // Avatar
2810− let diags = parse_diagnostics("@avatar [width 48, height 48]\n @text AB");
2811− assert!(
2812− !diags
2813− .iter()
2814− .any(|d| d.severity == htmlang::parser::Severity::Error),
2815− "avatar: {:?}",
2816− diags
2817− );
2818−
2819− // Carousel
2820− let diags = parse_diagnostics("@carousel [gap 16]\n @el Slide 1");
2821− assert!(
2822− !diags
2823− .iter()
2824− .any(|d| d.severity == htmlang::parser::Severity::Error),
2825− "carousel: {:?}",
2826− diags
2827− );
2828−
2829− // Chip
2830− let diags = parse_diagnostics("@chip [background #eee] Tag");
2831− assert!(
2832− !diags
2833− .iter()
2834− .any(|d| d.severity == htmlang::parser::Severity::Error),
2835− "chip: {:?}",
2836− diags
2837− );
2838−
2839− // Tag
2840− let diags = parse_diagnostics("@tag [color blue] v1.0");
2841− assert!(
2842− !diags
2843− .iter()
2844− .any(|d| d.severity == htmlang::parser::Severity::Error),
2845− "tag: {:?}",
2846− diags
2847− );
2848−}
2849−
28502755#[test]
28512756fn test_css_shorthands_output() {
28522757 let result = htmlang::parser::parse("@text [$truncate] Hello");
@@ -2885,27 +2790,6 @@ fn test_css_shorthands_output() {
28852790 html
28862791 );
28872792
2888− let result = htmlang::parser::parse("@el [$no-scrollbar] Content");
2889− let html = htmlang::codegen::generate(&result.document);
2890− assert!(
2891− html.contains("scrollbar-width:none"),
2892− "no-scrollbar should work, got: {}",
2893− html
2894− );
2895−
2896− let result = htmlang::parser::parse("@el [$skeleton, width 100, height 20] Content");
2897− let html = htmlang::codegen::generate(&result.document);
2898− assert!(
2899− html.contains("hl-skeleton"),
2900− "skeleton should add animation, got: {}",
2901− html
2902− );
2903− assert!(
2904− html.contains("@keyframes hl-skeleton"),
2905− "skeleton should add keyframes, got: {}",
2906− html
2907− );
2908−
29092793 // `gradient` became plain CSS: the compiler points to the replacement.
29102794 let result = htmlang::parser::parse("@el [gradient #fff #000] Content");
29112795 assert!(
@@ -2918,17 +2802,6 @@ fn test_css_shorthands_output() {
29182802 );
29192803}
29202804
2921−#[test]
2922−fn test_carousel_children_snap() {
2923− let result = htmlang::parser::parse("@carousel\n @el A\n @el B");
2924− let html = htmlang::codegen::generate(&result.document);
2925− assert!(
2926− html.contains("scroll-snap-align:start"),
2927− "carousel children should have snap-align, got: {}",
2928− html
2929− );
2930−}
2931−
29322805#[test]
29332806fn test_import_missing_file() {
29342807 // We can't test @use with actual files in unit tests easily, but we can verify
@@ -3306,11 +3179,6 @@ fn snapshot_script_element() {
33063179 snapshot_test("script_element");
33073180}
33083181
3309−#[test]
3310−fn snapshot_breadcrumb() {
3311− snapshot_test("breadcrumb");
3312−}
3313−
33143182#[test]
33153183fn snapshot_new_directives() {
33163184 snapshot_test("new_directives");
@@ -3368,14 +3236,6 @@ fn search_element() {
33683236 assert!(output.contains("<search>"), "search: {}", output);
33693237}
33703238
3371−#[test]
3372−fn breadcrumb_generates_nav_ol() {
3373− let output = compile("@breadcrumb\n @li > @text Home\n @li About");
3374− assert!(output.contains("aria-label=\"breadcrumb\""), "nav: {}", output);
3375− assert!(output.contains("<ol class="), "ol: {}", output);
3376− assert!(output.contains("<li class="), "li: {}", output);
3377−}
3378−
33793239#[test]
33803240fn canonical_directive() {
33813241 let output = compile("@page [canonical https://example.com/page] T\n@text Hello");
@@ -4819,13 +4679,12 @@ fn children_prefix_styles_direct_children() {
48194679
48204680#[test]
48214681fn standard_library_components_compile_cleanly() {
4822− let src = "@badge [background red] 3\n@tag v2\n@chip Rust\n@avatar\n AB\n@spacer\n@tooltip [tip More] Hover\n@carousel\n @el A\n@breadcrumb\n @li Home\n@el [$skeleton]\n@el [$no-scrollbar]";
4682+ let src = "@row\n @text A\n @spacer\n @text [$truncate] B";
48234683 let diags = parse_diagnostics(src);
48244684 assert!(diags.is_empty(), "standard library produced diagnostics: {:?}", diags);
48254685 let output = compile(src);
4826− assert!(output.contains("<span class=\"a\">3</span>"), "{}", output);
4827− assert!(output.contains("title=\"More\""), "{}", output);
4828− assert!(output.contains("@keyframes hl-skeleton"), "{}", output);
4686+ assert!(output.contains("flex:1"), "{}", output);
4687+ assert!(output.contains("text-overflow:ellipsis"), "{}", output);
48294688}
48304689
48314690#[test]