Skip to content

Commit

Permalink
Merge pull request #5 from NervJS/fix/lineHeight
Browse files Browse the repository at this point in the history
feat: 将不处理的属性进行移除
  • Loading branch information
luckyadam authored Nov 6, 2023
2 parents 266e92e + 7668be8 commit 021cc02
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/style_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,15 @@ pub fn parse_style_properties(properties: &Vec<(String, Property<'_>)>) -> Style
StyleValueType::Matrices(transform.matrix),
);
}
},
"height" | "width" | "fontSize" | "top" | "left" | "bottom" | "right" => {
final_properties.insert(prefix_style_key(property_name), StyleValueType::Normal(
value.value_to_css_string(PrinterOptions::default()).unwrap()
));
}
_ => {
final_properties.insert(
prefix_style_key(id),
id.to_string(),
StyleValueType::Normal(
value
.value_to_css_string(PrinterOptions {
Expand Down

0 comments on commit 021cc02

Please # to comment.