Skip to content

Commit 2740db8

Browse files
committed
feat: use yasgui variable colors when available
1 parent d4363e9 commit 2740db8

2 files changed

Lines changed: 46 additions & 44 deletions

File tree

styles/theme-dark.css

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
11
/**
22
* Dark Theme Variables
3+
* Uses YASGUI CSS custom properties with fallback colors
34
*/
45

56
.yasgui-table-plugin[data-theme='dark'] {
67
/* Background colors */
7-
--table-background: #1e1e1e;
8-
--table-header-background: #2a2a2a;
9-
--table-row-hover: #2a2a2a;
10-
--table-row-selected: #1a3a52;
11-
--table-rownumber-background: #252525;
8+
--table-background: var(--yasgui-bg-primary, #1e1e1e);
9+
--table-header-background: var(--yasgui-bg-secondary, #2a2a2a);
10+
--table-row-hover: var(--yasgui-bg-secondary, #2a2a2a);
11+
--table-row-selected: var(--yasgui-bg-tertiary, #1a3a52);
12+
--table-rownumber-background: var(--yasgui-bg-secondary, #252525);
1213

1314
/* Text colors */
14-
--table-text: #e0e0e0;
15-
--table-header-text: #ffffff;
16-
--table-text-muted: #808080;
17-
--table-rownumber-text: #b0b0b0;
15+
--table-text: var(--yasgui-text-primary, #e0e0e0);
16+
--table-header-text: var(--yasgui-text-primary, #ffffff);
17+
--table-text-muted: var(--yasgui-text-secondary, #808080);
18+
--table-rownumber-text: var(--yasgui-text-secondary, #b0b0b0);
1819

1920
/* Border colors */
20-
--table-border: #404040;
21-
--table-border-light: #333333;
21+
--table-border: var(--yasgui-border-color, #404040);
22+
--table-border-light: var(--yasgui-input-border, #333333);
2223

2324
/* Interactive colors */
24-
--table-primary: #42a5f5;
25-
--table-link: #64b5f6;
26-
--table-link-hover: #90caf9;
25+
--table-primary: var(--yasgui-accent-color, #42a5f5);
26+
--table-link: var(--yasgui-accent-color, #64b5f6);
27+
--table-link-hover: var(--yasgui-link-hover, #90caf9);
2728

2829
/* URI and literal styling */
29-
--table-uri-color: #64b5f6;
30-
--table-literal-color: #e0e0e0;
31-
--table-datatype-color: #b0b0b0;
32-
--table-bnode-color: #808080;
30+
--table-uri-color: var(--yasgui-accent-color, #64b5f6);
31+
--table-literal-color: var(--yasgui-text-primary, #e0e0e0);
32+
--table-datatype-color: var(--yasgui-text-secondary, #b0b0b0);
33+
--table-bnode-color: var(--yasgui-text-secondary, #808080);
3334

3435
/* Search highlight */
3536
--table-search-highlight: #ffeb3b;
3637
--table-search-highlight-text: #000000;
3738

3839
/* Controls */
39-
--table-control-background: #2a2a2a;
40-
--table-control-border: #404040;
41-
--table-control-hover: #363636;
42-
--table-text-secondary: #aaaaaa;
40+
--table-control-background: var(--yasgui-bg-secondary, #2a2a2a);
41+
--table-control-border: var(--yasgui-border-color, #404040);
42+
--table-control-hover: var(--yasgui-button-hover, #363636);
43+
--table-text-secondary: var(--yasgui-text-secondary, #aaaaaa);
4344
}

styles/theme-light.css

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,45 @@
11
/**
22
* Light Theme Variables
3+
* Uses YASGUI CSS custom properties with fallback colors
34
*/
45

56
:root,
67
.yasgui-table-plugin[data-theme='light'] {
78
/* Background colors */
8-
--table-background: #ffffff;
9-
--table-header-background: #f5f5f5;
10-
--table-row-hover: #f9f9f9;
11-
--table-row-selected: #e3f2fd;
12-
--table-rownumber-background: #fafafa;
9+
--table-background: var(--yasgui-bg-primary, #ffffff);
10+
--table-header-background: var(--yasgui-bg-secondary, #f5f5f5);
11+
--table-row-hover: var(--yasgui-bg-secondary, #f9f9f9);
12+
--table-row-selected: var(--yasgui-bg-tertiary, #e3f2fd);
13+
--table-rownumber-background: var(--yasgui-bg-secondary, #fafafa);
1314

1415
/* Text colors */
15-
--table-text: #000000;
16-
--table-header-text: #333333;
17-
--table-text-muted: #999999;
18-
--table-rownumber-text: #666666;
16+
--table-text: var(--yasgui-text-primary, #000000);
17+
--table-header-text: var(--yasgui-text-primary, #333333);
18+
--table-text-muted: var(--yasgui-text-secondary, #999999);
19+
--table-rownumber-text: var(--yasgui-text-secondary, #666666);
1920

2021
/* Border colors */
21-
--table-border: #dddddd;
22-
--table-border-light: #eeeeee;
22+
--table-border: var(--yasgui-border-color, #dddddd);
23+
--table-border-light: var(--yasgui-input-border, #eeeeee);
2324

2425
/* Interactive colors */
25-
--table-primary: #1976d2;
26-
--table-link: #1976d2;
27-
--table-link-hover: #1565c0;
26+
--table-primary: var(--yasgui-accent-color, #1976d2);
27+
--table-link: var(--yasgui-accent-color, #1976d2);
28+
--table-link-hover: var(--yasgui-link-hover, #1565c0);
2829

2930
/* URI and literal styling */
30-
--table-uri-color: #0066cc;
31-
--table-literal-color: #000000;
32-
--table-datatype-color: #666666;
33-
--table-bnode-color: #999999;
31+
--table-uri-color: var(--yasgui-accent-color, #0066cc);
32+
--table-literal-color: var(--yasgui-text-primary, #000000);
33+
--table-datatype-color: var(--yasgui-text-secondary, #666666);
34+
--table-bnode-color: var(--yasgui-text-secondary, #999999);
3435

3536
/* Search highlight */
3637
--table-search-highlight: #ffeb3b;
3738
--table-search-highlight-text: #000000;
3839

3940
/* Controls */
40-
--table-control-background: #f5f5f5;
41-
--table-control-border: #dddddd;
42-
--table-control-hover: #e8e8e8;
43-
--table-text-secondary: #666666;
41+
--table-control-background: var(--yasgui-bg-secondary, #f5f5f5);
42+
--table-control-border: var(--yasgui-border-color, #dddddd);
43+
--table-control-hover: var(--yasgui-button-hover, #e8e8e8);
44+
--table-text-secondary: var(--yasgui-text-secondary, #666666);
4445
}

0 commit comments

Comments
 (0)