mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:52:44 +00:00 
			
		
		
		
	 141143a1c6
			
		
	
	
		141143a1c6
		
	
	
	
	
		
			
			Prior to this commit, PropertyOwningCSSStyleDeclaration::serialized() did not include custom properties, which lead to an incomplete `cssRule.cssText` result. This commit makes that class also serialize the custom properties and place them before the regular properties in the rule text.
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			402 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			402 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <script src="../include.js"></script>
 | |
| <script>
 | |
|     test(() => {
 | |
|         let styleNode = document.createElement("style");
 | |
|         styleNode.innerText = `
 | |
|             test {
 | |
|                 --color: red;
 | |
|                 color: red;
 | |
|             }
 | |
|         `;
 | |
|         document.head.appendChild(styleNode);
 | |
|         const sheet = styleNode.sheet;
 | |
|         println(sheet.cssRules[0].cssText);
 | |
|     });
 | |
| </script>
 |