Skip to content

Commit eeab33b

Browse files
andrewseguinAndrew Seguin
and
Andrew Seguin
authored
use mat.theme (#1279)
* use mat.theme * update deps * update deps --------- Co-authored-by: Andrew Seguin <[email protected]>
1 parent 82ee7fe commit eeab33b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2422
-2019
lines changed

material.angular.io/pnpm-lock.yaml

+2,192-1,538
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+8-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
@use 'sass:map';
22
@use '@angular/material' as mat;
33

4-
@include mat.core();
5-
6-
$theme: mat.define-theme((
7-
color: (
8-
theme-type: light,
9-
primary: mat.$red-palette,
10-
),
11-
typography: (
12-
brand-family: 'Roboto',
13-
),
14-
));
15-
164
html {
175
font-family: 'Roboto';
18-
@include mat.all-component-themes($theme);
19-
@include mat.icon-color($theme, $color-variant: primary);
6+
@include mat.theme((
7+
color: (
8+
theme-type: light,
9+
primary: mat.$red-palette,
10+
),
11+
typography: Roboto,
12+
density: 0,
13+
));
2014
}

material.angular.io/src/_app-theme.scss

-52
This file was deleted.

material.angular.io/src/app/pages/component-category-list/_component-category-list-theme.scss

-25
This file was deleted.

material.angular.io/src/app/pages/component-category-list/component-category-list.scss

+16
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
}
2525
}
2626

27+
.docs-component-category-list-summary a {
28+
color: var(--mat-sys-primary);
29+
}
30+
31+
.docs-component-category-list-card-title,
32+
.docs-component-category-list-card-summary {
33+
color: var(--mat-sys-on-surface-variant);
34+
}
35+
2736
.docs-component-category-list {
2837
display: flex;
2938
flex-wrap: wrap;
@@ -53,10 +62,17 @@
5362
.docs-component-category-list-card {
5463
overflow: hidden;
5564
transition: background 0.3s ease;
65+
border: 1px solid var(--mat-sys-outline-variant);
66+
border-radius: 12px;
67+
68+
&:hover {
69+
background: var(--mat-sys-surface-dim);
70+
}
5671
}
5772

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

6278
.docs-component-category-list-card-summary {

material.angular.io/src/app/pages/component-page-header/_component-page-header-theme.scss

-7
This file was deleted.

material.angular.io/src/app/pages/component-page-header/component-page-header.scss

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
justify-content: center;
66
align-items: center;
77
min-height: 60px;
8+
background: var(--mat-sys-primary-container);
89

910
@media (max-width: constants.$small-breakpoint-width) {
1011
display: flex;

material.angular.io/src/app/pages/component-sidenav/_component-sidenav-theme.scss

-28
This file was deleted.

material.angular.io/src/app/pages/component-sidenav/component-nav.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
<div class="docs-component-viewer-nav-content">
44
<mat-nav-list>
55
@for (component of docItems.getItems(section); track component) {
6-
<a mat-list-item
6+
<a mat-list-item #link="routerLinkActive"
77
[routerLink]="'/' + section+ '/' + component.id"
8+
[activated]="link.isActive"
89
routerLinkActive="docs-component-viewer-sidenav-item-selected"
910
[attr.aria-current]="currentItemId === component.id ? 'page': 'false'">
1011
{{component.name}}

material.angular.io/src/app/pages/component-sidenav/component-sidenav.scss

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ app-component-sidenav {
3636
top: 0;
3737

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

51+
&::-webkit-scrollbar-thumb {
52+
background: rgba(0, 0, 0, .26);
53+
}
54+
5055
ul {
5156
list-style-type: none;
5257
margin: 0 0 5px 0;

material.angular.io/src/app/pages/component-viewer/_component-viewer-theme.scss

-12
This file was deleted.

material.angular.io/src/app/pages/component-viewer/component-viewer.scss

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
@use '../../../styles/constants';
22

3+
guide-viewer,
4+
app-component-viewer {
5+
color: var(--mat-sys-on-surface);
6+
}
7+
38
app-component-viewer {
49
font-weight: 400;
510
width: calc(100% - #{constants.$sidenav-width + 1} - #{constants.$content-padding-sidenav * 2});

material.angular.io/src/app/pages/guide-list/_guide-list-theme.scss

-18
This file was deleted.

material.angular.io/src/app/pages/guide-list/guide-list.scss

+10
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,19 @@
1515
}
1616

1717
.docs-guide-item {
18+
color: var(--mat-sys-on-surface-variant);
1819
text-decoration: none;
1920
display: flex;
2021
margin: 16px;
22+
23+
&:focus,
24+
&:hover {
25+
outline: none;
26+
27+
.docs-guide-card {
28+
background: var(--mat-sys-surface-dim);
29+
}
30+
}
2131
}
2232

2333
.docs-guide-card.mat-mdc-card {

material.angular.io/src/app/pages/homepage/_homepage-theme.scss

-30
This file was deleted.

material.angular.io/src/app/pages/homepage/homepage.scss

+20
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ $margin-promotion-sections-small: 15px;
66
overflow: hidden;
77
position: relative;
88
height: 420px;
9+
background: var(--mat-sys-primary-container);
910
}
1011

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

34+
.docs-homepage-row,
35+
.docs-homepage-carousel-row h2,
36+
a.docs-featured-components-carousel-item,
37+
.docs-homepage-guides-card,
38+
a.docs-link:hover {
39+
color: var(--mat-sys-on-surface-variant);
40+
}
41+
3342
.docs-header-headline {
43+
color: var(--mat-sys-on-primary-container);
44+
3445
h1 {
3546
font-size: 56px;
3647
font-weight: 500;
@@ -241,3 +252,12 @@ $margin-promotion-sections-small: 15px;
241252
margin: $margin-promotion-sections-small 0;
242253
}
243254
}
255+
256+
[carousel-item]:hover,
257+
[carousel-item]:focus {
258+
outline: none;
259+
260+
.docs-homepage-guides-card {
261+
background: var(--mat-sys-surface-dim);
262+
}
263+
}

material.angular.io/src/app/pages/not-found/_not-found-theme.scss

-7
This file was deleted.

material.angular.io/src/app/pages/not-found/not-found.scss

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
$vertical-spacing: 64px;
22
$horizontal-spacing: 32px;
33

4+
:host {
5+
color: var(--mat-sys-on-primary-container);
6+
}
7+
48
main {
59
min-height: 100vh;
610
font-size: 1.25rem;

material.angular.io/src/app/shared/cookie-popup/_cookie-popup-theme.scss

-10
This file was deleted.

material.angular.io/src/app/shared/cookie-popup/cookie-popup.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
@use 'sass:math';
22
@use '@angular/cdk' as cdk;
3-
@use '@angular/material' as mat;
43

54
$_inner-spacing: 16px;
65

76
.popup {
8-
@include mat.elevation(2);
7+
box-shadow: var(--mat-app-elevation-shadow-level-2);
8+
color: var(--mat-sys-on-surface);
9+
background: var(--mat-sys-surface);
910
position: fixed;
1011
bottom: 0;
1112
left: 0;

0 commit comments

Comments
 (0)