mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
LibWeb: Add *lots* of viewport-based Length units
`sfoo` `lfoo` and `dfoo` are, for our purposes, identical to `foo`, because we don't have dynamic GUI elements that cover the page content.
This commit is contained in:
parent
0dd585ba7b
commit
091a1ff527
2 changed files with 85 additions and 1 deletions
|
@ -33,9 +33,21 @@ public:
|
|||
|
||||
// Viewport-relative
|
||||
Vw,
|
||||
Svw,
|
||||
Lvw,
|
||||
Dvw,
|
||||
Vh,
|
||||
Svh,
|
||||
Lvh,
|
||||
Dvh,
|
||||
Vmin,
|
||||
Svmin,
|
||||
Lvmin,
|
||||
Dvmin,
|
||||
Vmax,
|
||||
Svmax,
|
||||
Lvmax,
|
||||
Dvmax,
|
||||
|
||||
// Absolute
|
||||
Cm,
|
||||
|
@ -105,9 +117,21 @@ public:
|
|||
bool is_viewport_relative() const
|
||||
{
|
||||
return m_type == Type::Vw
|
||||
|| m_type == Type::Svw
|
||||
|| m_type == Type::Lvw
|
||||
|| m_type == Type::Dvw
|
||||
|| m_type == Type::Vh
|
||||
|| m_type == Type::Svh
|
||||
|| m_type == Type::Lvh
|
||||
|| m_type == Type::Dvh
|
||||
|| m_type == Type::Vmin
|
||||
|| m_type == Type::Vmax;
|
||||
|| m_type == Type::Svmin
|
||||
|| m_type == Type::Lvmin
|
||||
|| m_type == Type::Dvmin
|
||||
|| m_type == Type::Vmax
|
||||
|| m_type == Type::Svmax
|
||||
|| m_type == Type::Lvmax
|
||||
|| m_type == Type::Dvmax;
|
||||
}
|
||||
|
||||
bool is_relative() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue