Implement the unitless length quirk for letter-spacing

This commit is contained in:
Anthony Ramine 2017-04-24 17:47:56 +02:00
parent 65f74ea934
commit 72186c200c
2 changed files with 2 additions and 19 deletions

View file

@ -411,6 +411,7 @@ ${helpers.single_keyword("text-align-last",
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use values::specified::AllowQuirks;
impl HasViewportPercentage for SpecifiedValue {
fn has_viewport_percentage(&self) -> bool {
@ -487,7 +488,7 @@ ${helpers.single_keyword("text-align-last",
if input.try(|input| input.expect_ident_matching("normal")).is_ok() {
Ok(SpecifiedValue::Normal)
} else {
specified::Length::parse(context, input).map(SpecifiedValue::Specified)
specified::Length::parse_quirky(context, input, AllowQuirks::Yes).map(SpecifiedValue::Specified)
}
}
</%helpers:longhand>

View file

@ -12,9 +12,6 @@
expected:
if os == "mac": FAIL
[letter-spacing: 1 (quirks)]
expected: FAIL
[margin-left: 1 (quirks)]
expected: FAIL
@ -87,9 +84,6 @@
expected:
if os == "mac": FAIL
[letter-spacing: +1 (quirks)]
expected: FAIL
[margin-left: +1 (quirks)]
expected: FAIL
@ -162,9 +156,6 @@
expected:
if os == "mac": FAIL
[letter-spacing: -1 (quirks)]
expected: FAIL
[margin-left: -1 (quirks)]
expected: FAIL
@ -213,9 +204,6 @@
expected:
if os == "mac": FAIL
[letter-spacing: 1.5 (quirks)]
expected: FAIL
[margin-left: 1.5 (quirks)]
expected: FAIL
@ -288,9 +276,6 @@
expected:
if os == "mac": FAIL
[letter-spacing: +1.5 (quirks)]
expected: FAIL
[margin-left: +1.5 (quirks)]
expected: FAIL
@ -363,9 +348,6 @@
expected:
if os == "mac": FAIL
[letter-spacing: -1.5 (quirks)]
expected: FAIL
[margin-left: -1.5 (quirks)]
expected: FAIL