Skip to content

Commit

Permalink
Fix tab alignment on updated theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Etheryte committed May 15, 2024
1 parent 4234133 commit 10f9810
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 22 deletions.
7 changes: 6 additions & 1 deletion web/html/src/branding/css/base/fixes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ div.checkbox.icon-wrapper i.fa {

/**
* This allows us to fix layouts on Bootstrap 5 pages without affecting Bootstrap 3 pages
* TODO: Remove and replace its usages with just `row` after we finish the migration
* TODO: Can we remove and replace its usages with just `row` after we finish the migration?
*/
.form-group {
@extend .row;
}

// TODO: Remove this and squash it into just `row` after the migration is complete.
.row-0 {
@extend .row;
}

// We use float utilities from Bootstrap 3 in a number of places, this emulates the same behavior. Over time we should be able to refactor these out.
.pull-right {
float: right !important;
Expand Down
9 changes: 0 additions & 9 deletions web/html/src/branding/css/base/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -940,15 +940,6 @@ i.spacewalk-help-link {
padding-bottom: 1px;
}
}
.nav-tabs-indent(1);
.nav-tabs-indent(2);
.nav-tabs-indent(3);

.nav-tabs-indent(@i) {
&:nth-child(@{i}) {
margin-left: (@i - 1) * 30px;
}
}
}

/* Override rules from theme.less that uses
Expand Down
12 changes: 0 additions & 12 deletions web/html/src/branding/css/base/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -954,18 +954,6 @@ i.spacewalk-help-link {
padding-bottom: 1px;
}
}

// TODO: Fix
// See https://stackoverflow.com/a/77366360/1470607
// .nav-tabs-indent(1);
// .nav-tabs-indent(2);
// .nav-tabs-indent(3);

// .nav-tabs-indent($i) {
// &:nth-child(${i}) {
// margin-left: ($i - 1) * 30px;
// }
// }
}

/* Override rules from theme.less that uses
Expand Down
10 changes: 10 additions & 0 deletions web/html/src/branding/css/susemanager/components/nav.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
@nav-tabs-offset: 30px;

.nav-tabs {
margin-bottom: 0.25rem;
border-bottom: 1px solid @eos-bc-gray-100;

&:nth-child(2) {
margin-left: @nav-tabs-offset;
}

&:nth-child(3) {
margin-left: 2* @nav-tabs-offset;
}

&:last-child {
margin-bottom: 1rem;
}
Expand Down
10 changes: 10 additions & 0 deletions web/html/src/branding/css/susemanager/components/nav.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
$nav-tabs-offset: 30px;

.nav-tabs {
margin-bottom: 0.25rem;
border-bottom: 1px solid $eos-bc-gray-100;

&:nth-child(2) {
margin-left: $nav-tabs-offset;
}

&:nth-child(3) {
margin-left: 2* $nav-tabs-offset;
}

&:last-child {
margin-bottom: 1rem;
}
Expand Down

0 comments on commit 10f9810

Please sign in to comment.