>
> For `:hover`, I wrote a helper today (here
> <https://gist.github.com/jinjor/439a6721065eeb83abc5a9da4049cec9>). It's
> not used yet, but might be useful :)


Hmm... I just tried it, but not so useful as I thought.


2016-06-01 17:44 GMT+09:00 Yosuke Torii <[email protected]>:

> I use pure elm-html. Like David, I write styles in a separated Elm file
> called `Styles.elm`, but each style is declared as `List (String, String)`
> for composability.
>
> zIndex =
>   { subView = "600"
>   , messageBar = "700"
>   , contextMenu = "800"
>   }
>
> messageBar =
>     [ ("position", "absolute")
>     , ("color", "#fff")
>     , ("z-index", zIndex.messageBar)
>     , ("padding", "5px 10px")
>     , ("transition", "height opacity 0.8s linear")
>     ]
>
> successBar =
>   messageBar ++
>     [ ("background-color", "#4c5")
>     , ("opacity", "1")
>     ]
>
> Sometimes it takes arguments for dynamic values.
>
> mainView windowHeight =
>   flex ++
>     [ ("height", px (windowHeight - headerHeight))
>     , ("position", "relative")
>     ]
>
> I also use tiny CSS for resetting default styles and using `:hover`. For
> `:hover`, I wrote a helper today (here
> <https://gist.github.com/jinjor/439a6721065eeb83abc5a9da4049cec9>). It's
> not used yet, but might be useful :)
>
>
> 2016年5月31日火曜日 18時26分37秒 UTC+9 Peter Damoc:
>>
>> How do you handle styling in your Elm programs?
>>
>> Do you use one of the following libraries?
>>
>> rtfeldman/elm-css
>>
>> seanhess/elm-style
>>
>> massung/elm-css
>>
>> Or do you do something completely different (manual style inlining,
>> classes and external css) ?
>>
>> I tried using Sean's library but I quickly ran into pseudo-selectors
>> trouble wanting to implement a simple hover effect.
>>
>> Somehow, keeping a set of hover states for some simple nav-link seams
>> such an overkill.
>>
>> How do you handle such scenarios?
>>
>>
>>
>> --
>> There is NO FATE, we are the creators.
>> blog: http://damoc.ro/
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Elm Discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/elm-discuss/AC6cqdeKDOs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to