From 9ef492969325a60defad971cd0a8def80d6b37cb Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Fri, 8 May 2026 09:08:25 -0400 Subject: [PATCH] Implement another traits redesign (#1871) * Implement another traits redesign * Adjust traits shape --- .../less/sheets/actors/character/header.less | 110 ++++++++++++------ styles/less/utils/colors.less | 2 + styles/less/utils/fonts.less | 2 + templates/sheets/actors/character/header.hbs | 40 ++++--- 4 files changed, 105 insertions(+), 49 deletions(-) diff --git a/styles/less/sheets/actors/character/header.less b/styles/less/sheets/actors/character/header.less index ea397220..f912a7f0 100644 --- a/styles/less/sheets/actors/character/header.less +++ b/styles/less/sheets/actors/character/header.less @@ -212,59 +212,101 @@ display: flex; padding: 0; margin-bottom: 15px; - gap: 8px; + justify-content: space-between; + max-width: 38.5rem; + gap: 0.5rem; + padding-left: 0.5rem; .trait { - height: 3.625rem; + --color-border: light-dark(@semi-transparent-dark-blue, @golden-60); cursor: pointer; - border: 1px solid light-dark(@dark-blue, @golden); - border-radius: 6px; - flex: 1; position: relative; - background-color: light-dark(transparent, @dark-blue); display: flex; + align-items: center; justify-content: center; flex-direction: column; + min-width: 4.375rem; .trait-name { - display: flex; - align-items: center; - padding-top: 5px; - color: light-dark(@dark-blue, @golden); + position: relative; + background-color: light-dark(@semi-transparent-dark-blue, @golden-40); + border: 1px solid var(--color-border); + border-radius: 3px; + color: light-dark(var(--color-light-1), @golden); font-size: var(--font-size-12); font-weight: 600; + height: 1rem; + line-height: 1rem; + white-space: nowrap; + width: 100%; + padding: 0 0.1876px 0 0.375rem; + margin-right: 0.125rem; /* makes it center SLIGHTLY */ + text-shadow: 1px 1px 2px @light-black; + + display: flex; align-items: center; justify-content: center; - } - .trait-value { - font-style: normal; - font-weight: 600; - font-size: var(--font-size-20); - text-align: center; - margin-bottom: 0.375rem; - } - - .tier-mark, - .spellcasting-mark { - position: absolute; - opacity: 0.9; - color: light-dark(@dark-blue, @golden); - i { - line-height: 17px; - font-size: var(--font-size-11); + .tier-mark { + position: absolute; + background-color: @dark-blue; + border: 1px solid light-dark(@dark-blue, @golden); + border-radius: 50%; + width: 1rem; + height: 1rem; + right: calc(100% - 0.4375rem); + display: flex; + justify-content: center; + align-items: center; + &.marked::before { + content: ' '; + position: absolute; + width: 0.5rem; + height: 0.5rem; + border-radius: 50%; + background-color: @golden; + } } } - .tier-mark { - bottom: 1px; - left: 3px; - } + .trait-value-area { + --background: light-dark(#e8e6e3, @dark-blue); + display: flex; + position: relative; + .trait-value { + position: absolute; + inset: 0; + display: flex; + align-items: center; - .spellcasting-mark { - bottom: 1px; - right: 3px; + justify-content: center; + font-style: normal; + font-weight: 600; + font-size: var(--font-size-20); + text-align: center; + margin-bottom: 0.375rem; + } + + .spellcasting-mark { + position: absolute; + border: 1px solid light-dark(@dark-blue, @golden); + color: @golden; + left: 0; + right: 0; + bottom: -0.375rem; + margin-inline: auto; + border-radius: 50%; + width: 1.125rem; + height: 1.125rem; + background: radial-gradient(190.63% 190.63% at 50% -80.63%, #18152E 70%, #4D4494 80%, #A0837E 90%, var(--color-border) 100%); + font-size: var(--font-size-9); + text-shadow: 0 0 2px @light-black; + + display: flex; + align-items: center; + justify-content: center; + } } &:hover { diff --git a/styles/less/utils/colors.less b/styles/less/utils/colors.less index 8f6418bf..18b981ad 100755 --- a/styles/less/utils/colors.less +++ b/styles/less/utils/colors.less @@ -5,6 +5,7 @@ --golden: #f3c267; --golden-10: #f3c26710; --golden-40: #f3c26740; + --golden-60: #f3c26760; --golden-90: #f3c26790; --golden-bg: #f3c2671a; --golden-secondary: #eaaf42; @@ -89,6 +90,7 @@ @golden: var(--golden, #f3c267); @golden-10: var(--golden-10, #f3c26710); @golden-40: var(--golden-40, #f3c26740); +@golden-60: var(--golden-60, #f3c26760); @golden-90: var(--golden-90, #f3c26790); @golden-bg: var(--golden-bg, #f3c2671a); @golden-secondary: var(--golden-secondary, #eaaf42); diff --git a/styles/less/utils/fonts.less b/styles/less/utils/fonts.less index d4902508..201ea356 100755 --- a/styles/less/utils/fonts.less +++ b/styles/less/utils/fonts.less @@ -7,6 +7,8 @@ --dh-font-body: 'Montserrat'; /* Include missing font sizes */ + --font-size-8: 0.5rem; + --font-size-9: 0.5625rem; --font-size-22: 1.375rem; } diff --git a/templates/sheets/actors/character/header.hbs b/templates/sheets/actors/character/header.hbs index 8010dfa5..2a19e2c3 100644 --- a/templates/sheets/actors/character/header.hbs +++ b/templates/sheets/actors/character/header.hbs @@ -132,27 +132,37 @@
{{#each this.attributes as |attribute key|}} -
-
- {{attribute.label}} -
-
- {{#if (gt attribute.value 0)}} - +{{attribute.value}} - {{else}} - {{attribute.value}} - {{/if}} -
+ {{!--
+ {{#if attribute.tierMarked}}
{{/if}} - {{#if isSpellcasting}} -
- +
--}} +
+
+
+ {{attribute.label}} +
+
+ + + + +
+ {{#if (gt attribute.value 0)}} + +{{attribute.value}} + {{else}} + {{attribute.value}} + {{/if}}
- {{/if}} + {{#if isSpellcasting}} +
+ +
+ {{/if}} +
{{/each}}