Skip to content

Commit e2e8a22

Browse files
committed
refactor: update styling and configuration for Tauri
- Update App.css for Tauri WebView - Add theme.css for CSS custom properties - Update Tailwind config - Update index.html for Tauri
1 parent 687ceda commit e2e8a22

File tree

4 files changed

+29
-32
lines changed

4 files changed

+29
-32
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</head>
3131

3232
<body>
33-
<div id="root" class="bg-gitify-background"></div>
33+
<div id="root"></div>
3434
<script type="module" src="/src/index.tsx"></script>
3535
</body>
3636
</html>

src/App.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
/** GitHub Primer Design System */
55
@import "@primer/css/dist/primer.css";
66

7+
/** Tailwind CSS Configuration */
8+
@config "../tailwind.config.ts";
9+
10+
711
html,
812
body,
913
#root {

src/theme.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/** Gitify Theme Variables */
2+
[data-color-mode="light"] {
3+
--gitify-background: var(--bgColor-default, #ffffff);
4+
--gitify-scrollbar-track: #f1f5f9;
5+
--gitify-scrollbar-thumb: #d1d5db;
6+
--gitify-scrollbar-thumb-hover: #9ca3af;
7+
--gitify-counter-primary: #93c5fd;
8+
--gitify-counter-secondary: #e5e7eb;
9+
--gitify-counter-text: #1f2937;
10+
}
11+
12+
[data-color-mode="dark"] {
13+
--gitify-background: var(--bgColor-muted, #0d1117);
14+
--gitify-scrollbar-track: #111827;
15+
--gitify-scrollbar-thumb: #374151;
16+
--gitify-scrollbar-thumb-hover: #4b5563;
17+
--gitify-counter-primary: #60a5fa;
18+
--gitify-counter-secondary: #4b5563;
19+
--gitify-counter-text: #f3f4f6;
20+
}

tailwind.config.ts

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { Config } from 'tailwindcss';
2-
import colors from 'tailwindcss/colors';
32

43
const sidebarWidth = '2.5rem'; // 40px
54

@@ -19,11 +18,12 @@ const config: Config = {
1918
},
2019
colors: {
2120
gitify: {
21+
background: 'var(--gitify-background)',
2222
font: 'var(--fgColor-default)',
2323
sidebar: '#24292e',
2424
footer: 'var(--bgColor-neutral-muted)',
2525

26-
caution: colors.orange[600],
26+
caution: '#ea580c', // Tailwind orange-600
2727
error: 'var(--fgColor-danger)',
2828
link: 'var(--fgColor-link)',
2929
input: {
@@ -70,35 +70,8 @@ const config: Config = {
7070
},
7171
},
7272
},
73-
plugins: [
74-
({ addBase }) => {
75-
// TODO - ideally we would use GitHub Primer Design Tokens instead of TailwindCSS
76-
addBase({
77-
'[data-color-mode="light"]': {
78-
'--gitify-background': 'var(--bgColor-default)',
79-
80-
'--gitify-scrollbar-track': colors.gray[100],
81-
'--gitify-scrollbar-thumb': colors.gray[300],
82-
'--gitify-scrollbar-thumb-hover': colors.gray[400],
83-
84-
'--gitify-counter-primary': colors.blue[300],
85-
'--gitify-counter-secondary': colors.gray[200],
86-
'--gitify-counter-text': colors.gray[800],
87-
},
88-
'[data-color-mode="dark"]': {
89-
'--gitify-background': 'var(--bgColor-muted)',
90-
91-
'--gitify-scrollbar-track': colors.gray[900],
92-
'--gitify-scrollbar-thumb': colors.gray[700],
93-
'--gitify-scrollbar-thumb-hover': colors.gray[600],
94-
95-
'--gitify-counter-primary': colors.blue[400],
96-
'--gitify-counter-secondary': colors.gray[600],
97-
'--gitify-counter-text': colors.gray[100],
98-
},
99-
});
100-
},
101-
],
73+
// Note: CSS variables for gitify-* are defined in App.css for Tailwind v4 compatibility
74+
plugins: [],
10275
};
10376

10477
export default config;

0 commit comments

Comments
 (0)