Attempt to switch to relative colors for primary-color-alpha, simplify --active variable, add --hover and --disabled variables
This commit is contained in:
@ -41,21 +41,18 @@
|
||||
<style type="text/css">
|
||||
:root {
|
||||
--primary-color: {{ config.extra.primary_color | default(value="#6f8396") | safe }};
|
||||
--primary-color-alpha: {{ config.extra.primary_color_alpha | default(value="rgb(111 131 150 / 0.2)" | safe) | safe }};
|
||||
--contrast-color: {% if config.extra.fix_contrast %}rgb(0 0 0 / 0.8){% else %}#fff{% endif %};
|
||||
}
|
||||
|
||||
{%- if config.extra.primary_color_dark %}
|
||||
[data-theme="dark"] {
|
||||
--primary-color: {{ config.extra.primary_color_dark | safe }};
|
||||
--primary-color-alpha: {{ config.extra.primary_color_dark_alpha | safe }};
|
||||
--contrast-color: {% if config.extra.fix_contrast_dark %}rgb(0 0 0 / 0.8){% else %}#fff{% endif %};
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme="light"]) {
|
||||
--primary-color: {{ config.extra.primary_color_dark | safe }};
|
||||
--primary-color-alpha: {{ config.extra.primary_color_dark_alpha | safe }};
|
||||
--contrast-color: {% if config.extra.fix_contrast_dark %}rgb(0 0 0 / 0.8){% else %}#fff{% endif %};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user