mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:07:34 +00:00
LibWeb: Add helper for creating <dimension>
CSS tokens
This commit is contained in:
parent
27ddfa84fa
commit
2c7603f2ae
1 changed files with 9 additions and 0 deletions
|
@ -175,6 +175,15 @@ public:
|
|||
return token;
|
||||
}
|
||||
|
||||
static Token create_dimension(double value, FlyString unit)
|
||||
{
|
||||
Token token;
|
||||
token.m_type = Type::Dimension;
|
||||
token.m_number_value = Number(Number::Type::Number, value);
|
||||
token.m_value = move(unit);
|
||||
return token;
|
||||
}
|
||||
|
||||
private:
|
||||
Type m_type { Type::Invalid };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue