~alcinnz/haskell-stylist

3d212fbfe0890011377615290e06f31cce96c01d — Adrian Cochrane 1 year, 6 months ago cdfed3f
Corrections for display: list-item.
1. It's display: list-item, not display: list
2. Insert an implicit counter-increment: list-item
1 files changed, 7 insertions(+), 4 deletions(-)

M src/Data/CSS/Preprocessor/Text.hs
M src/Data/CSS/Preprocessor/Text.hs => src/Data/CSS/Preprocessor/Text.hs +7 -4
@@ 102,10 102,13 @@ instance PropertyParser p => PropertyParser (TextStyle p) where
    longhand p self "white-space" [Ident "pre-wrap"] = setWhiteSpace p self False False "normal"
    longhand p self "white-space" [Ident "pre-line"] = setWhiteSpace p self True False "normal"

    longhand p self@TextStyle {inner=self'} "display" [Ident "list"] = Just self {
        isListItem = True,
        inner=fromMaybe self' $ longhand (inner p) self' "display" [Ident "block"]
    }
    longhand p self@TextStyle {inner=self'} "display" [Ident "list-item"] =
        Just self {
            isListItem = True,
            inner = fromMaybe self' $
                longhand (inner p) self' "display" [Ident "block"],
            counterIncrement = insertList "list-item" 1 $ counterIncrement self
        }
    longhand TextStyle {inner=p'} self@TextStyle {inner = self'} "display" value
        | Just ret <- longhand p' self' "display" value = Just self {
            isListItem = False,