Skip to content

Commit

Permalink
[FIX] Fix styling of overflowing titles
Browse files Browse the repository at this point in the history
  • Loading branch information
nck974 committed Dec 3, 2023
1 parent 0d60942 commit bbf1595
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

<mat-card-title class="show-pointer" (click)="onOpenDetails()"
title="{{category.description}}">
{{ category.name }}
<span class="no-overflow-everywhere">
{{ category.name }}
</span>
</mat-card-title>

<div mat-card-avatar [style.background-color]="getAvatarColor()"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
<!-- Header -->
<mat-card-header>
<mat-card-title>
{{ category.name }}
<span class="no-overflow-everywhere">
{{ category.name }}
</span>
</mat-card-title>

<div mat-card-avatar [style.background-color]="getAvatarColor()"></div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<div class="card-wrapper flex-center">

<!-- Card -->
<mat-card class="material-card-element-no-padding card-with-hover-effect" *ngIf="item">
<mat-card class="material-card-element-no-padding card-with-hover-effect"
*ngIf="item">

<!-- header -->
<mat-card-header>

<!-- Title -->
<mat-card-title class="show-pointer" (click)="onOpenDetails()"
title="{{item.description}}">
{{ item.name }}
<span class="no-overflow-everywhere">{{ item.name }}</span>
</mat-card-title>

<!-- Details -->
Expand All @@ -28,7 +29,7 @@
</span>

</mat-card-subtitle>

<!-- Category -->
<div mat-card-avatar [style.background-color]="getAvatarColor()"></div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
<!-- Header -->
<mat-card-header>
<mat-card-title>
{{ item.name }}
<span class="no-overflow-everywhere">
{{ item.name }}
</span>
</mat-card-title>

<mat-card-subtitle>
Expand All @@ -38,7 +40,7 @@
class="item-image"
alt="item-image">
</div>

<!-- Description -->
<p class="item-description no-overflow" *ngIf="item.description">
{{ item.description }}
Expand Down
4 changes: 4 additions & 0 deletions ng-diogenes/src/styles/alignment.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
word-wrap: break-word;
}

.no-overflow-everywhere {
word-wrap: anywhere;
}

.vertical-align-image {
vertical-align: middle;
}
Expand Down

0 comments on commit bbf1595

Please sign in to comment.