diff --git a/assets/stylesheets/common/rewind-header.scss b/assets/stylesheets/common/rewind-header.scss index 768a272..606dd01 100644 --- a/assets/stylesheets/common/rewind-header.scss +++ b/assets/stylesheets/common/rewind-header.scss @@ -10,6 +10,16 @@ } @media (prefers-color-scheme: dark) { + &.-light { + display: block; + } + + &.-dark { + display: none; + } + } + + @if is-dark-color-scheme() { &.-dark { display: none; } diff --git a/assets/stylesheets/common/rewind.scss b/assets/stylesheets/common/rewind.scss index c984b78..bc7ee62 100644 --- a/assets/stylesheets/common/rewind.scss +++ b/assets/stylesheets/common/rewind.scss @@ -50,7 +50,7 @@ .background-1 { background: url(/plugins/discourse-rewind/images/blur-bg.png); - @media (prefers-color-scheme: dark) { + @if is-dark-color-scheme() { opacity: 0.15; } background-size: contain; diff --git a/assets/stylesheets/common/top-words.scss b/assets/stylesheets/common/top-words.scss index 87ee1b8..a75939c 100644 --- a/assets/stylesheets/common/top-words.scss +++ b/assets/stylesheets/common/top-words.scss @@ -68,7 +68,7 @@ .rewind-card { box-shadow: 0 0 0 4px rgba(var(--mystery-color-light), 1); border: none; - @media (prefers-color-scheme: dark) { + @if is-dark-color-scheme() { background-color: var(--primary-200); box-shadow: 0 0 0 4px rgba(var(--mystery-color-dark), 1); } @@ -97,13 +97,13 @@ } &:hover .rewind-card__inner { box-shadow: 0px 3px 8px 2px rgba(var(--primary-rgb), 0.25); - @media (prefers-color-scheme: dark) { - box-shadow: 0px 3px 8px 2px rgba(var(--secondary-rgb), 0.9); + @if is-dark-color-scheme() { + box-shadow: 0px 3px 8px 2px rgba(var(--primary-rgb), 0.25); } } .rewind-card__inner { box-shadow: 0px 0px 6px 2px rgba(var(--primary-rgb), 0.25); - @media (prefers-color-scheme: dark) { + @if is-dark-color-scheme() { box-shadow: 0px 0px 6px 2px rgba(var(--secondary-rgb), 0.9); } } diff --git a/assets/stylesheets/common/variables.scss b/assets/stylesheets/common/variables.scss index 1b4c4e3..1141869 100644 --- a/assets/stylesheets/common/variables.scss +++ b/assets/stylesheets/common/variables.scss @@ -17,7 +17,7 @@ border: 2px solid var(--primary); border-radius: var(--rewind-border-radius); box-shadow: 4px 4px 0 0 rgba(var(--primary-rgb), 0.25); - @media screen and (prefers-color-scheme: dark) { + @if is-dark-color-scheme() { box-shadow: 0 4px 5px -2px rgba(var(--secondary-rgb), 0.5); } } diff --git a/public/images/rewind-avatar.gif b/public/images/rewind-avatar.gif new file mode 100644 index 0000000..8fc7ec9 Binary files /dev/null and b/public/images/rewind-avatar.gif differ