mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:42:43 +00:00 
			
		
		
		
	 ffc81cbfad
			
		
	
	
		ffc81cbfad
		
	
	
	
	
		
			
			Rather than parsing the selector every time we want to check it, we now parse it once at the beginning. A bonus effect of this is that we now support a selector list in :not(), instead of just a single selector, though only when using the new parser.
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			298 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			298 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <html>
 | |
| <head>
 | |
| <title>:only-child test</title>
 | |
| <style>
 | |
| div {
 | |
|     background: yellow;
 | |
| }
 | |
| 
 | |
| div:not(div div) {
 | |
|     background: lime;
 | |
| }
 | |
| </style>
 | |
| </head>
 | |
| <body>
 | |
|   <div>I am not a descendant and should be green.</div>
 | |
|   <div>
 | |
|     <div>I am a descendant and should be yellow.</div>
 | |
|   </div>
 | |
| </body>
 | |
| </html>
 |