mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 00:32:45 +00:00 
			
		
		
		
	LibWeb: Add a spec comment for color interpolation
This commit is contained in:
		
							parent
							
								
									29b70485fc
								
							
						
					
					
						commit
						f02cd4d0b0
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -1069,6 +1069,8 @@ static ErrorOr<NonnullRefPtr<StyleValue const>> interpolate_value(DOM::Element& | ||||||
|     case StyleValue::Type::Angle: |     case StyleValue::Type::Angle: | ||||||
|         return AngleStyleValue::create(Angle::make_degrees(interpolate_raw(from.as_angle().angle().to_degrees(), to.as_angle().angle().to_degrees(), delta))); |         return AngleStyleValue::create(Angle::make_degrees(interpolate_raw(from.as_angle().angle().to_degrees(), to.as_angle().angle().to_degrees(), delta))); | ||||||
|     case StyleValue::Type::Color: { |     case StyleValue::Type::Color: { | ||||||
|  |         // https://drafts.csswg.org/css-color/#interpolation-space
 | ||||||
|  |         // If the host syntax does not define what color space interpolation should take place in, it defaults to Oklab.
 | ||||||
|         auto from_color = from.as_color().color(); |         auto from_color = from.as_color().color(); | ||||||
|         auto to_color = to.as_color().color(); |         auto to_color = to.as_color().color(); | ||||||
|         auto from_oklab = from_color.to_oklab(); |         auto from_oklab = from_color.to_oklab(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Matthew Olsson
						Matthew Olsson