mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 23:48:45 +08:00
882b0aac19
Themes can now declare custom colors that get compiled in core's color definitions stylesheet, thus allowing themes to better support dark/light color schemes. For example, if you need your theme to use tertiary for an element in a light color scheme and quaternary in a dark scheme, you can add the following SCSS to your theme's `color_definitions.scss` file: ``` :root { --mytheme-tertiary-or-quaternary: #{dark-light-choose($tertiary, $quaternary)}; } ``` And then use the `--mytheme-tertiary-or-quaternary` variable as the color property of that element. You can also use this file to add color variables that use SCSS color transformation functions (lighten, darken, saturate, etc.) without compromising your theme's compatibility with different color schemes. |
||
---|---|---|
.. | ||
admin-dashboard.js | ||
admin-user.js | ||
api-key.js | ||
backup-status.js | ||
backup.js | ||
color-scheme-color.js | ||
color-scheme.js | ||
email-log.js | ||
email-preview.js | ||
email-settings.js | ||
email-style.js | ||
email-template.js | ||
flag-type.js | ||
incoming-email.js | ||
permalink.js | ||
report.js | ||
screened-email.js | ||
screened-ip-address.js | ||
screened-url.js | ||
site-setting.js | ||
site-text.js | ||
staff-action-log.js | ||
theme-settings.js | ||
theme.js | ||
tl3-requirements.js | ||
user-field.js | ||
version-check.js | ||
watched-word.js | ||
web-hook.js |