Skip to content

Commit 3b776c5

Browse files
committed
fix sys
1 parent 80db6e0 commit 3b776c5

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

ai/docbot/citation.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ class CitationComponent extends LitElement {
99
a {
1010
display: block;
1111
text-decoration: none;
12-
color: var(--mat-sys-on-surface);
12+
color: var(--sys-on-surface);
1313
}
1414
1515
.container {
16-
background: var(--mat-sys-surface-container-high);
16+
background: var(--sys-surface-container-high);
1717
border-radius: 12px;
1818
}
1919
2020
.container:hover {
21-
background: var(--mat-sys-surface-container-highest);
21+
background: var(--sys-surface-container-highest);
2222
}
2323
`;
2424

mesop/features/theme.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ def theme_var(var: ThemeVar, /) -> str:
105105
Args:
106106
var: The theme variable name. See the [Material Design docs](https://m3.material.io/styles/color/static/baseline#690f18cd-d40f-4158-a358-4cfdb3a32768) for more information about the colors available.
107107
"""
108-
return f"var(--mat-sys-{var})"
108+
return f"var(--sys-{var})"

mesop/web/src/app/styles.scss

+13-6
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ $_tertiary: map.merge(map.get($_palettes, tertiary), $_rest);
139139

140140
$primary: $_primary;
141141
$tertiary: $_tertiary;
142+
// Use "sys" instead of "mat-sys" because
143+
// "sys" used to be the default and is still used
144+
// in downstream angular.
145+
// https://github.com/angular/components/pull/29908
146+
$system_variables_prefix: sys;
142147

143148
@function create-theme($density: 0) {
144149
@return mat.define-theme(
@@ -148,6 +153,7 @@ $tertiary: $_tertiary;
148153
primary: $_primary,
149154
tertiary: $_tertiary,
150155
use-system-variables: true,
156+
system-variables-prefix: $system_variables_prefix,
151157
),
152158
density: (
153159
scale: $density,
@@ -164,6 +170,7 @@ $dark-theme: mat.define-theme(
164170
primary: $_primary,
165171
tertiary: $_tertiary,
166172
use-system-variables: true,
173+
system-variables-prefix: $system_variables_prefix,
167174
),
168175
)
169176
);
@@ -327,7 +334,7 @@ mesop-markdown {
327334
}
328335

329336
a {
330-
color: var(--mat-sys-primary);
337+
color: var(--sys-primary);
331338
}
332339

333340
p {
@@ -339,7 +346,7 @@ mesop-markdown {
339346
}
340347

341348
a:visited {
342-
color: var(--mat-sys-secondary);
349+
color: var(--sys-secondary);
343350
}
344351

345352
// Make it so wide code examples do not overflow. Instead show a horizontal scrollbar.
@@ -350,7 +357,7 @@ mesop-markdown {
350357

351358
.code-block {
352359
border-radius: 8px;
353-
background: var(--mat-sys-surface-container-low);
360+
background: var(--sys-surface-container-low);
354361
overflow: hidden;
355362
min-height: 57px; // The copy button gets cut off if there's only one line of text.
356363
padding: 10px;
@@ -365,7 +372,7 @@ mesop-markdown {
365372
border: none;
366373
border-radius: 50%;
367374
display: inline-block;
368-
color: var(--mat-sys-on-surface);
375+
color: var(--sys-on-surface);
369376
height: 40px;
370377
position: absolute;
371378
text-align: center;
@@ -378,7 +385,7 @@ mesop-markdown {
378385
}
379386

380387
.code-block:hover a.code-copy:hover {
381-
background: var(--mat-sys-surface-container-highest);
388+
background: var(--sys-surface-container-highest);
382389
cursor: pointer;
383390
}
384391

@@ -391,7 +398,7 @@ mesop-markdown {
391398
table,
392399
th,
393400
td {
394-
border: 1px var(--mat-sys-on-surface) solid;
401+
border: 1px var(--sys-on-surface) solid;
395402
border-collapse: collapse;
396403
padding: 10px;
397404
}

mesop/web/src/services/error_dialog_service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class DebugErrorDialogService implements ErrorDialogService {
4545
styles: `
4646
:host {
4747
display: block;
48-
background: var(--mat-sys-error-container);
48+
background: var(--sys-error-container);
4949
--mdc-dialog-supporting-text-size: 16px;
5050
--mdc-dialog-supporting-text-line-height: 1.5;
5151
}

0 commit comments

Comments
 (0)