Skip to content

Commit

Permalink
style: update demo page component menu css
Browse files Browse the repository at this point in the history
  • Loading branch information
KabinKhandThakuri committed Jan 10, 2025
1 parent a2d97e8 commit 4262a2d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
23 changes: 20 additions & 3 deletions apps/demo/src/assets/css/demoPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
.demo > .demo-main {
flex-basis: 0;
flex-grow: 999;
height: 100%;
padding-block: var(--layout-default-padding-v, 2.5rem);
padding-inline: var(--layout-default-padding-v, 2rem);
}

.demo-aside {
Expand All @@ -19,7 +22,9 @@
--_position: relative;
--_width: 100%;

padding-right: 2rem;
flex-basis: 17rem;
flex-grow: 1;
overflow: unset;
}

.demo-aside .link.active,
Expand All @@ -38,16 +43,28 @@
border-bottom: none;
}

.layout > main:has(.demo) {
padding: 0;
}

@media screen and (min-width: 576px) {
.demo {
flex-direction: row;
}

.demo-aside {
--_width: 15rem;
--_border-color: var(--border-color, #dee2e6);
--_position: sticky;
--_width: 15rem;

min-width: var(--_width);
border-right: 1px solid var(--_border-color);
height: 100%;
min-width: var(--_width);
overflow-y: auto;
padding: 1rem 2rem;
}

.demo > .demo-main {
overflow-y: auto;
}
}
1 change: 1 addition & 0 deletions apps/demo/src/assets/css/overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ section:has(h3) {
.demo .section-content {
display: grid;
gap: 1.5em;
margin-top: 1em;
}

.ssh-pre {
Expand Down
22 changes: 16 additions & 6 deletions packages/vue-layout/src/assets/css/layouts/basic.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
.layout.basic {
--layout-basic-max-width: 60rem;
--layout-basic-padding-h: 1em;

min-height: 100dvh;
display: flex;
flex-direction: column;
display: grid;
grid-template-areas:
"header"
"main"
"footer";
gap: var(--layout-basic-gap);
grid-template-rows: auto 1fr auto;
min-height: 100dvh;
}

.layout.basic > :is(footer, header, main) {
Expand All @@ -16,9 +19,15 @@
width: 100%;
}


.layout.basic > footer {
grid-area: footer;
}

.layout.basic > header {
--header-logo-max-width: 120px;

grid-area: header;
height: var(--layout-header-height, 5.5rem);
padding-inline: var(--layout-header-padding-h, 1em);
}
Expand Down Expand Up @@ -78,8 +87,9 @@
}

.layout.basic > main {
display: grid;
flex: 1;
max-width: 100%;
min-width: 100%;
grid-area: main;
}

@media screen and (min-width: 1200px) {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-layout/src/assets/css/layouts/sidebarOnly.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.layout.sidebar-only {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: auto 1fr;
grid-template-rows: 1fr;
grid-template-areas: "main";
min-height: 100dvh;
transition: all 0.25s ease-in-out;
Expand Down

0 comments on commit 4262a2d

Please sign in to comment.