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

Function extra_css

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

Source from the content-addressed store, hash-verified

781
782#[test]
783fn extra_css() {
784 let html = html!("h1 {background-color: blue;}", "<h1>Hello world!</h1>");
785 let options = InlineOptions {
786 inline_style_tags: false,
787 extra_css: Some("h1 {background-color: green;}".into()),
788 ..Default::default()
789 };
790 let inliner = CSSInliner::new(options);
791 let result = inliner.inline(&html).unwrap();
792 assert_eq!(
793 result,
794 "<html><head></head><body><h1 style=\"background-color: green;\">Hello world!</h1></body></html>"
795 )
796}
797
798#[test]
799fn remote_file_stylesheet() {

Callers

nothing calls this directly

Calls 1

inlineMethod · 0.45

Tested by

no test coverage detected