I believe that is not possible to change colors in Ellie because you cannot load MyStyle.elm.
This was one of the first attempt to have a framework based on elm-ui. It was made at the time of Elm 0.18 and probably it does not have one of the best interfaces.
The idea was to mimic “modifiers” as they are used in Bulma or other frameworks but at the moment I don’t maintain this library so I don’t know if I can support you much.
Unfortunately I don’t think that there are analogue attempt to create a similar framework around elm-ui.
I went through several iteration of the concept and now I am using a simpler concept where I just build simple reusable function only for items that I need.
Using elm-ui is simple enough that create new styles is straightforward.
Just to give you a glimpse, this is the primary button:
primary : List (Attribute msg) -> Data msg -> Element msg
primary attrsExtra data =
let
attrs =
if data.libu == UI.Libu.Bu Nothing then
attrsPrimaryDisabled
else
attrsPrimary
in
UI.Libu.libu
(attrs data.theme ++ attrsExtra)
{ label = data.label
, type_ = data.libu
}
Here I keep the list of attributes as first argument, the same as elm-ui, so that you can always overwrite attributes.
Other helpers
type alias Data msg =
{ label : Element msg
, libu : UI.Libu.Type msg
, theme : UI.Theme.Theme
}
libu :
List (Attribute msg)
-> { type_ : Type msg, label : Element msg }
-> Element msg
libu attrs args =
case args.type_ of
Li url ->
Element.link
attrs
{ label = args.label
, url = url
}
NewTabLi url ->
Element.newTabLink
attrs
{ label = args.label
, url = url
}
Bu onPress ->
Input.button
attrs
{ label = args.label
, onPress = onPress
}
type Type msg
= NewTabLi String
| Li String
| Bu (Maybe msg)
“Libu” is half LInk and half BUtton that I use both to create links or buttons
attrsInCommon : List (Attribute msg)
attrsInCommon =
[ padding numberPadding
, width fill
, transition
, Border.rounded 5
, Font.center
]
attrsPrimary : UI.Theme.Theme -> List (Attribute msg)
attrsPrimary theme =
attrsInCommon
++ [ UI.Color.Background.backgroundButtonPrimary theme
, UI.Color.Font.fontButtonPrimary theme
, mouseOver [ UI.Color.Background.backgroundButtonPrimaryOver theme ]
, focused [ UI.Color.Background.backgroundButtonPrimaryOver theme ]
]
Theme
store info about both the primary color and the dark/light mode.