Comments (4)
I think it's okay now, upgrade to the latest version.
from unocss-preset-theme.
Version 0.9.3 still has this problem,my unocss version is 0.56.0 @Dunqing
from unocss-preset-theme.
Version 0.9.3 still has this problem,my unocss version is 0.56.0 @Dunqing
Thank you for the feedback.
This is a problem caused by the inconsistency between your unocss
version and the unocss
version of unocss-preset-theme
. Normally it will only cause a type error, so you can ignore it and wait until this preset is synchronized with the latest version of unocss
to fix it.
Now you can update to 0.10.0 and the problem will be gone!
from unocss-preset-theme.
@Dunqing Hello, this issue has resurfaced in version 0.11.0, and my unocss version is 0.57.3.
Can the following types of changes be made?
interface PresetThemeOptions<Theme extends Record<string, any>> {
theme: Record<string, Theme>
}
// changed to blow
interface Colors {
[key: string]: Colors & {
DEFAULT?: string;
} | string;
}
interface PresetThemeOptions<Theme extends Record<string, any>> {
theme: Record<string, { colors: Colors }>
// or Record<string, Colors>
}
Colors type from https://github.com/unocss/unocss/blob/af91b66e141794489e49bffd521d989dd8b76888/packages/preset-mini/src/_theme/types.ts#L11-L13
Remove all other configuration options and keep only colors
. Users can use dark:xxx
in their business code for condition checking. This plugin should only handle color-related logic.
from unocss-preset-theme.
Related Issues (20)
- Dependency Dashboard
- Please if possible add a check for UnoCSS version when installing unocss-preset-theme HOT 1
- Wrong Generated Variables HOT 11
- Support [email protected] HOT 2
- Typescript Issues HOT 1
- Apply theme based on media query HOT 5
- Not working, theme values directly applied HOT 3
- v0.9.0 generates wrong CSS HOT 4
- v0.9.1 generates wrong css? HOT 6
- Dark color variables used but not defined HOT 1
- Incorrect CSS color generated in the latest unocss HOT 1
- 【Feature】Skip the load on demand detection and generate all variables HOT 1
- media query in config `safelist` got wrong output `:root` css
- unocss vscode extenstion HOT 1
- Can not use color variables
- Don't apply bg-opacity to custom colors
- Using Custom Variable with unocss theme colors HOT 3
- Color token's opacity value in the light theme gets overwritten by the opacity value of the dark theme HOT 3
- [Bug Report] Can't set dark to default theme
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unocss-preset-theme.