Skip to content

Commit

Permalink
Merge pull request #623 from Sharktheone/css/lists
Browse files Browse the repository at this point in the history
remove lists with len of 1 into a normal CssValue
  • Loading branch information
Sharktheone authored Oct 13, 2024
2 parents 388f295 + bfa4653 commit d25ef5b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/gosub_css3/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ impl CssSystem for Css3System {
continue;
}

let value = if let CssValue::List(mut value) = value {
if value.len() == 1 {
value.pop().expect("unreachable")
} else {
CssValue::List(value)
}
} else {
value
};

// create property for the given values
let property_name = declaration.property.clone();
let decl = CssDeclaration {
Expand Down

0 comments on commit d25ef5b

Please sign in to comment.