p [navstyle] [text (String.join " " m.opens) ]
navstyle = style [("position","absolute")
,("left", "0px")
,("width","10cm")
,("backgroundColor","Beige")
,("fontFamily","Calibri,serif")
,("cursor","pointer")
]
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")
]
mainView windowHeight =
flex ++
[ ("height", px (windowHeight - headerHeight))
, ("position", "relative")
]
For `:hover`, I wrote a helper today (here). It's not used yet, but might be useful :)
--
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 elm-discuss...@googlegroups.com.
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 elm-discuss...@googlegroups.com.
--
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 elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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 elm-discuss...@googlegroups.com.
h1 {
background-color: green;
}
h1 = style ["background-color","green"]
--
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 elm-discuss...@googlegroups.com.
--
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 elm-discuss...@googlegroups.com.
Layout for a web app IS part of the critical information. It encapsulates a lot from the UX of that app.
In learning elm (coming from react), I really like the functional and pure aspects of it.
But I really wish I would be able to keep styling and transitions for state changes separate, preferably with styling in CSS stylesheets.
Especially for transitions.
I try to have my elm code render only twice, and let CSS would take care of transition. Seperates concerns, and keeps code clean. Is the right class applied in state 1? And in state 2? Then elm is fine. Layout and transition wrong? Must be CSS.
Adding a subscription in elm to every single of 500 animation frames + extending model to not only save state but also all in-between-two-discrete-states information, feels like an unwanted complication and mixture of concerns.
I see benefits of DOM + styling + interaction mix in components (reminds me of Polymer).
And I dislike the cascading aspect (and other shortcomings) of pure CSS, and it is hard to switch back and forth between elm and CSS mindset.
Not sure of I can keep transitions from blending, and the will definitely investigate elm CSS solutions mentioned.
But for now, I still believe code will be cleaner and more maintainable as it grows, if one persists to separate the styling on the one hand from the content and interaction in the other.
There is no Html.Styles module because best practices for working with HTML suggest that this should primarily be specified in CSS files. So the general recommendation is to use this function lightly.
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?
I haven't used elm-css yet but I'm really looking forward to it - It sounds like it will make working with CSS much more bearable.
--
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 elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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?
A year later, I've just discovered this thread as I am new to the Elm world and was interested in how others solved for the styling side of things.In the spirit of trying to figure out how Elm can help solve long-standing shortcomings w/ CSS, I see there being two massive opportunities:
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?
And, is it just me, or does anyone else think the "cascading" feature is just a fundamentally bad idea?
--
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 elm-discuss+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.