fix(ui): mobile UI enhancements (#1184)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
@use "../layout/styles/layout/variables";
|
||||
|
||||
/*
|
||||
* Document defaults.
|
||||
*
|
||||
@@ -8,6 +10,8 @@
|
||||
*/
|
||||
|
||||
html {
|
||||
--mobile-shell-active: 0;
|
||||
|
||||
height: 100%;
|
||||
font-family: var(--font-family), "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
|
||||
font-size: var(--font-size-root);
|
||||
@@ -24,6 +28,17 @@ body {
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
@media #{variables.$mobile-shell-media-query} {
|
||||
html {
|
||||
--mobile-shell-active: 1;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
background-color: var(--page-background);
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--primary-color);
|
||||
text-decoration: none;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@use "../layout/styles/layout/variables";
|
||||
|
||||
/*
|
||||
* Native CDK overlay hooks.
|
||||
*
|
||||
@@ -6,15 +8,15 @@
|
||||
*/
|
||||
|
||||
.command-palette-backdrop {
|
||||
background: rgb(0 0 0 / 50%);
|
||||
background: rgb(0 0 0 / 56%);
|
||||
}
|
||||
|
||||
.command-palette-panel {
|
||||
.cdk-overlay-pane.command-palette-panel {
|
||||
display: flex;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
@media (width <= 991px) {
|
||||
@media #{variables.$mobile-shell-media-query} {
|
||||
.cdk-overlay-backdrop.command-palette-backdrop {
|
||||
top: 3.5rem;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@use "../layout/styles/layout/variables";
|
||||
|
||||
/*
|
||||
* PrimeNG compatibility layer.
|
||||
*
|
||||
@@ -10,6 +12,17 @@
|
||||
* PrimeNG components can continue to use Prime's --p-* tokens.
|
||||
*/
|
||||
|
||||
@mixin sidebar-fixed-overlay {
|
||||
position: fixed !important;
|
||||
top: var(--sidebar-popover-top, 0.75rem) !important;
|
||||
bottom: auto !important;
|
||||
left: var(--sidebar-popover-left, calc(var(--sidebar-width, 225px) + 0.5rem)) !important;
|
||||
max-height: var(--sidebar-popover-max-height, calc(100vh - 1rem)) !important;
|
||||
margin: 0 !important;
|
||||
overflow: auto !important;
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
.p-dialog {
|
||||
--card-background: var(--surface-content);
|
||||
|
||||
@@ -156,12 +169,7 @@
|
||||
.sidebar-flyout-popover.p-popover,
|
||||
.sidebar-more-menu.p-menu,
|
||||
.sidebar-user-menu.p-menu {
|
||||
position: fixed !important;
|
||||
top: auto !important;
|
||||
bottom: var(--sidebar-popover-bottom, 0.75rem) !important;
|
||||
left: var(--sidebar-popover-left, calc(var(--sidebar-width, 225px) + 0.5rem)) !important;
|
||||
margin: 0 !important;
|
||||
transform: none !important;
|
||||
@include sidebar-fixed-overlay;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
@@ -248,3 +256,43 @@
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
@media #{variables.$mobile-shell-media-query} {
|
||||
.sidebar-entity-menu.p-menu {
|
||||
@include sidebar-fixed-overlay;
|
||||
|
||||
.p-menu-submenu-label {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-entity-menu.p-menu,
|
||||
.sidebar-more-menu.p-menu,
|
||||
.sidebar-user-menu.p-menu,
|
||||
.sidebar-flyout-popover.p-popover .p-menu,
|
||||
.sidebar-flyout-popover.p-popover .p-tieredmenu {
|
||||
> .p-menu-list,
|
||||
.p-menu-list,
|
||||
> .p-tieredmenu-root-list,
|
||||
.p-tieredmenu-root-list,
|
||||
.p-tieredmenu-submenu {
|
||||
padding-block: var(--space-2) !important;
|
||||
}
|
||||
|
||||
.p-menu-item-content > .p-menu-item-link,
|
||||
.p-menu-item-link,
|
||||
.p-tieredmenu-item-content > .p-tieredmenu-item-link,
|
||||
.p-tieredmenu-item-link {
|
||||
min-height: 3rem !important;
|
||||
padding: var(--space-3) var(--space-4) !important;
|
||||
gap: var(--space-3) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-user-menu.p-menu {
|
||||
.sidebar-user-menu-header,
|
||||
.sidebar-user-menu-footer {
|
||||
padding: var(--space-3) var(--space-4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user