Skip to content

Commit ef798d4

Browse files
authored
Tweak language stats bar (#10487)
- Ensure bar does not overflow parent - Remove unneccessary borders/background - Fix shaky animation caused by JS animation miscalculation by setting fixed height on the summary box. Box itself is still shaky during animation, but better it then the whole page. Fixes: #10474
1 parent 1758125 commit ef798d4

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

templates/repo/sub_menu.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="ui segments">
1+
<div class="ui segments repository-summary">
22
<div class="ui segment sub-menu repository-menu">
33
<div class="ui two horizontal center link list">
44
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}}

web_src/less/_repository.less

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,19 +2011,31 @@
20112011
}
20122012
}
20132013

2014-
.segment.language-stats {
2015-
padding: 0;
2016-
height: .6em;
2017-
display: flex;
2018-
white-space: nowrap;
2019-
width: 100%;
2014+
.repository-summary {
2015+
height: 48px;
2016+
overflow: hidden;
20202017

2021-
.bar {
2022-
white-space: nowrap;
2023-
border: 0;
2018+
.segment.language-stats-details,
2019+
.segment.repository-summary {
2020+
border-top: none;
2021+
background: none;
2022+
}
2023+
2024+
.segment.language-stats {
20242025
padding: 0;
2025-
margin: 0;
2026-
height: .6em;
2026+
height: 11px;
2027+
display: flex;
2028+
white-space: nowrap;
2029+
width: 100%;
2030+
border-radius: 0;
2031+
2032+
.bar {
2033+
white-space: nowrap;
2034+
border: 0;
2035+
padding: 0;
2036+
margin: 0;
2037+
height: 100%;
2038+
}
20272039
}
20282040
}
20292041
}

0 commit comments

Comments
 (0)