styled-components / elm-styled

Styling your Html Elements with typed Css 💅
MIT License
179 stars 8 forks source link

Media Queries / Element Queries #2

Open k15a opened 7 years ago

k15a commented 7 years ago

We need some way to add media query support.

header = styled div
    [ padding (rem 4)
    , media (maxHeight (rem 10))
        [ padding (rem 2)
        ]
    ]

I don't know if we should add element query support as well. Media queries are definitely more important.

k15a commented 7 years ago

Media query support added in https://github.com/styled-components/elm-styled/commit/e28286ef87f3a782262237ca2d702d9f49f7a6ee

ryan-senn commented 7 years ago

Hi,

For some reason I have to add |> important after padding (rem 2) or it doesn't work. It works if it's a new property, but not to overwrite existing properties.

Am I doing something wrong, or do you have the same issue?

Cheers, Ryan

k15a commented 7 years ago

Mhh that's probably because of some incorrect order of the styles. Could you post an example?