The discussion revolves around whether auto margins still need to be unset on mobile devices, specifically for the main-outlet wrapper in Discourse. nolo points out that unsetting auto margins causes the layout to left-align on tablets in landscape mode, which is an issue. pmusaraj suggests that the rule can probably be dropped, as most themes should be fine. However, twofoursixeight can reproduce the issue on an Android tablet.
nolo proposes adding a breakpoint declaration to center the wrapper on wider devices while keeping the potential extra space removed on narrow mobile devices. pmusaraj thinks this option makes sense. After investigating, awesomerobot agrees that the rule is no longer needed, as the wrapper is now set to grid with width: 100%;, which should prevent the original issue. The rule has been removed in this pull request.
On mobile, auto margins for the main-outlet wrapper are unset here:
This causes the layout to left-align when -d-max-width is declared on a theme. It’s not visible on narrower devices, but on tablets in landscape mode it’s an issue, e.g. here with the Air theme:
I generally don’t see the issue now on topic lists, maybe the declaration can be dropped? Or, if there’s some specific cases, rather be assigned for a breakpoint?
I think we can probably drop this rule, yes. It might cause some themes (especially custom themes) to have large margins on mobile, but most themes should be fine.
Note though that you’re seeing the mobile view on tablet, which is no longer the default for iPads, iPads default to the desktop view and therefore they don’t load mobile stylesheets. is this an Android tablet?
One aspect I do like about the mobile setup is that the sidebar menu slides in as an overlay and not embedded on the page. It feels more “native” on a mobile device to me.
I tried with a handful of very custom themes and I don’t think we need it at all anymore… a few months after it was added the wrapper was set to grid with width: 100%;, so in theory that should prevent the original issue from happening at all