mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Use fill length rather than index to indicate a repeat(auto) in subgrid from Servo.
Differential Revision: https://phabricator.services.mozilla.com/D70066
This commit is contained in:
parent
e6687c5fa8
commit
a8c318a068
1 changed files with 3 additions and 3 deletions
|
@ -714,7 +714,7 @@ impl Parse for LineNameList {
|
||||||
line_names.truncate(MAX_GRID_LINE as usize);
|
line_names.truncate(MAX_GRID_LINE as usize);
|
||||||
}
|
}
|
||||||
|
|
||||||
let (fill_start, fill_len) = fill_data.unwrap_or((usize::MAX, 0));
|
let (fill_start, fill_len) = fill_data.unwrap_or((0, 0));
|
||||||
|
|
||||||
Ok(LineNameList {
|
Ok(LineNameList {
|
||||||
names: line_names.into(),
|
names: line_names.into(),
|
||||||
|
@ -733,7 +733,7 @@ impl ToCss for LineNameList {
|
||||||
let fill_start = self.fill_start;
|
let fill_start = self.fill_start;
|
||||||
let fill_len = self.fill_len;
|
let fill_len = self.fill_len;
|
||||||
for (i, names) in self.names.iter().enumerate() {
|
for (i, names) in self.names.iter().enumerate() {
|
||||||
if i == fill_start {
|
if fill_len > 0 && i == fill_start {
|
||||||
dest.write_str(" repeat(auto-fill,")?;
|
dest.write_str(" repeat(auto-fill,")?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -748,7 +748,7 @@ impl ToCss for LineNameList {
|
||||||
}
|
}
|
||||||
|
|
||||||
dest.write_str("]")?;
|
dest.write_str("]")?;
|
||||||
if i == fill_start + fill_len - 1 {
|
if fill_len > 0 && i == fill_start + fill_len - 1 {
|
||||||
dest.write_str(")")?;
|
dest.write_str(")")?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue