1
Fork 0
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:
Luke 2020-09-29 19:06:58 +01:00 committed by Andreas Kling
parent 279a49cdf4
commit a9335eea1c
3 changed files with 45 additions and 3 deletions

View file

@ -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: