mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Parse '0' as a number for border-image-width.
As per CSS Values & Units: "However, if a 0 could be parsed as either a <number> or a <length> in a property (such as line-height), it must parse as a <number>." (https://drafts.csswg.org/css-values-4/#lengths) Differential Revision: https://phabricator.services.mozilla.com/D46723
This commit is contained in:
parent
a0e2aeb51c
commit
877c6ac821
2 changed files with 6 additions and 20 deletions
|
@ -16,6 +16,7 @@ use style_traits::{CssWriter, ToCss};
|
|||
Copy,
|
||||
Debug,
|
||||
MallocSizeOf,
|
||||
Parse,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
|
@ -25,10 +26,13 @@ use style_traits::{CssWriter, ToCss};
|
|||
)]
|
||||
#[repr(C, u8)]
|
||||
pub enum GenericBorderImageSideWidth<LP, N> {
|
||||
/// `<number>`
|
||||
///
|
||||
/// NOTE: Numbers need to be before length-percentagess, in order to parse
|
||||
/// them first, since `0` should be a number, not the `0px` length.
|
||||
Number(N),
|
||||
/// `<length-or-percentage>`
|
||||
LengthPercentage(LP),
|
||||
/// `<number>`
|
||||
Number(N),
|
||||
/// `auto`
|
||||
Auto,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue