mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 18:25:06 +00:00
LibWeb: Add pc CSS unit
This commit is contained in:
parent
aa71dae03c
commit
043b31ad9a
3 changed files with 16 additions and 5 deletions
|
@ -284,6 +284,9 @@ static CSS::Length parse_length(const CSS::ParsingContext& context, const String
|
|||
} else if (view.ends_with("pt", CaseSensitivity::CaseInsensitive)) {
|
||||
type = CSS::Length::Type::Pt;
|
||||
value = try_parse_float(view.substring_view(0, view.length() - 2));
|
||||
} else if (view.ends_with("pc", CaseSensitivity::CaseInsensitive)) {
|
||||
type = CSS::Length::Type::Pc;
|
||||
value = try_parse_float(view.substring_view(0, view.length() - 2));
|
||||
} else if (view.ends_with("mm", CaseSensitivity::CaseInsensitive)) {
|
||||
type = CSS::Length::Type::Mm;
|
||||
value = try_parse_float(view.substring_view(0, view.length() - 2));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue