purescript-react / purescript-lumi-components

Library of our UI components
https://lumihq.github.io/purescript-lumi-components/#/
Apache License 2.0
105 stars 5 forks source link

Add 'onMobile' combinator #205

Closed arthurxavierx closed 3 years ago

arthurxavierx commented 3 years ago

The reasons for only having a onDesktop combinator until now were that we wanted to try a mobile-first approach on our product development (which has clearly not caught on or worked very well), and we thought only specifying mobile and more general styles and overriding them with desktop-specific settings was enough.

The second assumption can make it cumbersome to encode specific styling rules, like when the desktop style should use a component's defaults while the mobile one should override them.