Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

use mat.theme #1279

Merged
merged 3 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,730 changes: 2,192 additions & 1,538 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

22 changes: 8 additions & 14 deletions scenes/src/styles.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
@use 'sass:map';
@use '@angular/material' as mat;

@include mat.core();

$theme: mat.define-theme((
color: (
theme-type: light,
primary: mat.$red-palette,
),
typography: (
brand-family: 'Roboto',
),
));

html {
font-family: 'Roboto';
@include mat.all-component-themes($theme);
@include mat.icon-color($theme, $color-variant: primary);
@include mat.theme((
color: (
theme-type: light,
primary: mat.$red-palette,
),
typography: Roboto,
density: 0,
));
}
52 changes: 0 additions & 52 deletions src/_app-theme.scss

This file was deleted.

This file was deleted.

16 changes: 16 additions & 0 deletions src/app/pages/component-category-list/component-category-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
}
}

.docs-component-category-list-summary a {
color: var(--mat-sys-primary);
}

.docs-component-category-list-card-title,
.docs-component-category-list-card-summary {
color: var(--mat-sys-on-surface-variant);
}

.docs-component-category-list {
display: flex;
flex-wrap: wrap;
Expand Down Expand Up @@ -53,10 +62,17 @@
.docs-component-category-list-card {
overflow: hidden;
transition: background 0.3s ease;
border: 1px solid var(--mat-sys-outline-variant);
border-radius: 12px;

&:hover {
background: var(--mat-sys-surface-dim);
}
}

.docs-component-category-list-card-image-wrapper {
height: 156px;
border-bottom: 1px solid var(--mat-sys-outline-variant);
}

.docs-component-category-list-card-summary {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
justify-content: center;
align-items: center;
min-height: 60px;
background: var(--mat-sys-primary-container);

@media (max-width: constants.$small-breakpoint-width) {
display: flex;
Expand Down
28 changes: 0 additions & 28 deletions src/app/pages/component-sidenav/_component-sidenav-theme.scss

This file was deleted.

3 changes: 2 additions & 1 deletion src/app/pages/component-sidenav/component-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
<div class="docs-component-viewer-nav-content">
<mat-nav-list>
@for (component of docItems.getItems(section); track component) {
<a mat-list-item
<a mat-list-item #link="routerLinkActive"
[routerLink]="'/' + section+ '/' + component.id"
[activated]="link.isActive"
routerLinkActive="docs-component-viewer-sidenav-item-selected"
[attr.aria-current]="currentItemId === component.id ? 'page': 'false'">
{{component.name}}
Expand Down
5 changes: 5 additions & 0 deletions src/app/pages/component-sidenav/component-sidenav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ app-component-sidenav {
top: 0;

.docs-component-viewer-nav-content {
border-right: 1px solid var(--mat-sys-outline-variant);
width: constants.$sidenav-width;
padding: 16px 8px;
height: calc(100vh - 75px);
Expand All @@ -47,6 +48,10 @@ app-component-sidenav {
width: 4px;
}

&::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, .26);
}

ul {
list-style-type: none;
margin: 0 0 5px 0;
Expand Down
12 changes: 0 additions & 12 deletions src/app/pages/component-viewer/_component-viewer-theme.scss

This file was deleted.

5 changes: 5 additions & 0 deletions src/app/pages/component-viewer/component-viewer.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
@use '../../../styles/constants';

guide-viewer,
app-component-viewer {
color: var(--mat-sys-on-surface);
}

app-component-viewer {
font-weight: 400;
width: calc(100% - #{constants.$sidenav-width + 1} - #{constants.$content-padding-sidenav * 2});
Expand Down
18 changes: 0 additions & 18 deletions src/app/pages/guide-list/_guide-list-theme.scss

This file was deleted.

10 changes: 10 additions & 0 deletions src/app/pages/guide-list/guide-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,19 @@
}

.docs-guide-item {
color: var(--mat-sys-on-surface-variant);
text-decoration: none;
display: flex;
margin: 16px;

&:focus,
&:hover {
outline: none;

.docs-guide-card {
background: var(--mat-sys-surface-dim);
}
}
}

.docs-guide-card.mat-mdc-card {
Expand Down
30 changes: 0 additions & 30 deletions src/app/pages/homepage/_homepage-theme.scss

This file was deleted.

20 changes: 20 additions & 0 deletions src/app/pages/homepage/homepage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $margin-promotion-sections-small: 15px;
overflow: hidden;
position: relative;
height: 420px;
background: var(--mat-sys-primary-container);
}

.docs-homepage-logo {
Expand All @@ -30,7 +31,17 @@ $margin-promotion-sections-small: 15px;
transform: translate(-50%, -50%);
}

.docs-homepage-row,
.docs-homepage-carousel-row h2,
a.docs-featured-components-carousel-item,
.docs-homepage-guides-card,
a.docs-link:hover {
color: var(--mat-sys-on-surface-variant);
}

.docs-header-headline {
color: var(--mat-sys-on-primary-container);

h1 {
font-size: 56px;
font-weight: 500;
Expand Down Expand Up @@ -241,3 +252,12 @@ $margin-promotion-sections-small: 15px;
margin: $margin-promotion-sections-small 0;
}
}

[carousel-item]:hover,
[carousel-item]:focus {
outline: none;

.docs-homepage-guides-card {
background: var(--mat-sys-surface-dim);
}
}
7 changes: 0 additions & 7 deletions src/app/pages/not-found/_not-found-theme.scss

This file was deleted.

4 changes: 4 additions & 0 deletions src/app/pages/not-found/not-found.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
$vertical-spacing: 64px;
$horizontal-spacing: 32px;

:host {
color: var(--mat-sys-on-primary-container);
}

main {
min-height: 100vh;
font-size: 1.25rem;
Expand Down
10 changes: 0 additions & 10 deletions src/app/shared/cookie-popup/_cookie-popup-theme.scss

This file was deleted.

5 changes: 3 additions & 2 deletions src/app/shared/cookie-popup/cookie-popup.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
@use 'sass:math';
@use '@angular/cdk' as cdk;
@use '@angular/material' as mat;

$_inner-spacing: 16px;

.popup {
@include mat.elevation(2);
box-shadow: var(--mat-app-elevation-shadow-level-2);
color: var(--mat-sys-on-surface);
background: var(--mat-sys-surface);
position: fixed;
bottom: 0;
left: 0;
Expand Down
Loading
Loading