Skip to content

Commit 3e95d64

Browse files
authored
Merge pull request #174 from modelcontextprotocol/martinalong/mcp-apps/fix-style-variables
[MCP Apps] Add forgotten style variable
2 parents 242ec23 + d797ed1 commit 3e95d64

File tree

5 files changed

+43
-9
lines changed

5 files changed

+43
-9
lines changed

examples/customer-segmentation-server/src/mcp-app.css

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,19 @@
1919
--color-border-primary: light-dark(#e5e7eb, #374151);
2020
--color-border-secondary: light-dark(#d1d5db, #4b5563);
2121

22-
/* Accent colors */
23-
--color-accent-info: light-dark(#2563eb, #3b82f6);
22+
/* Ring colors */
23+
--color-ring-info: light-dark(#2563eb, #3b82f6);
2424

2525
/* Border radius */
2626
--border-radius-sm: 6px;
2727
--border-radius-md: 8px;
28+
--border-radius-full: 9999px;
29+
30+
/* Border width */
31+
--border-width-regular: 1px;
32+
33+
/* Shadows */
34+
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
2835

2936
/* App-specific colors (not from host) */
3037
--color-enterprise: light-dark(#1e40af, #3b82f6);
@@ -98,15 +105,15 @@ html, body {
98105
.select {
99106
padding: 4px 8px;
100107
font-size: 0.8125rem;
101-
border: 1px solid var(--color-border-primary);
108+
border: var(--border-width-regular) solid var(--color-border-primary);
102109
border-radius: var(--border-radius-sm);
103110
background: var(--color-background-secondary);
104111
color: var(--color-text-primary);
105112
cursor: pointer;
106113
}
107114

108115
.select:focus {
109-
outline: 2px solid var(--color-accent-info);
116+
outline: 2px solid var(--color-ring-info);
110117
outline-offset: 1px;
111118
}
112119

@@ -117,7 +124,7 @@ html, body {
117124
background: var(--color-background-secondary);
118125
border-radius: var(--border-radius-md);
119126
padding: 8px;
120-
border: 1px solid var(--color-border-primary);
127+
border: var(--border-width-regular) solid var(--color-border-primary);
121128
}
122129

123130
.chart-container {
@@ -147,15 +154,15 @@ html, body {
147154
font-size: 0.75rem;
148155
cursor: pointer;
149156
padding: 4px 10px;
150-
border-radius: 16px;
151-
border: 1px solid var(--color-border-primary);
157+
border-radius: var(--border-radius-full);
158+
border: var(--border-width-regular) solid var(--color-border-primary);
152159
background: var(--color-background-secondary);
153160
transition: all 0.15s ease;
154161
}
155162

156163
.legend-item:hover {
157164
border-color: var(--color-text-secondary);
158-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
165+
box-shadow: var(--shadow-sm);
159166
}
160167

161168
.legend-item.hidden {
@@ -196,7 +203,7 @@ html, body {
196203
background: var(--color-background-secondary);
197204
border-radius: var(--border-radius-sm);
198205
padding: 0 12px;
199-
border: 1px solid var(--color-border-primary);
206+
border: var(--border-width-regular) solid var(--color-border-primary);
200207
font-size: 0.8125rem;
201208
}
202209

specification/draft/apps.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,7 @@ type McpUiStyleVariableKey =
552552
| "--color-text-success"
553553
| "--color-text-warning"
554554
| "--color-text-disabled"
555+
| "--color-text-ghost"
555556
// Border colors
556557
| "--color-border-primary"
557558
| "--color-border-secondary"

src/generated/schema.json

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/generated/schema.ts

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/spec.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export type McpUiStyleVariableKey =
6161
| "--color-text-success"
6262
| "--color-text-warning"
6363
| "--color-text-disabled"
64+
| "--color-text-ghost"
6465
// Border colors
6566
| "--color-border-primary"
6667
| "--color-border-secondary"

0 commit comments

Comments
 (0)