Serenity Operating System
at master 33 lines 565 B view raw
1/* 2 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#pragma once 8 9#include <LibGfx/Size.h> 10#include <LibWeb/PixelUnits.h> 11 12namespace Web::Layout { 13 14struct PixelBox { 15 CSSPixels top { 0 }; 16 CSSPixels right { 0 }; 17 CSSPixels bottom { 0 }; 18 CSSPixels left { 0 }; 19}; 20 21struct BoxModelMetrics { 22public: 23 PixelBox margin; 24 PixelBox padding; 25 PixelBox border; 26 PixelBox inset; 27 28 PixelBox margin_box() const; 29 PixelBox padding_box() const; 30 PixelBox border_box() const; 31}; 32 33}