How to specify a classname with elm-css

I’m using elm-css in elm-spa.

I can’t find in the docs how to specify a classname that I can use in my elm-spa style.css file.

What would I replace classname with, in the example below, or are classnames specified in a different way?

import Html.Styled

Html.Styled.div [classname "blog-body"] [Html.Styled.text "content"]

I didn’t use it before, but I would assume Html.Styled.Attributes.class

While this works:

Html.Styled.div [ "width" "37em"] [Html.Styled.text "content"]

this doesn’t

/* .css file: */
.body-blog {width:37em;}

-- elm code
Html.Styled.div [Html.Styled.Attributes.class "blog-body"] [Html.Styled.text "content"]

I tried [ "blog-body"] without success too.

A wild goose chase. Sorry!

The app isn’s using any definitions from the styles.css that comes with elm-spa.
I no one minds, I’ll delete this whole post.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.