1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:47:35 +00:00

LibWeb: Add list-style-type: decimal-leading-zero support

This doesn't exactly do what you would think from its name: It surely
adds an extra leading zero to the front of a number, but only if the
number is less than 10. CSS is weird sometimes.
This commit is contained in:
Tobias Christiansen 2021-04-22 22:14:24 +02:00 committed by Andreas Kling
parent 64d7a8b7aa
commit 0983cd9243
4 changed files with 11 additions and 0 deletions

View file

@ -77,6 +77,7 @@
"crosshair",
"dashed",
"decimal",
"decimal-leading-zero",
"default",
"disc",
"dotted",

View file

@ -576,6 +576,8 @@ Optional<CSS::ListStyleType> StyleProperties::list_style_type() const
return CSS::ListStyleType::Square;
case CSS::ValueID::Decimal:
return CSS::ListStyleType::Decimal;
case CSS::ValueID::DecimalLeadingZero:
return CSS::ListStyleType::DecimalLeadingZero;
default:
return {};
}

View file

@ -159,6 +159,7 @@ enum class ListStyleType {
Circle,
Square,
Decimal,
DecimalLeadingZero,
};
enum class Overflow : u8 {