mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:02:45 +00:00 
			
		
		
		
	 6bf107fc16
			
		
	
	
		6bf107fc16
		
	
	
	
	
		
			
			These apply to any elements that have some kind of open/closed state. The spec suggests `<details>`, `<dialog>`, and `<select>`, so that's what I've supported here. Only `<details>` is fleshed out right now, but once the others are, these pseudo-classes should work automatically. :^)
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			288 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			288 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!doctype html>
 | |
| <style>
 | |
|     .open {
 | |
|         color: green;
 | |
|     }
 | |
|     .closed {
 | |
|         color: red;
 | |
|     }
 | |
| </style>
 | |
| <details open class="open">
 | |
|     <summary>Hi</summary>
 | |
|     Well hello friends!
 | |
| </details>
 | |
| <details class="closed">
 | |
|     <summary>Hi</summary>
 | |
|     Well hello friends!
 | |
| </details>
 |