Skip to content

Commit f08dd6c

Browse files
authored
Merge pull request #3392 from CVEProject/rl-3081-mobile-metrics-tables
Resolves #3081 - metrics: fix tables in mobile view (int)
2 parents 0da8aa5 + 8726b92 commit f08dd6c

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

src/views/About/Metrics.vue

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,8 +710,33 @@ export default {
710710

711711
<!-- Add "scoped" attribute to limit CSS to this component only -->
712712
<style scoped lang="scss">
713-
//Equally space data cells in metrics tables
713+
714+
// Equally space data cells in metrics tables
715+
// Numbers in metrics tables look better right-aligned.
716+
714717
td {
715718
width: auto !important;
719+
text-align: right !important;
716720
}
721+
722+
// For the mobile screen sizes, this overrides the settings in cveTableStacked,
723+
// which was causing tables to be split into multiple tables and the year
724+
// headings to be hidden. This keeps the tables intact. Mobile users will
725+
// be able to horizontally scroll as normal.
726+
727+
@media only screen and (max-width: $desktop) {
728+
729+
td {
730+
display: table-cell;
731+
}
732+
733+
thead th {
734+
display: table-cell;
735+
}
736+
737+
tr {
738+
display: table-row !important;
739+
}
740+
}
741+
717742
</style>

0 commit comments

Comments
 (0)