forked from atymic/laravel-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.js
64 lines (56 loc) · 1.68 KB
/
theme.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
|--------------------------------------------------------------------------
| This is your theming configuration.
|--------------------------------------------------------------------------
|
| Create themes with interchangeable colors, and swap them at run-time
| depending on user preferences.
|
| https://github.com/innocenzi/tailwindcss-theming
|
*/
const { ThemeManager, Theme } = require('tailwindcss-theming/api');
// Creates a light theme.
const light = new Theme().setName('light').targetable().addColors({
// Brand colors
brand: '#2196f3',
'on-brand': '#f9fafb',
// Background colors, but not limited to `bg` utilities.
background: '#e5e7eb',
surface: '#f4f5f7',
'on-background': '#161e2e',
'on-surface': '#161e2e',
// Event colors.
error: '#f05252',
'on-error': '#f9fafb',
success: '#3ab577',
'on-success': '#f9fafb',
warning: '#ff5a1f',
'on-warning': '#f9fafb',
info: '#3f83f8',
'on-info': '#f9fafb',
});
// Creates a dark theme.
const dark = new Theme().setName('dark').targetable().addColors({
// Brand colors
brand: '#2196f3',
'on-brand': '#f9fafb',
// Background colors, but not limited to `bg` utilities.
background: '#161e2e',
surface: '#161e2e',
'on-background': '#f9fafb',
'on-surface': '#f9fafb',
// Event colors.
error: '#f05252',
'on-error': '#f9fafb',
success: '#3ab577',
'on-success': '#f9fafb',
warning: '#ff5a1f',
'on-warning': '#f9fafb',
info: '#3f83f8',
'on-info': '#f9fafb',
});
// Exports the configuration, with the light theme
// set as the default and the dark one set for the
// `dark` option of `prefers-color-scheme`.
module.exports = new ThemeManager().setDefaultTheme(light).setDefaultDarkTheme(dark);