Skip to content

Commit

Permalink
Merge pull request #1577 from appwrite/new-docs-layout
Browse files Browse the repository at this point in the history
update breakpoints
  • Loading branch information
ItzNotABug authored Dec 27, 2024
2 parents bd84b56 + 7a85ca5 commit 387a1d5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/lib/layouts/SidebarNavButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</script>

<a
class="web-side-nav-button"
class="web-side-nav-button flex size-10 w-full items-center whitespace-nowrap rounded-lg p-2"
class:is-selected={$page.url?.pathname === groupItem.href}
href={groupItem.href}
target={groupItem.openInNewTab ? '_blank' : '_self'}
Expand Down
2 changes: 1 addition & 1 deletion src/scss/7-components/_main-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
--p-main-header-border-color: rgb(0, 0, 0, 0.1);
}

@media #{$break1}, #{$break2} {
@media #{$break1} {
display: none;
}

Expand Down
2 changes: 1 addition & 1 deletion src/scss/7-components/_mobile-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
-webkit-backdrop-filter: blur(pxToRem(8));
backdrop-filter: blur(pxToRem(8));
}
@media #{$break3open} {
@media #{$break2open} {
display: none;
}

Expand Down
2 changes: 1 addition & 1 deletion src/scss/7-components/_side-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
flex:1;
display:flex; flex-direction:column; gap:pxToRem(24);
padding-inline:pxToRem(16); margin-right: pxToRem(-16);
margin-left: pxToRem(-8);
margin-left: pxToRem(-16);

.#{$p}-is-only-mobile & {
border-block-start: 1px solid hsl(var(--web-color-smooth));
Expand Down
4 changes: 2 additions & 2 deletions src/scss/9-grids/_grid-side-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.#{$p}-side-nav { display:block!important; }
}
}
@media #{$break2} {
@media #{$break0} {
.#{$p}-side-nav {
display:none; position:fixed; inset-inline-start:0; inset-block-start:pxToRem(73); inset-block-end:0; background:hsl(var(--web-color-background));
inline-size:pxToRem(280); block-size:initial; border-inline-end:solid pxToRem(1) hsl(var(--web-color-subtle));
Expand All @@ -36,7 +36,7 @@
> *:not(:first-child):where(:not(.u-position-absolute)) { margin-block-start:pxToRem(160); }
}
}
@media #{$break3open} {
@media #{$break2open} {
display:grid; grid-template-columns: pxToRem(280) minmax(0, 1fr);
grid-template-areas: "header header"
"side main";
Expand Down
6 changes: 5 additions & 1 deletion src/scss/_10-utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,16 @@
@media #{$break1}, #{$break2} { display:none!important; }
}

.#{$p}-is-only-large-desktop {
@media #{$break0} { display:none!important; }
}

.#{$p}-is-not-mobile {
@media #{$break1} { display:none!important; }
}

.#{$p}-is-not-desktop {
@media #{$break3open} { display:none!important; }
@media #{$break2open} { display:none!important; }
}

.#{$p}-u-gradient-mobile-align {
Expand Down
1 change: 1 addition & 0 deletions src/scss/abstract/variables/_devices.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Responsive Variables
$break0: "(max-width:767.9px)";
$break1: "(max-width:1023.9px)";
$break2: "(min-width:1024px) and (max-width:1279.9px)";
$break2open: "(min-width:1024px)";
Expand Down

0 comments on commit 387a1d5

Please sign in to comment.