MCPcopy Create free account
hub / github.com/Stranger6667/css-inline / apply_unitless_width

Function apply_unitless_width

css-inline/tests/test_inlining.rs:1919–1925  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1917
1918#[test]
1919fn apply_unitless_width() {
1920 // Unitless values should work (treated as pixels)
1921 let inliner = CSSInliner::options().apply_width_attributes(true).build();
1922 let html = r#"<html><head><style>img { width: 100; }</style></head><body><img></body></html>"#;
1923 let result = inliner.inline(html).unwrap();
1924 assert!(result.contains(r#"width="100""#));
1925}
1926
1927#[test]
1928fn dimension_attributes_disabled_by_default() {

Callers

nothing calls this directly

Calls 3

buildMethod · 0.45
inlineMethod · 0.45

Tested by

no test coverage detected