Responsive Text Size in Elm-UI

Simple ellie to illustrate what I was getting at in my previous post:
https://ellie-app.com/4c8wsgwsN9Sa1

Please note the flags being passed into the init of the elm app:

    <script>
        var app = Elm.Main.init({ node: document.querySelector('main')
                                ,
        flags: {
            width: window.innerWidth,
            height: window.innerHeight
        }})
        // you can use ports and stuff here
      </script>

alternative approach by wrapping elements in an el with Element.scale attribute set: https://ellie-app.com/4c9YwbGdhcpa1

1 Like