mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:22:45 +00:00 
			
		
		
		
	 47eb4b2db7
			
		
	
	
		47eb4b2db7
		
	
	
	
	
		
			
			This behaves identically to :is() except for specificity, so this test page is identical to the other one. It's not because I'm lazy. :^)
		
			
				
	
	
		
			38 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!doctype html>
 | |
| <html lang="en">
 | |
| <head>
 | |
|     <meta charset="utf-8">
 | |
|     <title>:where() test</title>
 | |
|     <style>
 | |
|         div {
 | |
|             border: 1px solid black;
 | |
|             margin-bottom: 1em;
 | |
|             padding: 0 0.5em;
 | |
|         }
 | |
|         .special :where(h2, p) {
 | |
|             background-color: lime;
 | |
|         }
 | |
|         .forgiving :where(&&&fakhsdaskjhd, h2, p) {
 | |
|             background-color: lime;
 | |
|         }
 | |
|     </style>
 | |
| </head>
 | |
| <body>
 | |
|     <h1>:where() test</h1>
 | |
|     <div>
 | |
|         <h2>Nothing</h2>
 | |
|         <p>These should have no background.</p>
 | |
|     </div>
 | |
|     <br/>
 | |
|     <div class="special">
 | |
|         <h2>.special :where(h2, p)</h2>
 | |
|         <p>These should have a green background.</p>
 | |
|     </div>
 | |
|     <br/>
 | |
|     <div class="forgiving">
 | |
|         <h2>.forgiving :where(&&&fakhsdaskjhd, h2, p)</h2>
 | |
|         <p>These should have a green background. :where() takes a "permissive selector list",
 | |
|             so even though part of it is invalid, this does not make the whole selector-list invalid.</p>
 | |
|     </div>
 | |
| </body>
 | |
| </html>
 |