Skip to content

Commit cbbc518

Browse files
committed
refactor: migrate most fxFlex usages to pure CSS
Flex Layout is no longer maintained, see https://medium.com/@caerus.karu/farewell-flex-layout-aaa567023769
1 parent 131d4e4 commit cbbc518

7 files changed

Lines changed: 14 additions & 10 deletions

File tree

src/app/app.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<mat-sidenav #left [mode]="shared.isPortraitHandset ? 'over' : 'side'" class="app-sidenav mat-elevation-z2">
33
<mat-toolbar>
44
Links
5-
<span fxFlex></span>
5+
<span class="app-flex-spacer"></span>
66
<button mat-icon-button (click)="left.close()" matTooltip="Close sidenav" matTooltipPosition="right">
77
<mat-icon>keyboard_arrow_left</mat-icon>
88
</button>
@@ -41,7 +41,7 @@ <h3 matListItemTitle>{{link.title}}</h3>
4141
<mat-icon>menu</mat-icon>
4242
</button>
4343
<span class="toolbar-title">Study Buddy <span *ngIf="shared?.title">- {{shared.title}}</span></span>
44-
<span fxFlex></span>
44+
<span class="app-flex-spacer"></span>
4545
<button mat-icon-button [matMenuTriggerFor]="accountMenu" matTooltip="Account">
4646
<mat-icon>account_circle</mat-icon>
4747
</button>

src/app/components/toolbar/toolbar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</mat-icon>
88
</button>
99
<span>{{ toolbarTitle }}</span>
10-
<span fxFlex *ngIf="actionItems"></span>
10+
<span class="app-flex-spacer" *ngIf="actionItems"></span>
1111
<ng-container *ngIf="actionItems">
1212
<ng-container *ngFor="let item of nonOverflowActionItems">
1313
<button mat-button *ngIf="item.type === 'button'" (click)="item.onItemClickListener($event)"

src/app/dialogs/edit-content-dialog/edit-content-dialog.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h2 class="dialog-title">Edit</h2>
3636
</button>
3737
</div>
3838
<div class="markdown-edit-textarea">
39-
<mat-form-field fxFlex>
39+
<mat-form-field>
4040
<textarea matInput matTextareaAutosize></textarea>
4141
</mat-form-field>
4242
</div>
@@ -45,4 +45,4 @@ <h2 class="dialog-title">Edit</h2>
4545
<div mat-dialog-actions align="end">
4646
<button mat-button (click)="cancel()" color="primary">Cancel</button>
4747
<button mat-button (click)="updateVal()" color="primary">Update</button>
48-
</div>
48+
</div>

src/app/tips/tips.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<mat-card appearance="outlined">
55
<mat-card-header>
66
<mat-card-title>Word of the Day</mat-card-title>
7-
<span fxFlex></span>
7+
<span class="app-flex-spacer"></span>
88
<button mat-icon-button (click)="getWordOfDay()" matTooltip="Refresh" color="primary">
99
<mat-icon>refresh</mat-icon>
1010
</button>
@@ -37,7 +37,7 @@
3737
<mat-icon matCardAvatar class="quote-of-day-card--avatar">format_quote</mat-icon>
3838
<mat-card-title>{{quote?.title}}</mat-card-title>
3939
<mat-card-subtitle>{{quote?.author}}</mat-card-subtitle>
40-
<span fxFlex></span>
40+
<span class="app-flex-spacer"></span>
4141
<button mat-icon-button (click)="getQuoteOfDay()" matTooltip="Refresh" color="primary">
4242
<mat-icon>refresh</mat-icon>
4343
</button>

src/app/todo/todo-archived/todo-archived.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<mat-icon>close</mat-icon>
44
</button>
55
{{selectedTodos.length}} selected
6-
<span fxFlex></span>
6+
<span class="app-flex-spacer"></span>
77
<button mat-icon-button (click)="markSelectedTodosAsDone()" matTooltip="Mark selected as done">
88
<mat-icon>done_all</mat-icon>
99
</button>
@@ -116,7 +116,7 @@ <h3 matListItemTitle>{{todo?.title}}</h3>
116116
</mat-icon>
117117
<span>Project: {{todo?.project}}</span>
118118
</span>
119-
<span fxFlex></span>
119+
<span class="app-flex-spacer"></span>
120120
<ng-container *ngIf="toolbar.showToolbar">
121121
<button [matMenuTriggerFor]="actionsMenu" mat-icon-button (click)="stopPropogation($event)">
122122
<mat-icon>more_vert</mat-icon>

src/app/todo/todo-home/todo-home.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<mat-icon>close</mat-icon>
44
</button>
55
{{selectedTodos.length}} selected
6-
<span fxFlex></span>
6+
<span class="app-flex-spacer"></span>
77
<button mat-icon-button (click)="markSelectedTodosAsDone()" matTooltip="Mark selected as done">
88
<mat-icon>done_all</mat-icon>
99
</button>

src/styles.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,3 +536,7 @@ a[mat-raised-button] mat-icon {
536536
.mat-icon.mat-icon-inline {
537537
vertical-align: top;
538538
}
539+
540+
.app-flex-spacer {
541+
flex: 1;
542+
}

0 commit comments

Comments
 (0)