mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
LibWeb: Add basic parsing of grid shorthand CSS property
Introduces incomplete parsing of grid shorthand property. Only <grid-template> part of syntax is supported for now but it is enough to significantly improve rendering of websites that use this shorthand to define grid :)
This commit is contained in:
parent
1e526af430
commit
ab5b89eb95
6 changed files with 44 additions and 1 deletions
|
@ -639,7 +639,7 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
|
|||
return;
|
||||
}
|
||||
|
||||
if (property_id == CSS::PropertyID::GridTemplate) {
|
||||
if (property_id == CSS::PropertyID::GridTemplate || property_id == CSS::PropertyID::Grid) {
|
||||
if (value.is_grid_track_size_list_shorthand()) {
|
||||
auto const& shorthand = value.as_grid_track_size_list_shorthand();
|
||||
style.set_property(CSS::PropertyID::GridTemplateAreas, shorthand.areas());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue