mirror of
https://github.com/go-gitea/gitea
synced 2024-09-11 00:47:00 +02:00
Fix the overflow style for "Hide all checks" (#27932)
Fix #27928 --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
e80f446d3a
commit
10a6ebb3fd
@ -60,6 +60,7 @@
|
|||||||
|
|
||||||
.tippy-box[data-theme="box-with-header"] .tippy-content {
|
.tippy-box[data-theme="box-with-header"] .tippy-content {
|
||||||
background: var(--color-box-body);
|
background: var(--color-box-body);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3075,21 +3075,29 @@ tbody.commit-list {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.commit-status-header {
|
.commit-status-header {
|
||||||
border: none !important; /* reset the default ".ui.attached.header" styles, to use the outer border */
|
/* reset the default ".ui.attached.header" styles, to use the outer border */
|
||||||
margin: 0 !important;
|
border: none !important;
|
||||||
|
/* add a bottom border to make sure the there is always a divider between the header and list when the list is scrolling */
|
||||||
|
border-bottom: 1px solid var(--color-secondary) !important;
|
||||||
|
/* use negative margin to avoid the newly added border conflict with the list's top border */
|
||||||
|
margin: 0 0 -1px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commit-status-list {
|
.commit-status-list {
|
||||||
max-height: 195px; /* fit exactly 4 items */
|
max-height: 240px; /* fit exactly 6 items, commit-status-item.height * 6 */
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
transition: max-height .2s;
|
transition: max-height .2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commit-status-item {
|
.commit-status-item {
|
||||||
padding: 14px 10px !important;
|
height: 40px;
|
||||||
|
padding: 0 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.commit-status-item + .commit-status-item {
|
||||||
border-top: 1px solid var(--color-secondary);
|
border-top: 1px solid var(--color-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,9 +4,7 @@ export function initRepoPullRequestCommitStatus() {
|
|||||||
const list = panel.querySelector('.commit-status-list');
|
const list = panel.querySelector('.commit-status-list');
|
||||||
btn.addEventListener('click', () => {
|
btn.addEventListener('click', () => {
|
||||||
list.style.maxHeight = list.style.maxHeight ? '' : '0px'; // toggle
|
list.style.maxHeight = list.style.maxHeight ? '' : '0px'; // toggle
|
||||||
list.style.overflow = 'hidden'; // hide scrollbar when hiding
|
|
||||||
btn.textContent = btn.getAttribute(list.style.maxHeight ? 'data-show-all' : 'data-hide-all');
|
btn.textContent = btn.getAttribute(list.style.maxHeight ? 'data-show-all' : 'data-hide-all');
|
||||||
});
|
});
|
||||||
list.addEventListener('animationend', () => list.style.overflow = '');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user