diff --git a/src/app/app.component.css b/src/app/app.component.css index 9ac79fa..c22d045 100644 --- a/src/app/app.component.css +++ b/src/app/app.component.css @@ -1,11 +1,15 @@ mat-toolbar { + background-color: #fafafa; + box-shadow: none; + padding-left: 0.5em; + padding-right: 0.5em; + position: sticky; + top: 0; + z-index: 999999; +} + +@media (prefers-color-scheme: dark) { + mat-toolbar { background-color: #303030; - box-shadow: none; - padding-left: 0.5em; - padding-right: 0.5em; - position: sticky; - top: 0; - z-index: 999999; } - - \ No newline at end of file +} \ No newline at end of file diff --git a/src/app/budgets/add-edit-budget/add-edit-budget.component.html b/src/app/budgets/add-edit-budget/add-edit-budget.component.html index c6e6073..cc6cb57 100644 --- a/src/app/budgets/add-edit-budget/add-edit-budget.component.html +++ b/src/app/budgets/add-edit-budget/add-edit-budget.component.html @@ -9,6 +9,6 @@ - - + + diff --git a/src/app/budgets/budget-details/budget-details.component.css b/src/app/budgets/budget-details/budget-details.component.css index 9db627f..65b0941 100644 --- a/src/app/budgets/budget-details/budget-details.component.css +++ b/src/app/budgets/budget-details/budget-details.component.css @@ -1,69 +1,90 @@ .dashboard { + color: #333333; + display: flex; + flex-wrap: wrap; + justify-content: center; + padding: 1em; +} + +.dashboard>mat-card { + background: #FFFFFF; + display: inline-block; + margin: 1em; + padding: 1em; + max-width: 500px; + position: relative; + width: 100%; + align-self: flex-start; +} + +.dashboard .dashboard-primary { + padding: 5em 1em; + text-align: center; +} + +.dashboard-primary>* { + display: block; +} + +.dashboard div h2, +.dashboard div h3 { + margin: 0; +} + +.dashboard p, +.dashboard a { + color: #333333; + text-align: center; + text-decoration: none; +} + +.dashboard-primary div { + bottom: 0.5em; + display: flex; + justify-content: flex-end; + left: 0.5em; + right: 0.5em; + position: absolute; +} + +.dashboard .no-categories { + padding: 1em; + text-align: center; +} + +.dashboard .no-categories a { + border-color: #333333; + display: inline-block; + border: 1px dashed; + padding: 1em; +} + +.dashboard .no-categories p { + line-height: normal; + white-space: normal; +} + +a.view-all { + position: absolute; + right: 0.5em; + top: 0.5em; +} + +@media (prefers-color-scheme: dark) { + .dashboard { color: #F1F1F1; - display: flex; - flex-wrap: wrap; - justify-content: center; - padding: 1em; } - - .dashboard > mat-card { + + .dashboard>mat-card { background: #212121; - display: inline-block; - margin: 1em; - padding: 1em; - max-width: 500px; - position: relative; - width: 100%; - align-self: flex-start; } - - .dashboard .dashboard-primary { - padding: 5em 1em; - text-align: center; - } - - .dashboard-primary > * { - display: block; - } - - .dashboard div h2, .dashboard div h3 { - margin: 0; - } - - .dashboard p, .dashboard a { + + .dashboard p, + .dashboard a { color: #F1F1F1; - text-align: center; - text-decoration: none; } - - .dashboard-primary div { - bottom: 0.5em; - display: flex; - justify-content: flex-end; - left: 0.5em; - right: 0.5em; - position: absolute; - } - - .dashboard .no-categories { - padding: 1em; - text-align: center; - } - + .dashboard .no-categories a { - display: inline-block; - border: 1px dashed #F1F1F1; - padding: 1em; + border-color: #F1F1F1; } - - .dashboard .no-categories p { - line-height: normal; - white-space: normal; - } - - a.view-all { - position: absolute; - right: 0.5em; - top: 0.5em; - } - \ No newline at end of file +} \ No newline at end of file diff --git a/src/app/categories/category-form/category-form.component.html b/src/app/categories/category-form/category-form.component.html index 0ebbf1d..637d37d 100644 --- a/src/app/categories/category-form/category-form.component.html +++ b/src/app/categories/category-form/category-form.component.html @@ -18,6 +18,6 @@ --> - - + + \ No newline at end of file diff --git a/src/app/categories/category-list/category-list.component.css b/src/app/categories/category-list/category-list.component.css index 3c95b86..5294f67 100644 --- a/src/app/categories/category-list/category-list.component.css +++ b/src/app/categories/category-list/category-list.component.css @@ -1,12 +1,7 @@ .categories mat-progress-bar.mat-progress-bar { - background-color: #BDBDBD; margin-top: 0.5em; } -::ng-deep .mat-progress-bar-buffer { - background-color: #BDBDBD; -} - p.mat-line.category-list-title { display: flex; justify-content: space-between; @@ -26,5 +21,11 @@ p.mat-line.category-list-title .remaining { } ::ng-deep .mat-progress-bar-buffer { - background-color: #333333 !important; + background-color: #F1F1F1 !important; +} + +@media (prefers-color-scheme: dark) { + ::ng-deep .mat-progress-bar-buffer { + background-color: #333333 !important; + } } \ No newline at end of file diff --git a/src/app/transactions/add-edit-transaction/add-edit-transaction.component.css b/src/app/transactions/add-edit-transaction/add-edit-transaction.component.css index a34bdac..881d3b8 100644 --- a/src/app/transactions/add-edit-transaction/add-edit-transaction.component.css +++ b/src/app/transactions/add-edit-transaction/add-edit-transaction.component.css @@ -1,6 +1,5 @@ .transaction-form { padding: 1em; - color: #F1F1F1; } .transaction-form * { @@ -10,8 +9,3 @@ mat-radio-button { padding-bottom: 15px; } - -button { - width: 100%; - margin: 1em 0; -} diff --git a/src/styles.css b/src/styles.css index ce7d8b1..b73bc15 100644 --- a/src/styles.css +++ b/src/styles.css @@ -2,14 +2,14 @@ html, body { - background: #333333; + background: #F1F1F1; font-family: Roboto, "Helvetica Neue", sans-serif; margin: 0; padding: 0; } p { - color: #F1F1F1; + color: #333333; margin: 0; } @@ -21,7 +21,7 @@ a.mat-fab { .text-small { font-size: 1em; - color: #BDBDBD + color: #333333; } mat-toolbar.mat-toolbar-row, @@ -29,21 +29,21 @@ mat-toolbar.mat-toolbar-single-row { padding: 0; } -mat-toolbar > span { +mat-toolbar>span { display: flex; width: 33%; ; } -mat-toolbar > span:nth-child(1) { +mat-toolbar>span:nth-child(1) { justify-content: flex-start; } -mat-toolbar > span:nth-child(2) { +mat-toolbar>span:nth-child(2) { justify-content: center; } -mat-toolbar > span:nth-child(3) { +mat-toolbar>span:nth-child(3) { justify-content: flex-end; } @@ -105,7 +105,7 @@ mat-sidenav { .form { padding: 1em; - color: #F1F1F1; + color: #333333; } .form .mat-form-field, @@ -115,4 +115,29 @@ mat-sidenav { .form mat-radio-button { padding-bottom: 15px; +} + +.form button { + width: 100%; + margin: 1em 0; +} + +@media (prefers-color-scheme: dark) { + + html, + body { + background: #333333; + } + + p { + color: #F1F1F1; + } + + .text-small { + color: #BDBDBD; + } + + .form { + color: #F1F1F1; + } } \ No newline at end of file diff --git a/src/styles.scss b/src/styles.scss index d929589..8f67d47 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -16,9 +16,15 @@ $budget-app-accent: mat-palette($mat-cyan); $budget-app-warn: mat-palette($mat-red); // Create the theme object (a Sass map containing all of the palettes). -$budget-app-theme: mat-dark-theme($budget-app-primary, $budget-app-accent, $budget-app-warn); +$budget-app-theme: mat-light-theme($budget-app-primary, $budget-app-accent, $budget-app-warn); +$budget-dark-theme: mat-dark-theme($budget-app-primary, $budget-app-accent, $budget-app-warn); // Include theme styles for core and each component used in your app. // Alternatively, you can import and @include the theme mixins for each component // that you are using. + @include angular-material-theme($budget-app-theme); + +@media (prefers-color-scheme: dark) { + @include angular-material-theme($budget-dark-theme); +}