summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp66
1 files changed, 66 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
index 9237950e6e..325f9d111e 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
@@ -4029,6 +4029,72 @@ ErrorOr<RefPtr<StyleValue>> Parser::parse_color_value(ComponentValue const& comp
if (color.has_value())
return ColorStyleValue::create(color.value());
+ if (component_value.is(Token::Type::Ident)) {
+ if (auto ident = value_id_from_string(component_value.token().ident()); ident.has_value()) {
+ switch (ident.value()) {
+ case ValueID::Currentcolor:
+ case ValueID::LibwebLink:
+ case ValueID::LibwebPaletteActiveLink:
+ case ValueID::LibwebPaletteActiveWindowBorder1:
+ case ValueID::LibwebPaletteActiveWindowBorder2:
+ case ValueID::LibwebPaletteActiveWindowTitle:
+ case ValueID::LibwebPaletteBase:
+ case ValueID::LibwebPaletteBaseText:
+ case ValueID::LibwebPaletteButton:
+ case ValueID::LibwebPaletteButtonText:
+ case ValueID::LibwebPaletteDesktopBackground:
+ case ValueID::LibwebPaletteFocusOutline:
+ case ValueID::LibwebPaletteHighlightWindowBorder1:
+ case ValueID::LibwebPaletteHighlightWindowBorder2:
+ case ValueID::LibwebPaletteHighlightWindowTitle:
+ case ValueID::LibwebPaletteHoverHighlight:
+ case ValueID::LibwebPaletteInactiveSelection:
+ case ValueID::LibwebPaletteInactiveSelectionText:
+ case ValueID::LibwebPaletteInactiveWindowBorder1:
+ case ValueID::LibwebPaletteInactiveWindowBorder2:
+ case ValueID::LibwebPaletteInactiveWindowTitle:
+ case ValueID::LibwebPaletteLink:
+ case ValueID::LibwebPaletteMenuBase:
+ case ValueID::LibwebPaletteMenuBaseText:
+ case ValueID::LibwebPaletteMenuSelection:
+ case ValueID::LibwebPaletteMenuSelectionText:
+ case ValueID::LibwebPaletteMenuStripe:
+ case ValueID::LibwebPaletteMovingWindowBorder1:
+ case ValueID::LibwebPaletteMovingWindowBorder2:
+ case ValueID::LibwebPaletteMovingWindowTitle:
+ case ValueID::LibwebPaletteRubberBandBorder:
+ case ValueID::LibwebPaletteRubberBandFill:
+ case ValueID::LibwebPaletteRuler:
+ case ValueID::LibwebPaletteRulerActiveText:
+ case ValueID::LibwebPaletteRulerBorder:
+ case ValueID::LibwebPaletteRulerInactiveText:
+ case ValueID::LibwebPaletteSelection:
+ case ValueID::LibwebPaletteSelectionText:
+ case ValueID::LibwebPaletteSyntaxComment:
+ case ValueID::LibwebPaletteSyntaxControlKeyword:
+ case ValueID::LibwebPaletteSyntaxIdentifier:
+ case ValueID::LibwebPaletteSyntaxKeyword:
+ case ValueID::LibwebPaletteSyntaxNumber:
+ case ValueID::LibwebPaletteSyntaxOperator:
+ case ValueID::LibwebPaletteSyntaxPreprocessorStatement:
+ case ValueID::LibwebPaletteSyntaxPreprocessorValue:
+ case ValueID::LibwebPaletteSyntaxPunctuation:
+ case ValueID::LibwebPaletteSyntaxString:
+ case ValueID::LibwebPaletteSyntaxType:
+ case ValueID::LibwebPaletteTextCursor:
+ case ValueID::LibwebPaletteThreedHighlight:
+ case ValueID::LibwebPaletteThreedShadow1:
+ case ValueID::LibwebPaletteThreedShadow2:
+ case ValueID::LibwebPaletteVisitedLink:
+ case ValueID::LibwebPaletteWindow:
+ case ValueID::LibwebPaletteWindowText:
+ return IdentifierStyleValue::create(ident.value());
+ default:
+ break;
+ }
+ }
+ }
+
return nullptr;
}