Skip to content

Commit 021cc02

Browse files
authored
Merge pull request #5 from NervJS/fix/lineHeight
feat: 将不处理的属性进行移除
2 parents 266e92e + 7668be8 commit 021cc02

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/style_parser.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,10 +506,15 @@ pub fn parse_style_properties(properties: &Vec<(String, Property<'_>)>) -> Style
506506
StyleValueType::Matrices(transform.matrix),
507507
);
508508
}
509+
},
510+
"height" | "width" | "fontSize" | "top" | "left" | "bottom" | "right" => {
511+
final_properties.insert(prefix_style_key(property_name), StyleValueType::Normal(
512+
value.value_to_css_string(PrinterOptions::default()).unwrap()
513+
));
509514
}
510515
_ => {
511516
final_properties.insert(
512-
prefix_style_key(id),
517+
id.to_string(),
513518
StyleValueType::Normal(
514519
value
515520
.value_to_css_string(PrinterOptions {

0 commit comments

Comments
 (0)