Use percents for opacity

This commit is contained in:
daudix
2024-09-16 21:52:04 +03:00
parent feef834f5d
commit bd97b75c4f
7 changed files with 38 additions and 37 deletions

View File

@ -749,7 +749,7 @@ You know, <span class="spoiler solid">Duckquill is a pretty dumb name.</span> I
if (contrastColorLight) {
styles += `
:root {
--contrast-color: rgb(0 0 0 / 0.8);
--contrast-color: rgb(0 0 0 / 80%);
}
`;
} else {
@ -763,11 +763,11 @@ You know, <span class="spoiler solid">Duckquill is a pretty dumb name.</span> I
if (contrastColorDark) {
styles += `
[data-theme="dark"] {
--contrast-color: rgb(0 0 0 / 0.8);
--contrast-color: rgb(0 0 0 / 80%);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--contrast-color: rgb(0 0 0 / 0.8);
--contrast-color: rgb(0 0 0 / 80%);
}
}
`;

View File

@ -174,11 +174,11 @@ Want to set some nice image as a background? We got you covered:
@include theme-variables using ($theme) {
@if $theme == "dark" {
--bg-overlay: linear-gradient(rgb(0 0 0 / 0.9), rgb(0 0 0 / 0.9));
--bg-overlay: linear-gradient(rgb(0 0 0 / 90%), rgb(0 0 0 / 90%));
}
@else {
--bg-overlay: linear-gradient(rgb(255 255 255 / 0.8), rgb(255 255 255 / 0.8));
--bg-overlay: linear-gradient(rgb(255 255 255 / 80%), rgb(255 255 255 / 80%));
}
}