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

[Port dspace-7_x] Utility gap-* classes for flexbox #2605

Merged
merged 2 commits into from
Nov 8, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/styles/_global-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,30 @@ ul.dso-edit-menu-dropdown > li .nav-item.nav-link {
vertical-align: middle;
}

/* Flexbox gap */

.gap-0 { gap: 0; }
.gap-1 { gap: calc(#{$spacer} * .25); }
.gap-2 { gap: calc(#{$spacer} * .5); }
.gap-3 { gap: #{$spacer}; }
.gap-4 { gap: calc(#{$spacer} * 1.5); }
.gap-5 { gap: calc(#{$spacer} * 3); }

.gapx-0 { column-gap: 0; }
.gapx-1 { column-gap: calc(#{$spacer} * .25); }
.gapx-2 { column-gap: calc(#{$spacer} * .5); }
.gapx-3 { column-gap: #{$spacer}; }
.gapx-4 { column-gap: calc(#{$spacer} * 1.5); }
.gapx-5 { column-gap: calc(#{$spacer} * 3); }

.gapy-0 { row-gap: 0; }
.gapy-1 { row-gap: calc(#{$spacer} * .25); }
.gapy-2 { row-gap: calc(#{$spacer} * .5); }
.gapy-3 { row-gap: #{$spacer}; }
.gapy-4 { row-gap: calc(#{$spacer} * 1.5); }
.gapy-5 { row-gap: calc(#{$spacer} * 3); }


.pt-0\.5 {
padding-top: 0.125rem !important;
}
Expand Down
2 changes: 1 addition & 1 deletion src/themes/dspace/app/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<img src="assets/images/dspace-logo.svg" [attr.alt]="'menu.header.image.logo' | translate"/>
</a>
</div>
<div class="navbar-buttons d-flex flex-grow-1 ml-auto justify-content-end align-items-center">
<div class="navbar-buttons d-flex flex-grow-1 ml-auto justify-content-end align-items-center gapx-1">
<ds-themed-search-navbar></ds-themed-search-navbar>
<ds-themed-lang-switch></ds-themed-lang-switch>
<ds-context-help-toggle></ds-context-help-toggle>
Expand Down
6 changes: 0 additions & 6 deletions src/themes/dspace/app/header/header.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,3 @@
color: var(--ds-header-icon-color-hover);
}
}

.navbar-buttons {
display: flex;
gap: calc(var(--bs-spacer) / 3);
align-items: center;
}
2 changes: 1 addition & 1 deletion src/themes/dspace/app/navbar/navbar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</li>
</ul>
</div>
<div class="navbar-buttons">
<div class="navbar-buttons d-flex align-items-center gapx-1">
<ds-themed-search-navbar class="navbar-collapsed"></ds-themed-search-navbar>
<ds-themed-lang-switch class="navbar-collapsed"></ds-themed-lang-switch>
<ds-context-help-toggle class="navbar-collapsed"></ds-context-help-toggle>
Expand Down
6 changes: 0 additions & 6 deletions src/themes/dspace/app/navbar/navbar.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,3 @@ a.navbar-brand img {
}
}
}

.navbar-buttons {
display: flex;
gap: calc(var(--bs-spacer) / 3);
align-items: center;
}
Loading