Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: some issues for mobile layouts #3455

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/components/src/components/drawer/drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ $spacings: (
--db-drawer-content-padding-inline,
#{map.get($spacing, "inline")}
);
max-block-size: fit-content;
overflow: auto;
// TODO: Evaluate whether we need overflow: hidden and that for only specifically set y here.
overflow-y: auto;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
padding: variables.$db-spacing-fixed-md;
inline-size: 100%;
position: fixed;
overflow-y: auto;
overflow: hidden auto;
// additional #{$db-spacing-fixed-3xs} for border
inset-block: calc(
#{component.$min-mobile-header-height} + #{variables.$db-spacing-fixed-3xs}
Expand Down
4 changes: 3 additions & 1 deletion showcases/patternhub/data/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ export const getNavigationList = (path: string) => {

export const getBreadcrumb = (path: string) => {
const tree: NavigationItem[] = getAllNavigationItems(true);
return tree.filter((navItem) => path.includes(navItem.path ?? ''));
return tree
.filter((navItem) => path.includes(navItem.path ?? ''))
.sort((a, b) => (a.path?.length ?? 0) - (b.path?.length ?? 0));
};

export const getAllComponentGroupNames = (): string[] => {
Expand Down
10 changes: 9 additions & 1 deletion showcases/patternhub/styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,16 @@ h6 {
.link-containers {
& > div {
display: grid;
grid-template-areas: "previous next";
grid-template-areas:
"previous previous"
"next next";
gap: variables.$db-spacing-fixed-md;
justify-content: space-between;

@include screen-sizes.screen("md") {
grid-template-areas: "previous next";
}

a {
text-decoration: none;
}
Expand All @@ -507,6 +513,7 @@ h6 {

small {
color: colors.$db-informational-bg-inverted-contrast-high-default;
overflow-wrap: anywhere;
}
}

Expand All @@ -526,6 +533,7 @@ h6 {

.breadcrumb-container {
display: flex;
overflow-x: auto;
align-content: center;
align-items: center;
padding-block: variables.$db-spacing-fixed-sm;
Expand Down
Loading