Skip to content

Commit d115b00

Browse files
authored
fix: restore Office-style teal ribbon UI (#72)
The Vue->React migration replaced the app's signature teal ribbon with a generic gray theme. Restore the original look: teal tab bar with white active tab, gradient ribbon panel, bottom-labeled control boxes with shadows, gradient buttons, and the #ececec status bar. Move the control-group label below its content to match the original layout.
1 parent 6022512 commit d115b00

2 files changed

Lines changed: 47 additions & 22 deletions

File tree

src/app/styles.css

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,65 @@
99
}
1010

1111
.ows-ribbon {
12-
@apply flex flex-col border-b border-gray-200 bg-white shadow-sm;
12+
@apply flex flex-col border-b border-gray-300 bg-white;
1313
}
1414

1515
.ows-tabs {
16-
@apply w-full bg-white;
16+
@apply w-full;
1717
}
1818

1919
.ows-tabs-list {
20-
@apply inline-flex min-h-10 items-center justify-start rounded-lg bg-gray-100 p-1 text-gray-500;
21-
@apply mx-3 mt-3 max-w-[calc(100%-1.5rem)] overflow-x-auto;
20+
@apply flex min-h-0 items-end justify-start gap-1.5 overflow-x-auto bg-brand px-5 pt-1.5;
2221
}
2322

2423
.ows-tabs-trigger {
25-
@apply inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5;
26-
@apply text-sm font-medium ring-offset-white transition-colors;
27-
@apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2;
28-
@apply disabled:pointer-events-none disabled:opacity-50;
24+
@apply inline-flex items-center justify-center whitespace-nowrap rounded-t px-3.5 py-1.5;
25+
@apply text-sm font-bold text-white/90 transition-colors;
26+
@apply hover:text-white focus-visible:outline-none;
2927
}
3028

3129
.ows-tabs-trigger[data-state='active'] {
32-
@apply bg-white text-gray-950 shadow-sm;
30+
@apply bg-white text-brand;
3331
}
3432

3533
.ows-tabs-content {
36-
@apply mt-3 ring-offset-white;
34+
@apply ring-offset-white;
3735
}
3836

3937
.ows-tabs-content:focus-visible {
40-
@apply outline-none ring-2 ring-brand ring-offset-2;
38+
@apply outline-none;
4139
}
4240

4341
.ows-ribbon-panel {
44-
@apply flex items-stretch gap-3 min-h-28 p-3 pt-0 overflow-x-auto bg-white;
42+
@apply flex items-stretch gap-2 min-h-28 p-2.5 overflow-x-auto;
43+
background: linear-gradient(to top, #ece9e6, #ffffff);
4544
scrollbar-width: thin;
4645
}
4746

4847
.ows-control-group {
49-
@apply flex flex-col min-w-control rounded-lg border border-gray-200 bg-white shadow-sm;
48+
@apply flex flex-col min-w-control overflow-hidden bg-white;
49+
border-top: 1px solid #ccc;
50+
border-left: 1px dotted #ccc;
51+
border-radius: 3px;
52+
box-shadow: 2px 2px 1px #cfcfcf;
5053
}
5154

5255
.ows-control-group-wide {
5356
@apply flex-1;
5457
}
5558

5659
.ows-control-content {
57-
@apply flex flex-1 items-center justify-center px-3 pb-3;
60+
@apply flex flex-1 flex-col items-center justify-center gap-2 px-3 py-2;
5861
}
5962

6063
.ows-control-label {
61-
@apply px-3 py-2 text-xs font-medium text-gray-500;
64+
@apply text-center uppercase tracking-wide;
65+
font-size: 10px;
66+
line-height: 20px;
67+
font-weight: bold;
68+
color: #aaa;
69+
text-shadow: 1px 1px 0 #fff;
70+
background: linear-gradient(to top, #ece9e6, #ffffff);
6271
}
6372

6473
.ows-button-row {
@@ -74,13 +83,26 @@
7483
}
7584

7685
.ows-button {
77-
@apply inline-flex items-center justify-center gap-1 min-w-button h-8 px-2.5;
78-
@apply text-xs font-medium border border-gray-200 rounded-md bg-white text-gray-700 shadow-sm;
79-
@apply hover:bg-gray-50 hover:text-gray-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand;
86+
@apply inline-flex items-center justify-center gap-1 min-w-button h-7 px-2.5;
87+
@apply text-xs font-medium rounded-sm text-gray-700;
88+
border: 1px solid #ccc;
89+
background: linear-gradient(to top, #ece9e6, #ffffff);
90+
@apply focus-visible:outline-none;
91+
}
92+
93+
.ows-button:hover {
94+
@apply text-gray-900;
95+
background: linear-gradient(to top, #dddddd, #ffffff);
8096
}
8197

8298
.ows-button-active {
83-
@apply border-gray-900 bg-gray-900 text-white hover:bg-gray-800 hover:text-white;
99+
@apply text-gray-900;
100+
border-color: #aaa;
101+
background: linear-gradient(to top, #cccccc, #efefef);
102+
}
103+
104+
.ows-button-active:hover {
105+
background: linear-gradient(to top, #bcbcbc, #e6e6e6);
84106
}
85107

86108
.ows-field {
@@ -129,7 +151,10 @@
129151
}
130152

131153
.ows-status-bar {
132-
@apply h-6 px-3 leading-6 text-xs border-t border-gray-300 bg-gray-50 text-gray-500;
154+
@apply px-3 text-xs border-t border-gray-300 text-gray-500;
155+
height: 28px;
156+
line-height: 28px;
157+
background: #ececec;
133158
}
134159

135160
.ows-muted {
@@ -234,7 +259,7 @@
234259
}
235260

236261
.ows-tabs-list {
237-
@apply mx-2 mt-2 w-[calc(100%-1rem)];
262+
@apply gap-1 px-2 w-full;
238263
}
239264

240265
.ows-tabs-trigger {

src/shared/ui/ControlGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function ControlGroup(props: ControlGroupProps) {
1010
return React.createElement(
1111
'section',
1212
{className: props.wide ? 'ows-control-group ows-control-group-wide' : 'ows-control-group'},
13-
React.createElement('div', {className: 'ows-control-label'}, props.label),
1413
React.createElement('div', {className: 'ows-control-content'}, props.children),
14+
React.createElement('div', {className: 'ows-control-label'}, props.label),
1515
);
1616
}

0 commit comments

Comments
 (0)