Reports the use of Html.Attributes.class, Html.Attributes.classList and
Svg.Attributes.class.
config =
[ ZenCss.NoHtmlClasses.rule
]
Fail
import Html exposing (Html)
import Html.Attributes as Attributes
main : Html msg
main =
Html.div [ Attributes.class "container" ]
[ Html.text "Hello!" ]
Success
import CSS.Attributes
import Classes
import Html exposing (Html)
main : Html msg
main =
Html.div [ CSS.Attributes.class Classes.container ]
[ Html.text "Hello!" ]
When (not) to enable this rule
This rule is useful when using the elm-zen-css library.
This rule is not useful when references to CSS classes are still required.
Try it out
You can try this rule out by running the following command:
Reports the use of
Html.Attributes.class,Html.Attributes.classListandSvg.Attributes.class.Fail
Success
When (not) to enable this rule
This rule is useful when using the
elm-zen-csslibrary. This rule is not useful when references to CSS classes are still required.Try it out
You can try this rule out by running the following command: