proper truncation in RTL locales
This commit is contained in:
		
							parent
							
								
									42a39c1f7c
								
							
						
					
					
						commit
						6448ad0ac7
					
				| @ -151,5 +151,5 @@ h2 { | |||||||
| .tx-link { | .tx-link { | ||||||
| 	width: 0; | 	width: 0; | ||||||
| 	flex-grow: 1; | 	flex-grow: 1; | ||||||
| 	margin-right: 2em; | 	margin-inline-end: 2em; | ||||||
| } | } | ||||||
| @ -1,5 +1,12 @@ | |||||||
| <span class="truncate" [class.rtl]="rtl" [style.max-width]="maxWidth ? maxWidth + 'px' : null"> | <span class="truncate" [style.max-width]="maxWidth ? maxWidth + 'px' : null"> | ||||||
|  |   <ng-container *ngIf="!rtl"> | ||||||
|     <span class="first">{{text.slice(0,-lastChars)}}</span> |     <span class="first">{{text.slice(0,-lastChars)}}</span> | ||||||
|     <span class="last-four">{{text.slice(-lastChars)}}</span> |     <span class="last-four">{{text.slice(-lastChars)}}</span> | ||||||
|     <ng-content></ng-content> |     <ng-content></ng-content> | ||||||
|  |   </ng-container> | ||||||
|  |   <ng-container *ngIf="rtl"> | ||||||
|  |     <span class="first">{{text.slice(lastChars)}}</span> | ||||||
|  |     <span class="last-four">{{text.slice(0,lastChars)}}</span> | ||||||
|  |     <ng-content></ng-content> | ||||||
|  |   </ng-container> | ||||||
| </span> | </span> | ||||||
|  | |||||||
| @ -4,10 +4,6 @@ | |||||||
|   flex-direction: row; |   flex-direction: row; | ||||||
|   align-items: baseline; |   align-items: baseline; | ||||||
| 
 | 
 | ||||||
|   &.rtl { |  | ||||||
|     flex-direction: row-reverse; |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   .first { |   .first { | ||||||
|     flex-grow: 0; |     flex-grow: 0; | ||||||
|     flex-shrink: 1; |     flex-shrink: 1; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user