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

Properly align AppNavigationToggle with first navigation item #3278

Merged
merged 1 commit into from Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/assets/variables.scss
Expand Up @@ -56,8 +56,8 @@ $navigation-width: 300px;
// mobile breakpoint
$breakpoint-mobile: 1024px;

// top-bar spacing
$topbar-margin: 4px;

// navigation spacing
$app-navigation-settings-margin: 3px;

// navigation items
$app-navigation-padding: calc(var(--default-grid-baseline, 4px) * 2);
4 changes: 0 additions & 4 deletions src/components/NcAppContent/NcAppContent.vue
Expand Up @@ -357,10 +357,6 @@ export default {
&:not(.app-content--has-list) {
overflow: auto;
}

// Variables
// the whitespace between the topbar content and its edges
--topbar-margin: #{$topbar-margin};
}

.app-content-wrapper {
Expand Down
10 changes: 9 additions & 1 deletion src/components/NcAppNavigation/NcAppNavigation.vue
Expand Up @@ -142,6 +142,14 @@ export default {
}
</script>

<style lang="scss">
.app-navigation,
.app-content {
/** Distance of the app naviation toggle and the first navigation item to the top edge of the app content container */
--app-navigation-padding: #{$app-navigation-padding};
}
</style>

<style lang="scss" scoped>
.app-navigation {
// Set scoped variable override
Expand Down Expand Up @@ -184,7 +192,7 @@ export default {
display: flex;
flex-direction: column;
gap: var(--default-grid-baseline, 4px);
padding: calc(var(--default-grid-baseline, 4px) * 2);
padding: var(--app-navigation-padding);
}
&__content {
height: 100%;
Expand Down
Expand Up @@ -83,8 +83,8 @@ export default {

button.app-navigation-toggle {
position: absolute;
top: $topbar-margin;
right: - $topbar-margin;
top: var(--app-navigation-padding);
right: calc(0px - var(--app-navigation-padding));
margin-right: - $clickable-area;
}

Expand Down