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

Function apply_zero_width_height

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

Source from the content-addressed store, hash-verified

2024
2025#[test]
2026fn apply_zero_width_height() {
2027 // Zero values should be applied
2028 let inliner = CSSInliner::options()
2029 .apply_width_attributes(true)
2030 .apply_height_attributes(true)
2031 .build();
2032 let html = r#"<html><head><style>img { width: 0px; height: 0; }</style></head><body><img></body></html>"#;
2033 let result = inliner.inline(html).unwrap();
2034 assert!(result.contains(r#"width="0""#));
2035 assert!(result.contains(r#"height="0""#));
2036}
2037
2038#[test]
2039fn apply_width_with_important() {

Callers

nothing calls this directly

Calls 4

buildMethod · 0.45
inlineMethod · 0.45

Tested by

no test coverage detected