Skip to content

Commit

Permalink
Remove hard-coded form stylings, consolidate into css form style
Browse files Browse the repository at this point in the history
  • Loading branch information
romeonicholas committed Oct 30, 2023
1 parent ec3927b commit 2efe850
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
>
<mat-step completed="false" label="Create new project">
<div class="flex justify-center">
<mat-card>
<mat-card class="mat-card-form">
<form [formGroup]="form">
<p>
<mat-form-field appearance="fill" class="form-field-default">
Expand Down Expand Up @@ -89,12 +89,11 @@
<app-project-user-settings></app-project-user-settings>
</div>
<div *ngIf="projectService.project$ | async">
<div class="flex-container">
<div class="flex justify-between">
<div></div>
<div class="w-[420px]">
<div class="flex-container">
<div></div>
<button
<div>
<div class="link-container-beneath-form flex justify-end">
<a
mat-button
color="primary"
(click)="stepper.next()"
Expand All @@ -112,7 +111,7 @@
<mat-icon class="mat-icon-position right"
>navigate_next</mat-icon
>
</button>
</a>
</div>
</div>
<div></div>
Expand All @@ -128,12 +127,13 @@
#model_creator
></app-create-model>
</div>
<div class="flex-container sub-stepper-outside-button">
<div class="flex-container">
<div></div>
<div class="w-[420px]">
<div class="flex-container">
<div></div>
<button
<div>
<div
class="link-container-beneath-form sub-stepper-outside-link-container flex justify-end"
>
<a
mat-button
[routerLink]="[
'/project',
Expand All @@ -157,7 +157,7 @@
Finish project creation
</span>
<mat-icon class="mat-icon-position right">check</mat-icon>
</button>
</a>
</div>
</div>
<div></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
-->

<div class="flex justify-center">
<mat-card class="w-[420px]" *ngIf="projectService.project$ | async">
<mat-card class="mat-card-form" *ngIf="projectService.project$ | async">
<form [formGroup]="form" (ngSubmit)="onSubmit()">
<fieldset class="flex flex-wrap">
<fieldset>
<mat-form-field appearance="fill">
<mat-label>Model name</mat-label>
<input matInput formControlName="name" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
<!-- New -->

<div class="flex justify-center">
<mat-card
class="w-[400px] max-w-[85vw] !pb-0.5 pr-0"
*ngIf="projectService.project$ | async"
>
<mat-card class="mat-card-form" *ngIf="projectService.project$ | async">
<div
*ngIf="(projectService.project$ | async) && (modelService.model$ | async)"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class="flex justify-center"
*ngIf="(projectService.project$ | async) && (modelService.model$ | async)"
>
<mat-card>
<mat-card class="mat-card-form">
<form [formGroup]="form">
<div formGroupName="urls">
<fieldset *ngIf="availableGitInstances?.length">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*ngIf="(projectService.project$ | async) && (modelService.model$ | async)"
class="wrapper flex justify-center"
>
<mat-card>
<mat-card class="mat-card-form">
<form [formGroup]="form" (ngSubmit)="onSubmit()">
<fieldset>
<app-form-field-skeleton-loader
Expand Down
45 changes: 22 additions & 23 deletions frontend/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ button.success {
color: white;
}

mat-card {
margin: 10px;
}

h1 {
margin: 10px;
}
Expand Down Expand Up @@ -175,12 +171,30 @@ fieldset > :not(.field-separator) {
text-align: center;
}

mat-card {
.mat-card-form {
width: 420px;
padding-bottom: 0px;
margin-bottom: 0px;
}

.link-container-beneath-form {
width: 420px;
}

.outer-stepper {
width: 710px;
}

.inner-stepper {
width: 680px;
}

.nextline-stepper .mat-step-label.mat-step-label {
text-align: center;
text-overflow: inherit;
white-space: normal;
}

.margin.default {
margin: 10px;
}
Expand Down Expand Up @@ -211,20 +225,6 @@ mat-card {
margin: auto;
}

.outer-stepper {
width: 710px;
}

.inner-stepper {
width: 680px;
}

.nextline-stepper .mat-step-label.mat-step-label {
text-align: center;
text-overflow: inherit;
white-space: normal;
}

/*
Angular Material Card Styles
*/
Expand All @@ -237,9 +237,8 @@ Angular Material Card Styles
margin-left: 50px;
}

.sub-stepper-outside-button {
margin: -25px;
padding-bottom: 25px;
.sub-stepper-outside-link-container {
margin-top: -15px;
}

.mat-card-overview .content {
Expand Down Expand Up @@ -294,7 +293,7 @@ Angular Material Card Styles
}

.form-field-default {
width: 405px;
width: 100%;
max-width: 85vw;
}

Expand Down

0 comments on commit 2efe850

Please sign in to comment.