mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add shorthand parsing/serialization for grid-template
This commit is contained in:
parent
7dbd17bf70
commit
7b68d8d8bf
3 changed files with 164 additions and 2 deletions
|
@ -397,6 +397,13 @@ ${helpers.predefined_type("object-position",
|
|||
while let Ok(string) = input.try(Parser::expect_string) {
|
||||
strings.push(string.into_owned().into_boxed_str());
|
||||
}
|
||||
|
||||
TemplateAreas::from_vec(strings)
|
||||
}
|
||||
}
|
||||
|
||||
impl TemplateAreas {
|
||||
pub fn from_vec(strings: Vec<Box<str>>) -> Result<TemplateAreas, ()> {
|
||||
if strings.is_empty() {
|
||||
return Err(());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue