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

[next] fix: use --header-height instead of 50px constant #5978

Merged
merged 4 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 0 additions & 1 deletion src/assets/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ $action-background-hover: rgba(127, 127, 127, .25);

// various structure data used in the
// `AppNavigation` component
$header-height: 50px;
$navigation-width: 300px;

// mobile breakpoint
Expand Down
4 changes: 2 additions & 2 deletions src/components/NcHeaderMenu/NcHeaderMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ $externalMargin: 8px;
&__wrapper {
position: fixed;
z-index: 2000;
top: 50px;
top: var(--header-height);
inset-inline-end: 0;
box-sizing: border-box;
margin: 0 $externalMargin;
Expand Down Expand Up @@ -388,7 +388,7 @@ $externalMargin: 8px;
width: 350px;
max-width: calc(100vw - 2 * $externalMargin);
min-height: calc(var(--default-clickable-area) * 1.5);
max-height: calc(100vh - 50px * 2);
max-height: calc(100vh - var(--header-height) * 2);
:deep(.empty-content) {
margin: 12vh 10px;
}
Expand Down
18 changes: 9 additions & 9 deletions src/components/NcModal/NcModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ export default {
align-items: center;
justify-content: center;
width: 100%;
height: $header-height;
height: var(--header-height);
overflow: hidden;
transition: opacity 250ms, visibility 250ms;

Expand Down Expand Up @@ -889,14 +889,14 @@ export default {
align-items: center;
justify-content: center;
box-sizing: border-box;
margin: calc(calc($header-height - var(--default-clickable-area)) / 2);
margin: calc(calc(var(--header-height) - var(--default-clickable-area)) / 2);
padding: 0;
}

.play-pause-icons {
position: relative;
width: $header-height;
height: $header-height;
width: var(--header-height);
height: var(--header-height);
margin: 0;
padding: 0;
cursor: pointer;
Expand All @@ -916,14 +916,14 @@ export default {
box-sizing: border-box;
width: var(--default-clickable-area);
height: var(--default-clickable-area);
margin: calc(calc($header-height - var(--default-clickable-area)) / 2);
margin: calc(calc(var(--header-height) - var(--default-clickable-area)) / 2);
cursor: pointer;
opacity: $opacity_normal;
}
}

&:deep() .action-item {
margin: calc(calc($header-height - var(--default-clickable-area)) / 2);
margin: calc(calc(var(--header-height) - var(--default-clickable-area)) / 2);
susnux marked this conversation as resolved.
Show resolved Hide resolved

&--single {
box-sizing: border-box;
Expand Down Expand Up @@ -1018,7 +1018,7 @@ export default {

// We allow 90% max-height, but we need to ensure the header does not overlap the modal
// as the modal is centered, we need the space on top and bottom
$max-modal-height: min(90%, calc(100% - 2 * $header-height));
$max-modal-height: min(90%, calc(100% - 2 * var(--header-height)));

// Sizing
&--small {
Expand Down Expand Up @@ -1047,7 +1047,7 @@ export default {
width: 100%;
height: calc(100% - var(--header-height));
position: absolute;
top: $header-height;
top: var(--header-height);
border-radius: 0;
}
}
Expand All @@ -1060,7 +1060,7 @@ export default {
max-height: initial;
height: calc(100% - var(--header-height));
position: absolute;
top: $header-height;
top: var(--header-height);
border-radius: 0;
}
}
Expand Down
Loading