Replies: 1 comment
-
We have this configration key. unocss/packages/core/src/types.ts Lines 415 to 420 in 7f3f1d8 You can use this extends your theme or override it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can the
theme
property be provided in a function form to achieve configuration inheritance?Why
When a preset has a large number of themes that need to be configured, some of these configurations are mutually inherited by default. In such cases, users need to write a lot of repetitive configurations.
For example, in the following example, there is a preset with a
colors
configuration, andaccentColor
,borderColor
, andfill
all inherit from thecolors
configuration.When a user uses this preset and needs to customize the configuration, they need to write each color-related configuration (
accentColor
,borderColor
,fill
) separately.For example:
Features
In theory, a preset should be able to achieve the following: developers only need to configure
colors
to achieve synchronized changes inaccentColor
,borderColor
, andfill
. It should also be possible to override these configurations.For example:
Beta Was this translation helpful? Give feedback.
All reactions