Skip to content

Commit 6549e8d

Browse files
jonasnobileclaude
andcommitted
style: add macOS platform-aware styling and refine border radius tokens
Add [data-platform="mac"] overrides for softer edges, differentiated sidebar surface, and refined shadows. Replace hardcoded border-radius values with CSS variables. Adjust SettingsDialog dimensions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0fefcfa commit 6549e8d

File tree

9 files changed

+68
-9
lines changed

9 files changed

+68
-9
lines changed

src/frontend-shared/components/common/CommandPalette.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
.command-palette {
1313
background: var(--surface-overlay);
1414
border: 1px solid var(--edge-strong);
15-
border-radius: 6px;
15+
border-radius: var(--radius-lg);
1616
box-shadow: var(--shadow-overlay);
1717
width: 480px;
1818
max-height: 400px;
@@ -21,6 +21,12 @@
2121
overflow: hidden;
2222
}
2323

24+
[data-platform="mac"] .command-palette {
25+
background: var(--surface-overlay);
26+
border: 1px solid var(--edge-strong);
27+
box-shadow: var(--shadow-overlay);
28+
}
29+
2430
.command-palette__input-wrap {
2531
padding: var(--spacing-sm) var(--spacing-md);
2632
border-bottom: 1px solid var(--edge);

src/frontend-shared/components/common/ContextMenu.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@
55
z-index: 2000;
66
background: var(--surface-overlay);
77
border: 1px solid var(--edge-strong);
8-
border-radius: 6px;
8+
border-radius: var(--radius-lg);
99
box-shadow: var(--shadow-popup);
1010
min-width: 200px;
1111
padding: var(--spacing-xs) 0;
1212
}
1313

14+
[data-platform="mac"] .context-menu {
15+
background: var(--surface-overlay);
16+
border: 1px solid var(--edge-strong);
17+
box-shadow: var(--shadow-popup);
18+
}
19+
1420
.context-menu__icon {
1521
display: flex;
1622
align-items: center;

src/frontend-shared/components/common/Dialog.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
animation: dialog-scale-in 0.2s ease-out;
2424
}
2525

26+
[data-platform="mac"] .dialog {
27+
background: var(--surface-overlay);
28+
border: 1px solid var(--edge-strong);
29+
box-shadow: var(--shadow-overlay);
30+
}
31+
2632
.dialog__header {
2733
display: flex;
2834
align-items: center;

src/frontend-shared/components/common/SettingsDialog.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.settings-dialog {
2-
min-width: 600px;
3-
max-width: 700px;
2+
width: 640px;
43
}
54

65
.settings-dialog .dialog__body {
@@ -9,7 +8,7 @@
98

109
.settings-layout {
1110
display: flex;
12-
min-height: 400px;
11+
height: 400px;
1312
}
1413

1514
.settings-nav {

src/frontend-shared/components/common/Toast.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
align-items: flex-start;
1616
gap: var(--spacing-sm);
1717
padding: var(--spacing-sm) var(--spacing-md);
18-
border-radius: 4px;
18+
border-radius: var(--radius-md);
1919
border: 1px solid var(--edge);
2020
background: var(--surface-overlay);
2121
box-shadow: var(--shadow-popup);

src/frontend-shared/components/layout/AppShell.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
overflow: hidden;
66
}
77

8+
[data-platform="mac"] .app-shell {
9+
background: var(--surface);
10+
}
11+
812
.app-shell__body {
913
flex: 1;
1014
display: flex;

src/frontend-shared/components/layout/Sidebar.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
transition: width var(--transition-slow);
99
}
1010

11+
[data-platform="mac"] .sidebar {
12+
background: var(--surface-sidebar, var(--surface));
13+
border-right: 1px solid var(--edge);
14+
}
15+
1116
.sidebar--collapsed {
1217
border-right: none;
1318
}
@@ -120,6 +125,12 @@
120125
z-index: 10;
121126
}
122127

128+
[data-platform="mac"] .sidebar-expand-btn {
129+
background: var(--surface-raised);
130+
border: 1px solid var(--edge);
131+
box-shadow: var(--shadow-float);
132+
}
133+
123134
.sidebar-expand-btn:hover {
124135
background: var(--surface-hover);
125136
color: var(--ink);

src/frontend-shared/components/layout/TabBar.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
overflow: hidden;
66
}
77

8+
[data-platform="mac"] .tab-bar {
9+
background: var(--surface-sidebar, var(--surface-raised));
10+
border-bottom: 1px solid var(--edge);
11+
}
12+
813
.tab-bar__tabs {
914
display: flex;
1015
overflow-x: auto;

src/frontend-shared/styles/global.css

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
--spacing-xl: 24px;
5757

5858
/* ── Border radius ──────────────────────────────────── */
59-
--radius-sm: 3px;
60-
--radius-md: 6px;
61-
--radius-lg: 6px;
59+
--radius-sm: 4px;
60+
--radius-md: 8px;
61+
--radius-lg: 10px;
6262

6363
/* ── Layout ─────────────────────────────────────────── */
6464
--sidebar-width: 250px;
@@ -506,3 +506,25 @@ textarea:focus {
506506
box-shadow: 4px 0 16px rgba(0, 0, 0, 0.5);
507507
}
508508
}
509+
510+
/* ── macOS refinements ─────────────────────────────────────
511+
Subtle adjustments for a native macOS feel: softer edges,
512+
slightly differentiated sidebar surface, refined shadows.
513+
─────────────────────────────────────────────────────────── */
514+
515+
[data-platform="mac"] {
516+
--surface-sidebar: #1e2025;
517+
--edge: rgba(255, 255, 255, 0.06);
518+
--edge-strong: rgba(255, 255, 255, 0.10);
519+
--shadow-overlay: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
520+
--shadow-popup: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
521+
--shadow-float: 0 4px 12px rgba(0, 0, 0, 0.35);
522+
--radius-lg: 12px;
523+
}
524+
525+
[data-platform="mac"][data-theme="light"] {
526+
--surface-sidebar: #ebebeb;
527+
--shadow-overlay: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06);
528+
--shadow-popup: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
529+
--shadow-float: 0 4px 12px rgba(0, 0, 0, 0.08);
530+
}

0 commit comments

Comments
 (0)