Great to hear and thanks! :)

1.  What you want to use here is *Style.Elements.optional*.  It functions a 
lot like *Html.Attributes.classList* if you've worked with that at all,  it 
allows you to define variations that you can switch on and off.  There's an 
example of it in the complex example 
<https://github.com/mdgriffith/elm-style-elements-complex-example>.

2.  You can use Keyed and Lazy on a parent element (the one created by 
*Style.Elements.build*).  You could use *Style.Elements.build* in a child 
view and then use *Style.Elements.html *to integrate it into the main view, 
using keyed or lazy in the process.   That feels a bit roundabout and I 
believe there could be a better way.  I'll just have to give it some 
thought as to how it'd work :).   



On Friday, October 28, 2016 at 9:54:55 AM UTC-4, Ed Ilyin wrote:
>
> I have started to use this library - for me it is perfect that I do not 
> have to generate css file anymore.
> Great work Matthew! :)
> Of course I have first questions:
> 1. For example, user taps on menu item. To show that item is selected I 
> have to replace element with different color element correct? How it is 
> from the performance point of view? Or I have to add Bool parameter to 
> element which contols color and text weight? What is the best practice?
> 2. What about Keyed and Lazy elements? Is it ok to use them with this lib?
>
> Il giorno ven 28 ott 2016 alle ore 14:58 Matthew Griffith <
> mdg.gr...@gmail.com <javascript:>> ha scritto:
>
>>
>> I'll have to think about it a bit to see if this could use the work from 
>> elm-css.  The two libraries have very different approaches, though it might 
>> be possible.  Or maybe this library will grow to have additional 
>> type-checking some other way.
>>
>> It is now published! 
>> http://package.elm-lang.org/packages/mdgriffith/style-elements/latest
>>
>>
>>
>>
>>
>> On Friday, October 28, 2016 at 2:46:51 AM UTC-4, Ed Ilyin wrote:
>>
>>> And, clould you please, publish it, so we can try it easly and follow 
>>> updates.
>>>
>>> Il giorno ven 28 ott 2016 alle ore 06:54 Ed Ilyin <eduard...@gmail.com> 
>>> ha scritto:
>>>
>> Is it possible to blend it together with Richard Feldman's work elm-css 
>>>> where all properties are type checked?
>>>>
>>>> Il giorno gio 27 ott 2016 alle ore 23:54 Matthew Griffith <
>>>> mdg.gr...@gmail.com> ha scritto:
>>>>
>>> Thanks!  Feedback would be fantastic.  
>>>>>
>>>>> Yes, the compiler should help quite a bit here, however styling is 
>>>>> tough because it has quite a few "gotchas", so its hard to know 100%.
>>>>>
>>>>> Also, this library is mostly concerned with a small set  of css 
>>>>> properties(~15-20) that cause the most trouble.  Beyond that you're free 
>>>>> to 
>>>>> add whatever you need.  Of course, that means those additional style 
>>>>> properties you add are not type checked, they're just strings.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thursday, October 27, 2016 at 4:16:22 PM UTC-4, Fed Reggiardo wrote:
>>>>>>
>>>>>> Looks great!!  Nice work.  Im getting ready to style a new website, 
>>>>>> will try it out, and send some feedback. Quick question, will the 
>>>>>> compiler 
>>>>>> catch any errors on this?
>>>>>>
>>>>>> thx!
>>>>>>
>>>>> -- 
>>>>> 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 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 <javascript:>.
>> 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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to