Skip to content

Commit

Permalink
Merge pull request #6830 from rationality6/text_truncate_fix
Browse files Browse the repository at this point in the history
#6754 truncatefy fix
  • Loading branch information
indirectlylit authored May 19, 2020
2 parents 4c96111 + 22afae2 commit f94acb3
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/kolibri-components/src/KRadioButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
/>

<span class="text" dir="auto">
{{ label }}
<span
<div class="truncate-text">{{ label }}</div>
<div
v-if="description"
class="description"
:style="[{ color: disabled ? '' : $themeTokens.annotation }, disabledStyle ]"
>
{{ description }}
</span>
</div>
<slot></slot>
</span>

Expand Down Expand Up @@ -188,17 +188,20 @@
height: $radio-height;
}
.text,
.description {
display: inline-block;
}
.text {
display: inline-block;
max-width: calc(100% - #{$radio-height});
padding-left: 8px;
line-height: $radio-height;
}
.truncate-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.description {
width: 100%;
font-size: 12px;
line-height: normal;
}
Expand Down

0 comments on commit f94acb3

Please sign in to comment.