@@ 28,12 28,15 @@ data ColourPallet = ColourPallet {
}
instance PropertyParser ColourPallet where
- temp = ColourPallet { foreground = opaque blue, accent = opaque blue }
+ temp = ColourPallet { foreground = opaque black, accent = opaque blue }
inherit = id
priority _ = ["color", "accent"]
+ longhand _ self "color" [Ident "initial"]=Just self {foreground=opaque black}
longhand _ self "color" toks | Just ([], val) <- parseColour self toks =
Just self { foreground = val }
+ longhand _ self "accent-color" [Ident kw]
+ | kw `elem` ["initial", "auto"] = Just self {accent = opaque blue}
longhand _ self "accent-color" t | Just ([], val) <- parseColour self t =
Just self { accent = val }
longhand _ _ _ _ = Nothing
@@ 232,7 235,7 @@ parseColour _ (Ident x:toks) | Txt.toLower x == "transparent" =
Just (toks, transparent)
-- FIXME: Add infrastructure to prioritize resolving `color`
parseColour self (Ident x:toks)
- | Txt.toLower x == "currentcolor" = Just (toks, foreground self)
+ | Txt.toLower x `elem` ["currentcolor","initial"]=Just (toks,foreground self)
| Txt.toLower x == "accentcolor" = Just (toks, accent self)
parseColour _ (Function "hsl":h':Comma: