Skip to content

Commit

Permalink
[JENKINS-73543] make icon in buttons in tables resizable
Browse files Browse the repository at this point in the history
With jenkinsci#9131 the jenkins-table__button was replaced at certain places with
jenkins-button. But this change caused two regressions:
- The icon size for large table was almost the same as that for medium
  tables
- The icons wrapped in jenkins-button were not resizable
- with small table the buttons overflowed the table cell

This change restores the old icon size for large tables and adds
additional css rules for jenkins-button inside tables so they are
properly resized and the padding is correct
  • Loading branch information
mawinter69 committed Jul 18, 2024
1 parent c479755 commit 8604501
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions war/src/main/scss/components/_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,12 @@
.jenkins-button {
margin: -10px 0;
padding: 0.5rem 0.75rem;
min-height: 1.75rem;

// Increase the size of symbols compared to regular buttons
svg {
width: 1.375rem !important;
height: 1.375rem !important;
width: 1.5rem !important;
height: 1.5rem !important;
}
}

Expand All @@ -180,8 +181,8 @@
svg,
.build-status-icon__wrapper,
img {
width: 1.375rem !important;
height: 1.375rem !important;
width: 1.5rem !important;
height: 1.5rem !important;
}
}

Expand All @@ -202,6 +203,14 @@
height: 1.3rem !important;
}
}

.jenkins-button {
padding: 0.4rem 0.6rem;
svg {
width: 1.3rem !important;
height: 1.3rem !important;
}
}
}

&--auto-width {
Expand All @@ -225,6 +234,14 @@
height: 1rem !important;
}
}

.jenkins-button {
padding: 0.3rem 0.5rem;
svg {
width: 1rem !important;
height: 1rem !important;
}
}
}

&__button,
Expand Down

0 comments on commit 8604501

Please sign in to comment.