mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 06:42:43 +00:00 
			
		
		
		
	 fe908e7db2
			
		
	
	
		fe908e7db2
		
	
	
	
	
		
			
			The CSS Positioned Layout spec refers to the top/left/bottom/right properties as "inset" properties, so let's use the same terminology.
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			518 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			518 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibGfx/Size.h>
 | |
| 
 | |
| namespace Web::Layout {
 | |
| 
 | |
| struct PixelBox {
 | |
|     float top { 0 };
 | |
|     float right { 0 };
 | |
|     float bottom { 0 };
 | |
|     float left { 0 };
 | |
| };
 | |
| 
 | |
| struct BoxModelMetrics {
 | |
| public:
 | |
|     PixelBox margin;
 | |
|     PixelBox padding;
 | |
|     PixelBox border;
 | |
|     PixelBox inset;
 | |
| 
 | |
|     PixelBox margin_box() const;
 | |
|     PixelBox padding_box() const;
 | |
|     PixelBox border_box() const;
 | |
| };
 | |
| 
 | |
| }
 |