mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:08:11 +00:00
LibWeb: Add cm, in, mm and Q CSS units
This commit is contained in:
parent
279a49cdf4
commit
a9335eea1c
3 changed files with 45 additions and 3 deletions
|
@ -62,10 +62,18 @@ float Length::relative_length_to_px(const LayoutNode& layout_node) const
|
|||
const char* Length::unit_name() const
|
||||
{
|
||||
switch (m_type) {
|
||||
case Type::Cm:
|
||||
return "cm";
|
||||
case Type::In:
|
||||
return "in";
|
||||
case Type::Px:
|
||||
return "px";
|
||||
case Type::Pt:
|
||||
return "pt";
|
||||
case Type::Mm:
|
||||
return "mm";
|
||||
case Type::Q:
|
||||
return "Q";
|
||||
case Type::Ex:
|
||||
return "ex";
|
||||
case Type::Em:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue