Skip to content

Commit

Permalink
Merge pull request #5985 from nextcloud-libraries/fix/nc-counter-bubb…
Browse files Browse the repository at this point in the history
…le-size

fix(NcCounterBubble): increase size
  • Loading branch information
ShGKme authored Aug 20, 2024
2 parents 8b0065c + acb7cbf commit 3a504fa
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/components/NcCounterBubble/NcCounterBubble.vue
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,14 @@ export default {
<style lang="scss" scoped>
.counter-bubble__counter {
--counter-bubble-line-height: 1em;
--counter-bubble-height: 22px; // ~ 1cap + 2 * 1.5 * grid
font-size: var(--font-size-small, 13px);
overflow: hidden;
width: fit-content;
min-width: calc(var(--counter-bubble-line-height) + 2 * var(--default-grid-baseline)); // Make it not narrower than a circle
min-width: var(--counter-bubble-height); // Make it not narrower than a circle
text-align: center;
line-height: var(--counter-bubble-line-height);
padding: var(--default-grid-baseline);
line-height: var(--counter-bubble-height); // Expand line-height to full height to center text vertically
padding: 0 calc(1.5 * var(--default-grid-baseline));
border-radius: var(--border-radius-pill);
background-color: var(--color-primary-element-light);
font-weight: bold;
Expand Down Expand Up @@ -331,13 +331,4 @@ export default {
box-shadow: inset 0 0 0 2px;
}
}
// Make it pixel perfect aligned
@supports (line-height: 1cap) {
.counter-bubble__counter {
// 1em is higher than one digit and makes it not perfectly vertically aligned
// 1cap = hight of a digit (T character)
--counter-bubble-line-height: 1cap;
}
}
</style>

0 comments on commit 3a504fa

Please sign in to comment.