Closed mradke closed 1 year ago
I know this is old, but in case someone finds this question:
You can use Css.Global.descendants [ Css.Global.class "my-select-class" [ {- your styles -} ] ]
inside Html.Styled.Attributes.css
. This way you can have a named class scoped to your component. Ellie with an example: https://ellie-app.com/nFx7HM8jLCka1
Thanks! I think this answers the question, so I'm gonna close the issue :-)
What I'd like to do is to pass class names from a parent (using Html.Styled) to a child view (using plain elm/html), so that the parent styles can be reused.
The motivation for this is that I'd like to use a library that is not using elm-css but offers to pass custom class names (https://github.com/sporto/elm-select/).
As far as I understood the docs I would currently have to use Css.Global, where I'd loose the scoping feature of elm-css. I'd like to avoid that.
Is this already possible?