Skip to content

Commit dc689bb

Browse files
committed
Follow-up fixes for the styling page
Fixes the following issues with the styling page: * The table header background wasn't themed correctly. * The filters looked weird on smaller screens. * Filtering was case-sensitive.
1 parent 925dd09 commit dc689bb

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ thead {
1010
position: sticky;
1111
top: 0;
1212
left: 0;
13-
background: #fdfbff;
13+
background: var(--mat-sys-surface);
1414
z-index: 1;
1515
}
1616

@@ -19,10 +19,8 @@ thead {
1919
align-items: center;
2020
margin: 24px 0;
2121
width: 100%;
22-
}
23-
24-
.filters mat-form-field {
25-
margin-right: 16px;
22+
flex-wrap: wrap;
23+
gap: 16px;
2624
}
2725

2826
.name-field {

material.angular.io/src/app/pages/component-viewer/token-table.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ export class TokenTable {
3838
protected typeFilter = signal<TokenType | null>(null);
3939
protected types: TokenType[] = ['base', 'color', 'typography', 'density'];
4040
protected filteredTokens = computed(() => {
41-
const name = this.nameFilter().trim();
41+
const name = this.nameFilter().trim().toLowerCase();
4242
const typeFilter = this.typeFilter();
4343

4444
return this.tokens().filter(token =>
45-
(!name || token.overridesName.includes(name)) &&
45+
(!name || token.overridesName.toLowerCase().includes(name)) &&
4646
(!typeFilter || token.type === typeFilter));
4747
});
4848

0 commit comments

Comments
 (0)