mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-31 15:32:51 +00:00
LibWeb: Add pc CSS unit
This commit is contained in:
parent
aa71dae03c
commit
043b31ad9a
Notes:
sideshowbarker
2024-07-19 02:02:02 +09:00
Author: https://github.com/Lubrsi
Commit: 043b31ad9a
Pull-request: https://github.com/SerenityOS/serenity/pull/3694
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