Fixing mobile overflow
This commit is contained in:
parent
d4568b631d
commit
86fe6a802b
@ -1,4 +1,5 @@
|
||||
<span class="truncate" [style.max-width]="maxWidth ? maxWidth + 'px' : null" [style.justify-content]="textAlign" [class.inline]="inline">
|
||||
<div class="hidden">{{ text }}</div>
|
||||
<ng-container *ngIf="link">
|
||||
<a [routerLink]="link" class="truncate-link">
|
||||
<ng-container *ngIf="rtl; then rtlTruncated; else ltrTruncated;"></ng-container>
|
||||
@ -11,11 +12,10 @@
|
||||
</span>
|
||||
|
||||
<ng-template #ltrTruncated>
|
||||
<div class="hidden">{{ text }}</div>
|
||||
|
||||
<span class="first">{{text.slice(0,-lastChars)}}</span><span class="last-four">{{text.slice(-lastChars)}}</span>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #rtlTruncated>
|
||||
<div class="hidden">{{ text }}</div>
|
||||
<span class="first">{{text.slice(lastChars)}}</span><span class="last-four">{{text.slice(0,lastChars)}}</span>
|
||||
</ng-template>
|
@ -32,4 +32,12 @@
|
||||
.hidden {
|
||||
color: transparent;
|
||||
position: absolute;
|
||||
max-width: 300px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media (max-width: 567px) {
|
||||
.hidden {
|
||||
max-width: 150px;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user