mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:12:43 +00:00 
			
		
		
		
	 eef0edae7a
			
		
	
	
		eef0edae7a
		
	
	
	
	
		
			
			Clean up the Clip test page after adding the logic necessary so that absolutely positioned divs are correctly positioned.
		
			
				
	
	
		
			57 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
	
		
			1.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <html>
 | |
| <head>
 | |
|     <meta charset="UTF-8"/>
 | |
|     <title>CSS Clip Test Page</title>
 | |
|     <style>
 | |
|       .box {
 | |
|         height: 100px;
 | |
|         width: 100px;
 | |
|         position: absolute;
 | |
|         background-color: aquamarine;
 | |
|       }
 | |
| 
 | |
|       .separate-tests {
 | |
|         height: 125px;
 | |
|         border-width: 0px;
 | |
|       }
 | |
|     </style>
 | |
| </head>
 | |
| <body>
 | |
|     <h2>This is a normal rect with auto clipping</h2>
 | |
|     <div class="separate-tests">
 | |
|       <div class="box" style="clip: rect(auto, auto, auto, auto);"></div>
 | |
|     </div>
 | |
| 
 | |
|     <h2>This is a div with the left side clipped out</h2>
 | |
|     <div class="separate-tests">
 | |
|       <div class="box" style="clip: rect(auto, auto, auto, 50px);"></div>
 | |
|     </div>
 | |
| 
 | |
|     <h2>One can create a rect with or without commas and the clip works</h2>
 | |
|     <div class="separate-tests">
 | |
|       <div class="box" style="clip: rect(4em auto auto auto);"></div>
 | |
|     </div>
 | |
| 
 | |
|     <h2>Text and borders are clipped too</h2>
 | |
|     <div class="separate-tests">
 | |
|       <div class="box" style="clip: rect(-5px auto auto 50px); border: 2px solid black;">
 | |
|         Lots of text Lots of text
 | |
|         Lots of text Lots of text
 | |
|         Lots of text Lots of text
 | |
|         Lots of text Lots of text
 | |
|         Lots of text Lots of text
 | |
|       </div>
 | |
|     </div>
 | |
| 
 | |
|     <h2>:yakgone:</h2>
 | |
|     <div class="separate-tests">
 | |
|       <div class="box" style="clip: rect(0px 0px 0px 0px); border: 2px solid black;">
 | |
|         Lots of text Lots of text
 | |
|         Lots of text Lots of text
 | |
|         Lots of text Lots of text
 | |
|         Lots of text Lots of text
 | |
|         Lots of text Lots of text
 | |
|       </div>
 | |
|     </div>
 | |
| </body>
 |