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] 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

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

2017-06-05 Thread 'Jonas Schürmann' via Elm Discuss
I am unsure what your goal is, but perhaps elm-css can help you. If you want to generate styles dynamically, it is probably best to use inline styles. Am Montag, 5. Juni 2017 12:46:47 UTC+2 schrieb Francesco Orsenigo: > > I am experimenting with view