mirror of
https://github.com/servo/servo.git
synced 2025-06-21 23:59:00 +01:00
Allow unitless zero when parsing gradients' center
This commit is contained in:
parent
133b599a6f
commit
ba3f18f485
1 changed files with 1 additions and 1 deletions
|
@ -396,7 +396,7 @@ impl AngleOrCorner {
|
||||||
|
|
||||||
impl AngleOrCorner {
|
impl AngleOrCorner {
|
||||||
fn parse(context: &ParserContext, input: &mut Parser, mode: CompatMode) -> Result<Self, ()> {
|
fn parse(context: &ParserContext, input: &mut Parser, mode: CompatMode) -> Result<Self, ()> {
|
||||||
if let Ok(angle) = input.try(|i| Angle::parse(context, i)) {
|
if let Ok(angle) = input.try(|i| Angle::parse_with_unitless(context, i)) {
|
||||||
try!(input.expect_comma());
|
try!(input.expect_comma());
|
||||||
return Ok(AngleOrCorner::Angle(angle))
|
return Ok(AngleOrCorner::Angle(angle))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue