Python plotly-dash meta_tags not adjusting viewport / viewing on different devices

Viewed 673

I've used Python to put together a very basic Dash dashboard which I deploy on Heroku. Everything seems to work fine for me, but it doesn't resize on different devices and looks terrible. (I view on a Mac using Safari.) I know there's different ways to achieve this (e.g. bootstrap) but I'd like the easiest/simplest path: that seemed like meta_tags. However I can't seem to get it the meta_tags to work for adapting it to be viewed on different devices.

Am I oversimplifying/misunderstanding. My basic code is below. (Per a tutorial I saw, I also keep an Assets folder in my Git repository which contains a .css file, but I admit I don't know if that's necessary or how it works.)

Cheers

app = dash.Dash(__name__, 
meta_tags=[{'name': 'viewport', 'content': 'width=device-width, initial-scale=2.0, maximum-scale=1.2, minimum-scale=0.5,'}]
)

server = app.server
0 Answers
Related