mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:12:43 +00:00 
			
		
		
		
	 71d5dc510e
			
		
	
	
		71d5dc510e
		
	
	
	
	
		
			
			SVG presentation attributes are parsed as CSS values, so we also need to handle CSS variable expansion when handling them. This (roughly) matches the behavior of other engines. It's also used on the web, for example on https://stripe.com/ :^)
		
			
				
	
	
		
			10 lines
		
	
	
		
			No EOL
		
	
	
		
			268 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			No EOL
		
	
	
		
			268 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!doctype html><style>
 | |
|     :root {
 | |
|         --huge: 5px;
 | |
|     }
 | |
|     svg {
 | |
|         width: 100px;
 | |
|         height: 100px;
 | |
|         border: 1px solid black;
 | |
|     }
 | |
| </style><svg viewBox="0 0 10 10"><rect x=4.5 y=4.5 width=1 height=1 stroke="green" stroke-width="var(--huge)" /> |