Automatic contrast color picking (fixes #43)
This commit is contained in:
@ -7,16 +7,6 @@
|
||||
{%- else -%}
|
||||
--accent-color: {{ config.extra.accent_color | default(value="#6f8396") | safe }};
|
||||
{%- endif -%}
|
||||
|
||||
{%- if page.extra.fix_contrast -%}
|
||||
--contrast-color: rgb(0 0 0 / 0.8);
|
||||
{%- elif section.extra.fix_contrast -%}
|
||||
--contrast-color: rgb(0 0 0 / 0.8);
|
||||
{%- elif config.extra.fix_contrast -%}
|
||||
--contrast-color: rgb(0 0 0 / 0.8);
|
||||
{%- else -%}
|
||||
--contrast-color: #fff;
|
||||
{%- endif -%}
|
||||
}
|
||||
|
||||
{%- if page.extra.accent_color_dark -%}
|
||||
@ -51,18 +41,6 @@
|
||||
}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if page.extra.fix_contrast_dark or section.extra.fix_contrast_dark or config.extra.fix_contrast_dark -%}
|
||||
[data-theme="dark"] {
|
||||
--contrast-color: rgb(0 0 0 / 0.8);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme="light"]) {
|
||||
--contrast-color: rgb(0 0 0 / 0.8);
|
||||
}
|
||||
}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if config.extra.debug.layout -%}
|
||||
*,
|
||||
*::before,
|
||||
|
Reference in New Issue
Block a user