Skip to content

Commit

Permalink
Fix stylings not being applied correctly in production builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Playwo committed Oct 1, 2022
1 parent e546d1b commit 2eb44a5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<nav-component (drawerToggle)="drawer.toggle()">
<navlink-component [route]="'overview'">Overview</navlink-component>
<navlink-component [route]="'earnings'">Earnings</navlink-component>
<navlink-component [route]="''" [pushdown]="true">Change Address</navlink-component>
<navlink-component class="push-down" [route]="''">Change Address</navlink-component>
</nav-component>
</mat-drawer>
<mat-drawer-content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<nav-component (drawerToggle)="drawer.toggle()">
<navlink-component [route]="'dashboard'">Dashboard</navlink-component>
<navlink-component [route]="'calculator'">Calculator</navlink-component>
<navlink-component [route]="''" [pushdown]="true">Back to Menu</navlink-component>
<navlink-component class="push-down" [route]="''">Back to Menu</navlink-component>
</nav-component>
</mat-drawer>
<mat-drawer-content>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<hr *ngIf="pushdown" class="push-down"/>
<hr id="top-hr"/>

<a [routerLink]="route">
<ng-content></ng-content>
</a>
<hr *ngIf="!pushdown" />

<hr id="bottom-hr"/>
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ hr {
margin: 0;
}

.push-down {
margin-top: auto;
}

a {
display: flex;
justify-content: center;
Expand All @@ -15,6 +11,18 @@ a {
vertical-align: middle;
}

:host([ng-reflect-pushdown=true]) {
:host(.push-down) {
margin-top: auto;
}

#top-hr {
display: none;
}

:host(.push-down) #top-hr {
display: block;
}

:host(.push-down) #bottom-hr {
display: none;
}

0 comments on commit 2eb44a5

Please sign in to comment.