It really depends on who you're working with. If you're working with 
designers, asking them to learn elm in order to style the site is a pretty 
big ask, especially if they're overburdened work-wise. That's something we 
ran into when trying to use local-css 
<https://www.npmjs.com/package/local-css>. If everyone writing is an 
engineer though, or you're in a situation where everyone who does styling 
is willing to learn elm, you can get away with doing things inline (this 
also is/was a trend in react land as discussed a bit here 
<https://css-tricks.com/the-debate-around-do-we-even-need-css-anymore/>). 
 If you're rendering your DOM in elm though, you already probably need a 
bunch of buy-in from your designers and such so maybe it's not that big a 
stretch.

On Thursday, June 2, 2016 at 11:46:39 AM UTC-5, Rex van der Spuy wrote:
>
> A few months ago, when I was still a rank Elm beginner, I was teaching 
> myself Elm while simultaneously building a production app.
> To my surprise, the most time-consuming part was not learning Elm, but 
> fiddling with and debugging the CSS.
>
> The fact that CSS just fails silently is a real headache.
> And, is it just me, or does anyone else think the "cascading" feature is 
> just a fundamentally bad idea?
>
> 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.
>
> On Thursday, June 2, 2016 at 5:35:52 AM UTC-4, Peter Damoc wrote:
>>
>> I understand how using Elm for CSS might look like a case of "I've got a 
>> hammer..." and the external CSS has its merits, especially when it comes to 
>> transitioning from a traditional HTML+CSS+JS to Elm. 
>>
>> CSS in Elm comes with its own set of advantages and, in the long run, I 
>> think it might be a way better option. 
>> It can use types to make sure that changes to IDs or Classes are 
>> consistent throughout. Named values can make for an additional line of 
>> defense against typos. 
>> It has way better composition and much more flexibility due tot the fact 
>> that one can create style on the fly based on information from the 
>> environment (e.g. device size and/or DPI).   
>>
>>
>>  
>>
>>
>> On Thu, Jun 2, 2016 at 11:30 AM, Tim Stewart <[email protected]> 
>> wrote:
>>
>>> Ondrej's approach makes sense to me too. The advantages Elm brings to 
>>> the table - ensuring program validity, eliminating runtime errors and 
>>> issues related to mutable state etc. - just aren't really problems in CSS. 
>>> The shortcomings that CSS does have are mainly addressed by LESS, it's 
>>> quick and easy to iterate by copying styling experiments in the browser 
>>> directly back to source, and I'm guessing it's a smoother workflow when 
>>> collaborating with designers, embedding into existing sites etc. Using Elm 
>>> for CSS seems to me a bit like a case of "I've got a hammer...".
>>>
>>>
>>> On Thursday, June 2, 2016 at 4:48:35 AM UTC+10, Ondřej Žára wrote:
>>>>
>>>> I used Elm.embed, static <link rel="stylesheet"> in my parent document 
>>>> and (obviously) an external stylesheet, preferrably using a Less 
>>>> preprocessor.
>>>>
>>>> O.
>>>>
>>>> On Tuesday, May 31, 2016 at 11:26:37 AM UTC+2, Peter Damoc wrote:
>>>>>
>>>>> 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 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.
>>>
>>
>>
>>
>> -- 
>> There is NO FATE, we are the creators.
>> blog: http://damoc.ro/
>>
>

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