mdgriffith / elm-ui

What if you never had to write CSS again?
https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/
BSD 3-Clause "New" or "Revised" License
1.35k stars 111 forks source link

prop escape hatch? #46

Closed bstro closed 6 years ago

bstro commented 6 years ago

Really missing the prop function from style-elements. Has this been replaced by anything else? Very many things become impossible without it!

simvux commented 6 years ago

The jquery function? I really can't see how things would be impossible without it, I've never even seen it before.

bstro commented 6 years ago

I am referring to prop from style-elements, the precursor to this library. In the specific case that prompted this ticket, I haven't found a way to use relative font sizes without it, which is how I like to do fluid typography.

mdgriffith commented 6 years ago

You can do inline styles using Element.htmlAttribute (Html.style "font-size" "1.2rem").

What do you usually do for fluid typography? Do you mean using em/rem or are you talking about scaling the font with the window size?

bstro commented 6 years ago

I was referring to fluid typography using em/rem as described here – but I'm thinking I might be able to accomplish something very similar by subscribing to the window dimensions and recalculating font sizes that way.

mdgriffith commented 6 years ago

Ah, ok cool. Yeah, that's the way to go!