mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:42:45 +00:00 
			
		
		
		
	LibWeb: Parse flexible length values for GridTrackSizes
Fix a bug as well as implement new functionality by parsing flexible length values for GridTrackSizes.
This commit is contained in:
		
							parent
							
								
									2fa124e8d9
								
							
						
					
					
						commit
						493c6cf0fd
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		|  | @ -5329,6 +5329,15 @@ RefPtr<StyleValue> Parser::parse_grid_track_sizes(Vector<ComponentValue> const& | |||
|             params.append(Length::make_auto()); | ||||
|             continue; | ||||
|         } | ||||
|         if (component_value.token().type() == Token::Type::Dimension) { | ||||
|             float numeric_value = component_value.token().dimension_value(); | ||||
|             auto unit_string = component_value.token().dimension_unit(); | ||||
|             if (unit_string.equals_ignoring_case("fr"sv) && numeric_value) { | ||||
|                 params.append(GridTrackSize(numeric_value)); | ||||
|                 continue; | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         auto dimension = parse_dimension(component_value); | ||||
|         if (!dimension.has_value()) | ||||
|             return GridTrackSizeStyleValue::create({}); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 martinfalisse
						martinfalisse