mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 10:36:02 +00:00
LibWeb: Add spec utility function for GridTrackSize
Often in the spec they talk about intrinsic_track_sizes and this way can have a clearer way of checking if a GridTrackSize is indeed an "intrinsic track size".
This commit is contained in:
parent
9681eb89a6
commit
df88e2bd8e
Notes:
sideshowbarker
2024-07-17 07:12:03 +09:00
Author: https://github.com/martinfalisse
Commit: df88e2bd8e
Pull-request: https://github.com/SerenityOS/serenity/pull/15155
Reviewed-by: https://github.com/MacDue
1 changed files with 8 additions and 0 deletions
|
@ -38,6 +38,14 @@ public:
|
||||||
Percentage percentage() const { return m_percentage; }
|
Percentage percentage() const { return m_percentage; }
|
||||||
float flexible_length() const { return m_flexible_length; }
|
float flexible_length() const { return m_flexible_length; }
|
||||||
|
|
||||||
|
// https://drafts.csswg.org/css-grid/#layout-algorithm
|
||||||
|
// Intrinsic sizing function - min-content, max-content, auto, fit-content()
|
||||||
|
// FIXME: Add missing properties once implemented.
|
||||||
|
bool is_intrinsic_track_sizing() const
|
||||||
|
{
|
||||||
|
return (m_type == Type::Length && m_length.is_auto());
|
||||||
|
}
|
||||||
|
|
||||||
String to_string() const;
|
String to_string() const;
|
||||||
bool operator==(GridTrackSize const& other) const
|
bool operator==(GridTrackSize const& other) const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue