mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 18:22:45 +00:00 
			
		
		
		
	 142d498f14
			
		
	
	
		142d498f14
		
	
	
	
	
		
			
			Pseudo-elements like ::before and ::after were discarded when their
content property was an empty string (ignoring whitespace), because they
are anonymous containers with no lines.
Our previous way around it was to add an empty line box (see b062a0fb7c)
however it didn't actually work for cases described in the previous
commit.
This makes avatars and cover arts square on last.fm and "fixes" the test
css-pseudo-element-should-not-be-affected-by-presentational-hints.html.
Unfortunately, this also regresses on block-and-inline/clearfix.html,
but that hopefully will be handled in subsequent commit.
		
	
			
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			377 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			377 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!doctype html><style>
 | |
| div {
 | |
|     background: green;
 | |
|     display: block;
 | |
|     width: 50px;
 | |
|     margin: 25px;
 | |
| }
 | |
| 
 | |
| div.empty_content::after {
 | |
|     content: "";
 | |
|     display: block;
 | |
|     padding-top: 100%;
 | |
| }
 | |
| 
 | |
| div.content_with_space::after {
 | |
|     content: " ";
 | |
|     display: block;
 | |
|     padding-top: 100%;
 | |
| }
 | |
| </style><div class=empty_content></div><div class=content_with_space></div></div>
 |