How can I disable mobile mode in Vaadin 14?

Daniel Mårtensson :

I have made a web page in Vaadin 14. But it's with my own theme. Should not do that. Anyway! The page is done and it's stunning! Only on regular desktop view.

For mobile use, it looks like garbage, for each phone. I have tried use CSS to cover it up, but it fails for every new screen.

So I want to disable response mobile mode in Vaadin 14. I'm happy with the regular desktop view anyway! So how can I do that?

Jouni :

Not sure what you exactly want, but you can at least start by declaring the viewport meta tag, that you want your app to be rendered using a certain viewport size (vs the device width).

https://vaadin.com/api/platform/14.1.21/com/vaadin/flow/component/page/Viewport.html

I haven’t tried it myself, but something along the lines of @Viewport(width = 1024).

You can also try by setting a html { min-width: 1024px; } in CSS.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=379060&siteId=1