style: Properly use integers on grid properties, and derive ToComputedValue.

This commit is contained in:
Emilio Cobos Álvarez 2017-09-09 14:33:53 +02:00
parent 02d24061e7
commit 64ab73eabd
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 112 additions and 91 deletions

View file

@ -147,7 +147,7 @@
let end = if input.try(|i| i.expect_delim('/')).is_ok() {
GridLine::parse(context, input)?
} else {
let mut line = GridLine::default();
let mut line = GridLine::auto();
if start.line_num.is_none() && !start.is_span {
line.ident = start.ident.clone(); // ident from start value should be taken
}
@ -182,7 +182,7 @@
pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
-> Result<Longhands, ParseError<'i>> {
fn line_with_ident_from(other: &GridLine) -> GridLine {
let mut this = GridLine::default();
let mut this = GridLine::auto();
if other.line_num.is_none() && !other.is_span {
this.ident = other.ident.clone();
}