mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 11:42:45 +00:00 
			
		
		
		
	LibHTML: Respect the CSS "color" property for text
Also remove the color values from the ComputedStyle object and get them via StyleProperties instead. At the moment, we only handle colors that Color::from_string() parses.
This commit is contained in:
		
							parent
							
								
									b8cab2a934
								
							
						
					
					
						commit
						62cbaa74f3
					
				
					 7 changed files with 56 additions and 10 deletions
				
			
		|  | @ -1,6 +1,5 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <LibDraw/Color.h> | ||||
| #include <LibDraw/Size.h> | ||||
| #include <LibHTML/CSS/LengthBox.h> | ||||
| 
 | ||||
|  | @ -14,9 +13,6 @@ public: | |||
|     ComputedStyle(); | ||||
|     ~ComputedStyle(); | ||||
| 
 | ||||
|     Color text_color() const { return m_text_color; } | ||||
|     Color background_color() const { return m_background_color; } | ||||
| 
 | ||||
|     LengthBox& margin() { return m_margin; } | ||||
|     LengthBox& padding() { return m_padding; } | ||||
|     LengthBox& border() { return m_border; } | ||||
|  | @ -40,9 +36,6 @@ public: | |||
|     PixelBox full_margin() const; | ||||
| 
 | ||||
| private: | ||||
|     Color m_text_color; | ||||
|     Color m_background_color; | ||||
| 
 | ||||
|     LengthBox m_margin; | ||||
|     LengthBox m_padding; | ||||
|     LengthBox m_border; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling