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">
|
<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">
|
<ng-container *ngIf="link">
|
||||||
<a [routerLink]="link" class="truncate-link">
|
<a [routerLink]="link" class="truncate-link">
|
||||||
<ng-container *ngIf="rtl; then rtlTruncated; else ltrTruncated;"></ng-container>
|
<ng-container *ngIf="rtl; then rtlTruncated; else ltrTruncated;"></ng-container>
|
||||||
@ -11,11 +12,10 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<ng-template #ltrTruncated>
|
<ng-template #ltrTruncated>
|
||||||
<div class="hidden">{{ text }}</div>
|
|
||||||
<span class="first">{{text.slice(0,-lastChars)}}</span><span class="last-four">{{text.slice(-lastChars)}}</span>
|
<span class="first">{{text.slice(0,-lastChars)}}</span><span class="last-four">{{text.slice(-lastChars)}}</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template #rtlTruncated>
|
<ng-template #rtlTruncated>
|
||||||
<div class="hidden">{{ text }}</div>
|
|
||||||
<span class="first">{{text.slice(lastChars)}}</span><span class="last-four">{{text.slice(0,lastChars)}}</span>
|
<span class="first">{{text.slice(lastChars)}}</span><span class="last-four">{{text.slice(0,lastChars)}}</span>
|
||||||
</ng-template>
|
</ng-template>
|
@ -32,4 +32,12 @@
|
|||||||
.hidden {
|
.hidden {
|
||||||
color: transparent;
|
color: transparent;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
max-width: 300px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 567px) {
|
||||||
|
.hidden {
|
||||||
|
max-width: 150px;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user