vertical-align can take negative lengths and percentages.

http://dev.w3.org/csswg/css2/visudet.html#propdef-vertical-align
This commit is contained in:
Simon Sapin 2015-04-22 17:19:00 +02:00
parent 886805d76c
commit 53c88f0413

View file

@ -608,7 +608,7 @@ pub mod longhands {
/// baseline | sub | super | top | text-top | middle | bottom | text-bottom
/// | <percentage> | <length>
pub fn parse(_context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> {
input.try(specified::LengthOrPercentage::parse_non_negative)
input.try(specified::LengthOrPercentage::parse)
.map(SpecifiedValue::LengthOrPercentage)
.or_else(|()| {
match_ignore_ascii_case! { try!(input.expect_ident()),