Re: [elm-discuss] Add css classes to existing html nodes

2017-06-08 Thread Peter Damoc
Hi Eike and welcome to Elm. You could add some kind of a class to the div that's holding the markdown generated html and use that as a selector. If you need something more complex than that, you might need to use html inside the markdown Here is how to do both:

Re: [elm-discuss] Re: Adding CSS produced by a view function to the document's

2017-06-08 Thread Francesco Orsenigo
The idea is to keep a set of all the rules added to the header, add only those that are missing and never remove any. This will not work for for rules whose definitions are changed dynamically, but seems like an acceptable trade off. The ability to calculate all the styles that *might* appear

Re: [elm-discuss] Re: Adding CSS produced by a view function to the document's

2017-06-08 Thread Aaron VonderHaar
I experimented with some ways to have view functions that return both Html and the necessary styles. I found I could make it work, but I ultimately abandoned the idea because of a fundamental problem: view model = if model.showWidget then Widget.view model.widgetData else

[elm-discuss] What is the Elm equivalent of a Data Specification Language (EDN in Closure, ADTs, etc)?

2017-06-08 Thread Gaurav Rampal
Hi, I am new to Elm, and thank you for your patience with my questions. Since the emphasis in functional languages is on keeping functions pure it seems that an equivalent emphasis must be placed on structuring data. Formal computer science has ADT, Lisp has S-expressions, Clojure has EDN.

[elm-discuss] Is it possible to write a general tree-fold function?

2017-06-08 Thread Vlad GURDIGA
Hi!  I’m trying to get through the exercises in the Binary Tree example here: http://elm-lang.org/examples/binary-tree. I’ve got to the 4-th and it seems to me like it’s impossible to solve (with the understanding I have now). 樂 So, here it goes: (4) Write a general fold function that acts

[elm-discuss] Status update and multiple application servers

2017-06-08 Thread machinelearningspeed
Sorry I'm only a beginner and I need to understand this thing at the level of software architecture. If I'm not wrong, status management (or more generally application logic) is implemented in Elm on server side (as opposite to other JavaScript frameworks running on client side). Then how is

[elm-discuss] explain how Task works

2017-06-08 Thread machinelearningspeed
Can you explain, at a beginner's level, how Task works in the following 2 lines under Process.sleep ? delay : Time.Time -> msg -> Cmd msg delay time msg = Process.sleep time |> Task.andThen (always <| Task.succeed msg) |> Task.perform identity Thanks -- You received this message because you

[elm-discuss] Add css classes to existing html nodes

2017-06-08 Thread eike . kettner
Hallo Elm users, I'm creating my first app with Elm, and I'm really enjoying it. I'm using the markdown package to generate html from user input. I'd like to add css classes to certain (i.e. to tables) elements generated by this library. I didn't find a way to do this. Is this possible? Thank

[elm-discuss] Re: Adding CSS produced by a view function to the document's

2017-06-08 Thread Kevin Yank
The style-elements package introduced at Elm Europe today needs to solve this problem too. For now, it too is just rendering an invalid