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

Function apply_width_attribute_img

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

Source from the content-addressed store, hash-verified

1788
1789#[test]
1790fn apply_width_attribute_img() {
1791 let inliner = CSSInliner::options().apply_width_attributes(true).build();
1792 let html = r#"<html><head><style>img { width: 100px; }</style></head><body><img src="test.jpg"></body></html>"#;
1793 let result = inliner.inline(html).unwrap();
1794 assert!(result.contains(r#"width="100""#));
1795 assert!(result.contains(r#"style="width: 100px;""#));
1796}
1797
1798#[test]
1799fn apply_height_attribute_img() {

Callers

nothing calls this directly

Calls 3

buildMethod · 0.45
inlineMethod · 0.45

Tested by

no test coverage detected