2020-01-18 05:38:21 -03:00
|
|
|
/*
|
2024-10-04 08:19:50 -03:00
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
|
2025-09-01 08:51:52 -03:00
|
|
|
* Copyright (c) 2025, Sam Atkins <sam@ladybird.org>
|
2020-01-18 05:38:21 -03:00
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 05:38:21 -03:00
|
|
|
*/
|
|
|
|
|
|
2019-07-01 12:17:32 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
2023-03-30 13:13:37 -03:00
|
|
|
#include <LibWeb/CSS/PercentageOr.h>
|
2019-07-01 12:17:32 -03:00
|
|
|
|
2020-07-26 15:01:35 -03:00
|
|
|
namespace Web::CSS {
|
2020-03-07 06:27:02 -03:00
|
|
|
|
2022-09-13 12:42:39 -03:00
|
|
|
class LengthBox {
|
|
|
|
|
public:
|
|
|
|
|
LengthBox();
|
2025-09-01 08:51:52 -03:00
|
|
|
LengthBox(LengthPercentageOrAuto top, LengthPercentageOrAuto right, LengthPercentageOrAuto bottom, LengthPercentageOrAuto left);
|
2022-09-13 12:42:39 -03:00
|
|
|
~LengthBox();
|
|
|
|
|
|
2025-09-01 08:51:52 -03:00
|
|
|
LengthPercentageOrAuto& top() { return m_top; }
|
|
|
|
|
LengthPercentageOrAuto& right() { return m_right; }
|
|
|
|
|
LengthPercentageOrAuto& bottom() { return m_bottom; }
|
|
|
|
|
LengthPercentageOrAuto& left() { return m_left; }
|
|
|
|
|
LengthPercentageOrAuto const& top() const { return m_top; }
|
|
|
|
|
LengthPercentageOrAuto const& right() const { return m_right; }
|
|
|
|
|
LengthPercentageOrAuto const& bottom() const { return m_bottom; }
|
|
|
|
|
LengthPercentageOrAuto const& left() const { return m_left; }
|
2022-09-13 12:42:39 -03:00
|
|
|
|
2024-10-26 21:58:52 -03:00
|
|
|
bool operator==(LengthBox const&) const = default;
|
|
|
|
|
|
2022-09-13 12:42:39 -03:00
|
|
|
private:
|
2025-09-01 08:51:52 -03:00
|
|
|
LengthPercentageOrAuto m_top;
|
|
|
|
|
LengthPercentageOrAuto m_right;
|
|
|
|
|
LengthPercentageOrAuto m_bottom;
|
|
|
|
|
LengthPercentageOrAuto m_left;
|
2019-07-01 12:17:32 -03:00
|
|
|
};
|
2020-03-07 06:27:02 -03:00
|
|
|
|
|
|
|
|
}
|