mirror of
https://github.com/servo/servo.git
synced 2025-08-23 22:35:33 +01:00
Implement the unitless length quirk for border-width
This commit is contained in:
parent
b5a558e592
commit
91cc30046b
2 changed files with 4 additions and 24 deletions
|
@ -17,11 +17,12 @@ ${helpers.four_sides_shorthand("border-style", "border-%s-style",
|
|||
for side in PHYSICAL_SIDES)}"
|
||||
spec="https://drafts.csswg.org/css-backgrounds/#border-width">
|
||||
use super::parse_four_sides;
|
||||
use parser::Parse;
|
||||
use values::specified;
|
||||
use values::specified::{AllowQuirks, BorderWidth};
|
||||
|
||||
pub fn parse_value(context: &ParserContext, input: &mut Parser) -> Result<Longhands, ()> {
|
||||
let (top, right, bottom, left) = try!(parse_four_sides(input, |i| specified::BorderWidth::parse(context, i)));
|
||||
let (top, right, bottom, left) = try!(parse_four_sides(input, |i| {
|
||||
BorderWidth::parse_quirky(context, i, AllowQuirks::Yes)
|
||||
}));
|
||||
Ok(Longhands {
|
||||
% for side in PHYSICAL_SIDES:
|
||||
${to_rust_ident('border-%s-width' % side)}: ${side},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue