mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:32:43 +00:00 
			
		
		
		
	LibHTML: Respect the link color set via <body link>
The default style for "a" tags now has { color: -libhtml-link; }.
We implement this vendor-specific property by querying the containing
document for the appropriate link color.
Currently we only use the basic link color, but in the future this can
be extended to remember visited links, etc.
			
			
This commit is contained in:
		
							parent
							
								
									83a6474d82
								
							
						
					
					
						commit
						847072c2b1
					
				
					 9 changed files with 68 additions and 13 deletions
				
			
		|  | @ -41,6 +41,9 @@ NonnullRefPtr<StyleValue> parse_css_value(const StringView& view) | |||
|     if (color.has_value()) | ||||
|         return ColorStyleValue::create(color.value()); | ||||
| 
 | ||||
|     if (string == "-libhtml-link") | ||||
|         return IdentifierStyleValue::create(CSS::ValueID::VendorSpecificLink); | ||||
| 
 | ||||
|     return StringStyleValue::create(string); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling