@@ -21,20 +21,111 @@ export function themeConsoleStyle(themeId, config, options = {}) {
2121 #${ rootId } {
2222 ${ vars }
2323 --${ themeId } -console-primary: var(${ getThemeColorCssVar ( themeId , 'PRIMARY' ) } );
24+ --${ themeId } -console-primary-hover: var(${ getThemeColorCssVar ( themeId , 'PRIMARY_HOVER' ) } , var(--${ themeId } -console-primary));
2425 --${ themeId } -console-bg: var(${ getThemeColorCssVar ( themeId , 'BG' ) } );
2526 --${ themeId } -console-card: var(${ getThemeColorCssVar ( themeId , 'CARD' ) } );
2627 --${ themeId } -console-text: var(${ getThemeColorCssVar ( themeId , 'TEXT' ) } );
2728 --${ themeId } -console-text-secondary: var(${ getThemeColorCssVar ( themeId , 'TEXT_SECONDARY' ) } );
2829 --${ themeId } -console-border: var(${ getThemeColorCssVar ( themeId , 'BORDER' ) } );
30+ --${ themeId } -console-dark: var(${ getThemeColorCssVar ( themeId , 'BG_DARK' ) } );
2931 }
3032
3133 .dark #${ rootId } {
3234 --${ themeId } -console-primary: var(${ getThemeColorCssVar ( themeId , 'PRIMARY_DARK' ) } );
35+ --${ themeId } -console-primary-hover: var(${ getThemeColorCssVar ( themeId , 'PRIMARY_HOVER_DARK' ) } , var(--${ themeId } -console-primary));
3336 --${ themeId } -console-bg: var(${ getThemeColorCssVar ( themeId , 'BG_DARK' ) } );
3437 --${ themeId } -console-card: var(${ getThemeColorCssVar ( themeId , 'CARD_DARK' ) } );
3538 --${ themeId } -console-text: var(${ getThemeColorCssVar ( themeId , 'TEXT_DARK' ) } );
3639 --${ themeId } -console-text-secondary: var(${ getThemeColorCssVar ( themeId , 'TEXT_SECONDARY_DARK' ) } );
3740 --${ themeId } -console-border: var(${ getThemeColorCssVar ( themeId , 'BORDER_DARK' ) } );
41+ --${ themeId } -console-dark: var(${ getThemeColorCssVar ( themeId , 'BG_DARK' ) } );
42+ }
43+
44+ #${ rootId } {
45+ background-color: var(--${ themeId } -console-bg);
46+ color: var(--${ themeId } -console-text);
47+ }
48+
49+ #${ rootId } [class~="bg-primary"],
50+ #${ rootId } [class~="bg-blue-500"],
51+ #${ rootId } [class~="bg-blue-600"],
52+ #${ rootId } [class~="bg-indigo-500"],
53+ #${ rootId } [class~="bg-indigo-600"],
54+ #${ rootId } [class~="bg-red-500"],
55+ #${ rootId } [class~="bg-red-600"],
56+ #${ rootId } [class~="bg-green-500"],
57+ #${ rootId } [class~="bg-green-600"] {
58+ background-color: var(--${ themeId } -console-primary) !important;
59+ }
60+
61+ #${ rootId } [class~="hover:bg-primary"]:hover,
62+ #${ rootId } [class~="hover:bg-blue-dark"]:hover,
63+ #${ rootId } [class*="hover:bg-blue-"]:hover,
64+ #${ rootId } [class*="hover:bg-indigo-"]:hover,
65+ #${ rootId } [class*="hover:bg-red-"]:hover,
66+ #${ rootId } [class*="hover:bg-green-"]:hover {
67+ background-color: var(--${ themeId } -console-primary-hover) !important;
68+ }
69+
70+ #${ rootId } [class~="text-primary"],
71+ #${ rootId } [class~="text-blue-500"],
72+ #${ rootId } [class~="text-blue-600"],
73+ #${ rootId } [class~="text-indigo-500"],
74+ #${ rootId } [class~="text-indigo-600"],
75+ #${ rootId } [class~="text-red-500"],
76+ #${ rootId } [class~="text-red-600"],
77+ #${ rootId } [class~="text-green-500"],
78+ #${ rootId } [class~="text-green-600"],
79+ #${ rootId } [class~="hover:text-primary"]:hover,
80+ #${ rootId } [class*="hover:text-blue-"]:hover,
81+ #${ rootId } [class*="hover:text-indigo-"]:hover,
82+ #${ rootId } [class*="hover:text-red-"]:hover,
83+ #${ rootId } [class*="hover:text-green-"]:hover,
84+ #${ rootId } .group:hover [class~="group-hover:text-primary"] {
85+ color: var(--${ themeId } -console-primary) !important;
86+ }
87+
88+ #${ rootId } [class~="text-body-color"],
89+ #${ rootId } [class~="text-body-secondary"],
90+ #${ rootId } [class~="text-gray-500"],
91+ #${ rootId } [class~="text-gray-600"],
92+ #${ rootId } [class~="text-gray-400"] {
93+ color: var(--${ themeId } -console-text-secondary) !important;
94+ }
95+
96+ #${ rootId } [class~="bg-white"],
97+ #${ rootId } [class~="bg-gray-50"],
98+ #${ rootId } [class~="bg-gray-1"],
99+ #${ rootId } [class~="dark:bg-dark-2"]:is(.dark *) {
100+ background-color: var(--${ themeId } -console-card) !important;
101+ }
102+
103+ #${ rootId } [class~="bg-dark"],
104+ #${ rootId } [class~="dark:bg-dark"]:is(.dark *) {
105+ background-color: var(--${ themeId } -console-dark) !important;
106+ }
107+
108+ #${ rootId } [class~="border-primary"],
109+ #${ rootId } [class*="border-blue-"],
110+ #${ rootId } [class*="border-indigo-"],
111+ #${ rootId } [class*="border-red-"],
112+ #${ rootId } [class*="border-green-"],
113+ #${ rootId } [class~="focus:border-primary"]:focus {
114+ border-color: var(--${ themeId } -console-primary) !important;
115+ }
116+
117+ #${ rootId } [class~="border"],
118+ #${ rootId } [class*="border-gray-"] {
119+ border-color: var(--${ themeId } -console-border);
120+ }
121+
122+ #${ rootId } input:focus,
123+ #${ rootId } textarea:focus,
124+ #${ rootId } select:focus,
125+ #${ rootId } [class~="ring-primary"],
126+ #${ rootId } [class~="focus:ring-primary"]:focus {
127+ --tw-ring-color: var(--${ themeId } -console-primary) !important;
128+ border-color: var(--${ themeId } -console-primary) !important;
38129 }
39130 `
40131}
0 commit comments