From d59b4733d593d27c16afa81e59e4db647aa5c96f Mon Sep 17 00:00:00 2001 From: Idle <651462+reonZ@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:23:24 +0100 Subject: [PATCH] add defeated image over the combatant image --- styles/_tracker.scss | 28 +++++++++++++++++++++------- templates/tracker/tracker.hbs | 5 ++++- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/styles/_tracker.scss b/styles/_tracker.scss index e16e7f3..2cc9b56 100644 --- a/styles/_tracker.scss +++ b/styles/_tracker.scss @@ -88,24 +88,38 @@ display: flex; overflow: hidden; - img { + > * { position: absolute; + display: flex; + } + + img { + inset: 0; border: none; pointer-events: none; - transform: scale(var(--scaleX), var(--scaleY)); - mask-image: var(--mask); + + &.token-img { + z-index: 0; + transform: scale(var(--scaleX), var(--scaleY)); + mask-image: var(--mask); + } + + &.defeated-img { + z-index: 1; + filter: invert(19%) sepia(93%) saturate(6259%) hue-rotate(357deg) + brightness(70%) contrast(130%) drop-shadow(0px 0px 2px black); + } } .alt { - display: flex; + inset: 0; + z-index: 2; font-size: 1.8em; align-items: center; - z-index: 1; } .targets { - position: absolute; - display: flex; + z-index: 3; justify-content: center; gap: 1px; diff --git a/templates/tracker/tracker.hbs b/templates/tracker/tracker.hbs index d1eb2b4..3c893ce 100644 --- a/templates/tracker/tracker.hbs +++ b/templates/tracker/tracker.hbs @@ -37,8 +37,11 @@ data-initiative="{{combatant.initiative}}" style="--disposition-color: {{color}}">