[elm-discuss] Re: The Style Elements Library: a different approach to styling

2017-01-03 Thread Kadzuya OKAMOTO
Thanks. I'm looking forward to your article and the new version of the library :) On Tuesday, January 3, 2017 at 6:08:28 AM UTC+9, Matthew Griffith wrote: > > Hello! > > Essentially there are some things I'd like to do that I wouldn't be able > to express in elm-css (With this being said, elm-cs

[elm-discuss] Re: The Style Elements Library: a different approach to styling

2017-01-02 Thread Matthew Griffith
Hello! Essentially there are some things I'd like to do that I wouldn't be able to express in elm-css (With this being said, elm-css is super-awesome, and this style-elements library is still experimental). I'm writing an article that goes more into detail but here's a general overview. Fir

[elm-discuss] Re: The Style Elements Library: a different approach to styling

2017-01-02 Thread Kadzuya OKAMOTO
Awesome! I completely agree with the policy to simplify CSS. I guess the policy may be also realized by providing a set of functions in a manner of `rtfeldman/elm-css`'s `Mixin`s. What is the dominant benefits of making another library rather than providing set of `rtfeldman/elm-css` `Mixin`s?

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-12-31 Thread Matthew Griffith
Hey Lourens, Sounds reasonable, I'll put it on the list of properties to consider for a future release. If you run into any other properties you tend to use often but the lib doesn't support, add a note to this issue. Vendor prefixing doesn

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-12-31 Thread Lourens Rolograaf
Hi Matt, For using a div as if it were a button, I would like to make the caption-text un-selectable when there is any mousemovement during click. This could be done with vendor-prefixed `user-select: none` according https://stackoverflow.com/questions/826782/how-to-disable-text-selection-highl

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-31 Thread Matthew Griffith
Yeah, this library is more about smart styling in elm rather than interfacing with polymer. Since we can do mixins in elm, native mixins probably won't be supported :/ I have thought that you could make a polymer or mdl type library in pure elm using the style-elements library, though it would

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-31 Thread Ed Ilyin
yeah, but to use polymer elements, native css mixins are required :( Il giorno lun 31 ott 2016 alle ore 14:51 Matthew Griffith < mdg.griff...@gmail.com> ha scritto: > No, it won't render as a native css mixin, it just gives you the > functionality of a mixin in your elm code. > > > > On Monday, O

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-31 Thread Matthew Griffith
No, it won't render as a native css mixin, it just gives you the functionality of a mixin in your elm code. On Monday, October 31, 2016 at 7:55:38 AM UTC-4, Ed Ilyin wrote: > > Will it render native CSS mixin? > > Actually I can't figure out how to create native CSS mixins even using > elm-css

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-31 Thread Ed Ilyin
Will it render native CSS mixin? Actually I can't figure out how to create native CSS mixins even using elm-css module. Il giorno lun 31 ott 2016 alle ore 13:49 Matthew Griffith < mdg.griff...@gmail.com> ha scritto: > You can create a mixin as a function. > > > > myMixin : Style.Model -> Style.M

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-31 Thread Matthew Griffith
You can create a mixin as a function. myMixin : Style.Model -> Style.Model myMixin style = { style | visibility = hidden } myMixinColor : Style.Model -> Style.Model myMixinColor style = { style | colors = palette.blue } dropDown : List (Html.Attribute a) -> Lis

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-31 Thread Ed Ilyin
I'm actively using Polymer Paper Elements. And they accept mixings like this: ```css paper-dropdown-menu { --paper-input-container-input: { color: white; } --paper-input-container-underline: { display: none; } --paper-dropdown-menu-i

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-28 Thread Matthew Griffith
So, taking a look at it, direct support for keyed will be super easy and will absolutely show up in v1.1.0. And I believe I have a way to directly support lazy as well, though I want to try it out before confirming completely. On Friday, October 28, 2016 at 12:28:17 PM UTC-4, Mark Hamburg wr

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-28 Thread Mark Hamburg
On Oct 28, 2016, at 7:28 AM, Matthew Griffith wrote: > > 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 l

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-28 Thread Matthew Griffith
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

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-28 Thread Ed Ilyin
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? H

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-28 Thread Matthew Griffith
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/

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-27 Thread Ed Ilyin
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 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 2

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-27 Thread Ed Ilyin
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.griff...@gmail.com> ha scritto: > Thanks! Feedback would be fantastic. > > Yes, the compiler should help quite a bit here

[elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-27 Thread Matthew Griffith
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. Beyon

[elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-27 Thread Zinggi
Wow, this looks awesome! I'm definitely gonna try that on my next project. This might actually make css great again ;) On Thursday, 27 October 2016 15:20:14 UTC+2, Matthew Griffith wrote: > > > It's easy to write valid CSS that is still broken and frustrating. What if > we could make frustrating