New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need a video how to use this :c #18
Comments
Hi, I'm sorry but I won't be able to do that, as I am unable to properly vocally speak english. However I am willing to help you there if you share details on what you tried and what didn't work. |
So, you will need another file. This file will contain the configuration for this plugin, so your themes.
// theme.config.js
const { ThemeBuilder, Theme } = require('tailwindcss-theming');
// theme.config.js
const { ThemeBuilder, Theme } = require('tailwindcss-theming');
const lightTheme = new Theme()
.name('light')
.default()
.assignable()
.colors({
'background':'#313131',
'surface':'#212121',
'on-background':'#ffffff',
'on-surface':'#ffffff',
})
; With this theme, you'll have four color utilities, so you'll be able to use, for instance,
// theme.config.js
const { ThemeBuilder, Theme } = require('tailwindcss-theming');
const lightTheme = new Theme()
// ...
const darkTheme = new Theme()
.name('dark')
.colors({
'background':'#ffffff',
'surface':'#1c1c1c1',
'on-background':'#111111',
'on-surface':'#313131',
})
;
// theme.config.js
const { ThemeBuilder, Theme } = require('tailwindcss-theming');
const lightTheme = new Theme()
// ...
const darkTheme = new Theme()
// ...
module.exports = new ThemeBuilder()
.asDataThemeAttribute()
.default(lightTheme)
.dark(darkTheme);
module.exports = {
theme: {},
variants: {},
plugins: [
require('./theme.config.js')
],
}; And you're done. Use attribute https://github.com/hawezo/tailwindcss-theming/blob/master/docs/setup.md |
hello, thank you for made this. But I can't understand how to config it right? If have time, can you please make a video how to use it? :(
Thank you.
The text was updated successfully, but these errors were encountered: