mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:52:43 +00:00 
			
		
		
		
	 00d171e4d6
			
		
	
	
		00d171e4d6
		
	
	
	
	
		
			
			This is a very bulky way of doing this, and doesn't seem sustainable to implement every shorthand property this way, but it's a place to start. The "margin" CSS property now expands into its four longhands as far as my understanding of the specs. Note that shorthand expansion happens when we *resolve* style, not when we parse CSS. I'm not sure this is correct anymore, I think other UA's may actually expand shorthands into the declaration directly at parse these days. If so, we should do this at parsing as well.
		
			
				
	
	
		
			8 lines
		
	
	
	
		
			259 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
	
		
			259 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <AK/NonnullRefPtr.h>
 | |
| #include <LibHTML/CSS/StyleSheet.h>
 | |
| 
 | |
| RefPtr<StyleSheet> parse_css(const StringView&);
 | |
| RefPtr<StyleDeclaration> parse_css_declaration(const StringView&);
 | |
| NonnullRefPtr<StyleValue> parse_css_value(const StringView&);
 |