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

Reduce padding on mobile #572

Merged
merged 20 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from 16 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
mstrasinskis marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
mstrasinskis marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/docs/components/DocsComponentsNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
}

div {
margin: 0 var(--padding);
@include media.min-width(small) {
margin: 0;
}

:global(.card:not(.selected)) {
display: none;

Expand Down
1 change: 1 addition & 0 deletions src/lib/components/Content.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
box-shadow: var(--menu-selection-content-box-shadow);
// Remove extra space because of menu selection touches the edge (when open)
margin-left: 0;
border-top-left-radius: var(--border-radius-2x);
mstrasinskis marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
6 changes: 4 additions & 2 deletions src/lib/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
@use "../styles/mixins/media";

header {
--toolbar-padding: 0 var(--padding-2x);

--toolbar-padding: 0;
@include media.min-width(medium) {
--toolbar-padding: 0 var(--padding-2x);
mstrasinskis marked this conversation as resolved.
Show resolved Hide resolved
}
@include media.min-width(large) {
--toolbar-padding: 0;
}
Expand Down
5 changes: 4 additions & 1 deletion src/lib/components/Nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
@include layout.main;

margin: 0;
padding: 0 var(--padding-2x);
padding: 0;
@include media.min-width(medium) {
padding: 0 var(--padding-2x);
}
}
</style>
1 change: 1 addition & 0 deletions src/lib/components/SplitContent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
box-shadow: var(--menu-selection-content-box-shadow);
// remove extra space because of menu selection touches the edge (when open)
margin-left: 0;
border-top-left-radius: var(--border-radius-2x);
mstrasinskis marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/lib/styles/global/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ main {
max-width: var(--max-main-content-width);
min-height: 100%;

padding: var(--padding-2x);
padding: var(--padding-2x) var(--padding);

@include media.min-width(large) {
padding: var(--padding-4x);
mstrasinskis marked this conversation as resolved.
Show resolved Hide resolved
@include media.min-width(medium) {
padding: var(--padding-2x);
}

@include media.min-width(large) {
Expand Down
31 changes: 18 additions & 13 deletions src/lib/styles/global/scrollbar.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
::-webkit-scrollbar {
background: var(--scrollbar-thumb-background);
width: var(--padding-2x);
}
@use "../mixins/media";

::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb-color);
border: calc(var(--padding) * 2 / 3) var(--scrollbar-thumb-background) solid;
border-radius: 0.5em;
-webkit-border-radius: 0.5em;
background-clip: padding-box;
}
// Rely on the default scrollbar styles for mobile devices
@include media.min-width(medium) {
::-webkit-scrollbar {
background: var(--scrollbar-thumb-background);
width: var(--padding-2x);
}

::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb-color);
border: calc(var(--padding) * 2 / 3) var(--scrollbar-thumb-background) solid;
border-radius: 0.5em;
-webkit-border-radius: 0.5em;
background-clip: padding-box;
}

::-webkit-scrollbar-corner {
background: var(--scrollbar-thumb-color);
::-webkit-scrollbar-corner {
background: var(--scrollbar-thumb-color);
}
}
8 changes: 6 additions & 2 deletions src/lib/styles/mixins/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
cubic-bezier(0.25, 0.46, 0.45, 0.94) 0s;

overflow: hidden;
border-radius: var(--border-radius-2x);

@include media.min-width(medium) {
border-radius: var(--border-radius-2x);
margin: var(--content-margin);
}

box-sizing: border-box;
margin: var(--content-margin);

padding-top: 0;

// If a bottom sheet is displayed the content pane height should be updated accordingly
Expand Down
Loading