Define a mapping of system color scheme to widget color scheme in css-like syntax.
This is an opt-in feature since version >=2.3.0. It means if data-color-scheme is undefined, it would still behave like version <2.3.0, where light color scheme is used under all conditions.
Once data-color-scheme is set to a string, it will inherit the default mapping: no-preference: light; light: light; dark: dark;.
no-preference: light; means when system has no preference on color scheme, light color scheme will be used.
light: light; means when system prefers light color scheme, light color scheme will be used.
dark: dark; means when system prefers dark color scheme, dark color scheme will be used.
User declarations would override the default. For example:
To enable color scheme using default, set data-color-scheme="".
To use dark color scheme when system has no preference, set data-color-scheme="no-preference: dark;".
To force light color scheme everywhere, set data-color-scheme="dark: light;".
To force dark color scheme everywhere, set data-color-scheme="no-preference: dark; light: dark;".
A single word can be used to force the color scheme everywhere since version >=2.11.0. For example:
To force light color scheme everywhere, set data-color-scheme="light".
To force dark color scheme everywhere, set data-color-scheme="dark".
data-size
Type: string
Default: undefined
Set button size. Possible values are undefined and 'large'.
data-show-count
Type: boolean
Default: false
Show a dynamic count based on button type (detected from href):
请发表评论