fix(mobile): constrain h5 shell width
This commit is contained in:
@@ -440,7 +440,9 @@ onShow(() => {
|
||||
}
|
||||
|
||||
.login-button {
|
||||
flex: 0 0 84px;
|
||||
min-width: 84px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.section-head,
|
||||
|
||||
@@ -5,6 +5,10 @@ page {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
}
|
||||
|
||||
:root {
|
||||
--mobile-shell-max-width: 430px;
|
||||
}
|
||||
|
||||
view,
|
||||
text,
|
||||
input,
|
||||
@@ -154,3 +158,44 @@ button::after {
|
||||
color: #64748b;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (min-width: 520px) {
|
||||
:root {
|
||||
--mobile-shell-side-offset: calc((100vw - var(--mobile-shell-max-width)) / 2);
|
||||
}
|
||||
|
||||
body {
|
||||
background: #e5e7eb;
|
||||
}
|
||||
|
||||
uni-app,
|
||||
uni-page,
|
||||
uni-page-body {
|
||||
width: 100%;
|
||||
max-width: var(--mobile-shell-max-width);
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
uni-app {
|
||||
min-height: 100vh;
|
||||
background: #f5f7fb;
|
||||
box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
|
||||
}
|
||||
|
||||
uni-tabbar.uni-tabbar-bottom {
|
||||
right: var(--mobile-shell-side-offset);
|
||||
left: var(--mobile-shell-side-offset);
|
||||
width: auto;
|
||||
max-width: none;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
uni-tabbar.uni-tabbar-bottom .uni-tabbar {
|
||||
right: var(--mobile-shell-side-offset);
|
||||
left: var(--mobile-shell-side-offset);
|
||||
width: auto;
|
||||
max-width: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user