mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Allow parsing nested calc() expressions.
This commit is contained in:
parent
ed7686b42c
commit
cd43331963
3 changed files with 5 additions and 3 deletions
|
@ -843,6 +843,10 @@ impl CalcLengthOrPercentage {
|
|||
input.parse_nested_block(|i| CalcLengthOrPercentage::parse_sum(context, i, expected_unit))
|
||||
.map(|result| CalcValueNode::Sum(Box::new(result)))
|
||||
},
|
||||
(Token::Function(ref name), _) if name.eq_ignore_ascii_case("calc") => {
|
||||
input.parse_nested_block(|i| CalcLengthOrPercentage::parse_sum(context, i, expected_unit))
|
||||
.map(|result| CalcValueNode::Sum(Box::new(result)))
|
||||
}
|
||||
_ => Err(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue