Merge branch 'main' into rework/damage-and-damage-resource-split

This commit is contained in:
WBHarry 2026-07-18 18:34:14 +02:00
commit cb917b2dc9
46 changed files with 775 additions and 466 deletions

View file

@ -7,12 +7,12 @@
.chat-log .chat-message {
background-image: url('../assets/parchments/dh-parchment-light.png');
.message-header .message-header-metadata .message-metadata,
.message-header .message-header-main .message-sub-header-container {
.message-header .message-header-main .message-metadata,
.message-header .message-header-main .name {
color: @dark;
}
.message-header .message-header-main .message-sub-header-container h4 {
.message-header .message-header-main h4 {
color: @dark-blue;
}
@ -42,27 +42,12 @@
.message-header {
display: flex;
gap: 4px;
gap: 8px;
padding: 8px;
align-items: center;
.message-header-metadata {
flex: none;
display: flex;
flex-direction: column;
.message-metadata {
font-family: @font-body;
color: @beige;
}
}
.message-header-main {
display: flex;
align-items: center;
gap: 8px;
flex: 1;
overflow: hidden;
.portrait {
flex: 0 0 auto;
.actor-img {
border-radius: 50%;
width: 40px;
@ -70,20 +55,60 @@
object-fit: cover;
object-position: top center;
}
}
.message-sub-header-container {
.message-header-main {
display: flex;
align-items: center;
column-gap: 4px;
row-gap: 2px;
flex: 1;
overflow: hidden;
display: grid;
grid-template:
"title metadata"
"subtitle subtitle";
h4 {
font-size: var(--font-size-16);
font-weight: bold;
margin-bottom: 0;
font-family: @font-subtitle;
color: @golden;
white-space: nowrap;
text-overflow: ellipsis;
flex: 1;
overflow: hidden;
align-self: flex-end;
}
.message-metadata {
font-family: @font-body;
color: @beige;
white-space: nowrap;
align-items: baseline;
.message-timestamp {
font-size: var(--font-size-11);
}
}
.subtitle {
grid-area: subtitle;
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
color: @beige;
h4 {
font-size: var(--font-size-16);
font-weight: bold;
margin-bottom: 0;
font-family: @font-subtitle;
color: @golden;
gap: 4px;
align-items: baseline;
line-height: 1;
.name {
flex: 1;
}
.whisper-to {
color: @color-text-subtle;
flex: 0;
white-space: nowrap;
}
}
}

View file

@ -595,7 +595,86 @@
margin-top: 4px;
color: light-dark(#14142599, #efe6d850);
font-size: var(--font-size-12);
padding-left: 3px;
padding-left: 16px;
}
section.gm-notes-section {
padding-bottom: var(--spacer-4);
header.gm-notes + p {
margin-top: 0;
}
}
header.gm-notes {
position: relative;
display: flex;
gap: 6px;
align-items: center;
&::before,
&::after {
content: " ";
flex: 1;
border-bottom: 1px solid var(--color-dark-6);
}
&::before {
mask-image: linear-gradient(270deg, black 0%, black calc(100% - 10px), transparent 100%);
}
&::after {
mask-image: linear-gradient(270deg, transparent 0%, black 10px, black 100%);
}
margin-top: var(--spacer-8);
margin-bottom: var(--spacer-4);
font-size: var(--font-size-11);
text-transform: uppercase;
}
secret-block {
display: block;
/** A buffer to make the hover behavior work a bit better. The bottom in the button needs to compensate */
@buffer: 8px;
margin-top: -@buffer;
padding-top: @buffer;
button.reveal {
--button-size: 1rem;
height: var(--button-size);
position: absolute;
margin: auto;
left: 0;
right: 0;
width: min-content;
padding: 1px 8px 0 8px;
bottom: calc(100% - 0.4375rem - 1px);
background-color: var(--dh-window-button-color-bg); // todo: find a better var name
border-color: var(--color-secret-border);
color: var(--dh-window-button-color-text);
font-size: var(--font-size-10);
user-select: none;
text-transform: uppercase;
white-space: nowrap;
visibility: hidden;
}
&:hover button.reveal {
visibility: visible;
}
}
/**
* The element inside a secret-block.
* This is separate since during prosemirror editing, the secret-block container does not exist.
*/
section.secret {
--color-secret-bg: @red-10;
--color-revealed-bg: @green-10;
position: relative;
padding: 0;
p {
margin: 0.5rem 0;
}
}
}
@ -817,4 +896,8 @@
right: 2px;
}
}
.gm-notes {
font-style: italic;
}
}

View file

@ -3,7 +3,7 @@
.sheet.daggerheart.dh-style.item {
.tab.features {
padding: 0 10px;
padding: 7px 10px;
overflow-y: auto;
.feature-list {
display: flex;

View file

@ -111,3 +111,7 @@ body.theme-light,
.themed.theme-light {
color-scheme: light;
}
body:not([data-gm=true]) [data-visibility="gm"] {
display: none;
}

View file

@ -163,37 +163,7 @@
}
.inventory-description {
overflow: hidden;
h1 {
font-size: var(--font-size-32);
}
h2 {
font-size: var(--font-size-28);
font-weight: 600;
}
h3 {
font-size: var(--font-size-20);
font-weight: 600;
}
h4 {
font-size: var(--font-size-16);
color: @beige;
font-weight: 600;
}
ul,
ol {
margin: 1rem 0;
padding: 0 0 0 1.25rem;
li {
margin-bottom: 0.25rem;
}
}
ul {
list-style: disc;
}
.typography();
}
}
.item-resources {

View file

@ -12,12 +12,14 @@
});
.application.sheet.daggerheart.dh-style {
--portrait-size: 150px;
.item-sheet-header {
display: flex;
.profile {
height: 150px;
width: 150px;
height: var(--portrait-size);
width: var(--portrait-size);
object-fit: cover;
border-right: 1px solid light-dark(@dark-blue, @golden);
border-bottom: 1px solid light-dark(@dark-blue, @golden);
@ -34,19 +36,24 @@
text-align: center;
width: 80%;
.item-name input[type='text'] {
font-size: var(--font-size-32);
height: 42px;
text-align: center;
width: 90%;
transition: all 0.3s ease;
outline: 2px solid transparent;
border: 1px solid transparent;
.item-name {
display: flex;
flex-direction: column;
margin: 10px 10px 0 10px;
input[type='text'] {
font-size: var(--font-size-30);
text-align: center;
width: 100%;
transition: all 0.3s ease;
outline: 2px solid transparent;
border: 1px solid transparent;
text-overflow: ellipsis;
&:hover[type='text'],
&:focus[type='text'] {
box-shadow: none;
outline: 2px solid light-dark(@dark-blue, @golden);
&:hover[type='text'],
&:focus[type='text'] {
box-shadow: none;
outline: 2px solid light-dark(@dark-blue, @golden);
}
}
}

View file

@ -14,36 +14,7 @@
}
.editor-content {
.with-scroll-shadows();
h1 {
font-size: var(--font-size-32);
}
h2 {
font-size: var(--font-size-28);
font-weight: 600;
}
h3 {
font-size: var(--font-size-20);
font-weight: 600;
}
h4 {
font-size: var(--font-size-16);
color: light-dark(@dark, @beige);
font-weight: 600;
}
ul,
ol {
margin: 1rem 0;
padding: 0 0 0 1.25rem;
li {
margin-bottom: 0.25rem;
}
}
ul {
list-style: disc;
}
.typography();
}
// Fixes centering and makes it not render over scrollbar
&:hover button.toggle:enabled {

View file

@ -36,8 +36,8 @@ body.game:is(.performance-low, .noblur) {
}
button {
background: light-dark(#e8e6e3, @deep-black);
color: light-dark(@dark-blue, @beige);
background: var(--dh-window-button-color-bg);
color: var(--dh-window-button-color-text);
border: 1px solid light-dark(@dark-blue, transparent);
padding: 0;

View file

@ -6,11 +6,80 @@
display: flex;
flex-direction: column;
flex: 1;
overflow-y: hidden !important;
padding-top: 10px;
overflow: hidden;
padding: 0;
margin: 0;
prose-mirror.active + .artist-attribution {
display: none;
.description-section {
flex: 1;
display: flex;
flex-direction: column;
overflow: auto;
padding: 12px 16px 4px 16px;
.with-scroll-shadows();
prose-mirror {
button.toggle {
top: 0px;
right: 0;
}
button[data-action=editGMNote] {
right: calc(var(--button-size) + 4px);
}
&.inactive {
height: unset!important;
overflow: unset;
.editor-content {
position: relative;
overflow: unset;
// Allows content links to peek out
margin-top: -4px;
padding: 4px 0 0 0;
}
}
&.active {
--min-height: 250px;
padding: 8px 0 0 16px;
button[data-action=editGMNote] {
display: none;
}
.editor-content {
padding-right: 16px;
padding-bottom: 4px;
}
}
}
/** Hide editors that are empty when inactive if we need them to be */
prose-mirror.inactive.hide-if-inactive {
display: none;
}
&:has(prose-mirror.active) {
padding: 0;
}
/** Description should fill available room (with overriden exceptions) */
prose-mirror[name="system.description"] {
flex: 1 0;
}
&:has(prose-mirror[name="system.gmNotes"]:not(.hide-if-inactive)) {
prose-mirror.inactive {
--min-height: 3rem;
&[name="system.description"] {
flex: 0 0;
}
&[name="system.gmNotes"] {
flex: 1 0;
}
}
}
}
/** Hide other elements if an editor is open */
&:has(prose-mirror.active) {
prose-mirror.inactive,
header.gm-notes,
.artist-attribution {
display: none;
}
}
}
}

View file

@ -93,10 +93,6 @@
padding: 8px 0 0 16px;
}
}
.artist-attribution {
padding-left: 16px;
}
}
.search-section {

View file

@ -1,4 +1,6 @@
.application.sheet.daggerheart.dh-style.beastform {
--portrait-size: 130px;
.settings.tab {
.advantage-on-section {
display: flex;
@ -9,4 +11,11 @@
font-style: italic;
}
}
.tab.features.active {
display: flex;
flex-direction: column;
gap: 10px;
padding: 8px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
}
}

View file

@ -2,17 +2,9 @@
@import '../../utils/fonts.less';
.application.sheet.daggerheart.dh-style.feature {
.item-sheet-header {
display: flex;
.profile {
height: 130px;
width: 130px;
}
}
--portrait-size: 130px;
section.tab {
height: 400px;
overflow-y: auto;
}
}

View file

@ -1,6 +1,6 @@
@import './item-sheet-shared.less';
@import './beastform.less';
@import './class.less';
@import './domain-card.less';
@import './feature.less';
@import './heritage.less';
@import './item-sheet-shared.less';
@import './heritage.less';

View file

@ -1,4 +1,4 @@
.application.sheet.daggerheart.dh-style.item {
.item.daggerheart.dh-style:where(.application.sheet) {
&.minimized {
.attribution-header-label {
display: none;
@ -14,4 +14,22 @@
button.plain.inline-control {
flex: 0 0 auto;
}
.tab-navigation {
margin-bottom: 0;
}
/** Default tab stylings */
.tab.active {
padding-top: 8px;
.with-scroll-shadows();
&.effects {
display: flex;
flex-direction: column;
gap: 10px;
padding: 8px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
}
}
}

View file

@ -117,7 +117,9 @@
}
.description {
padding: 8px;
padding: 0;
margin: 8px;
.typography();
}
.ability-card-footer {

View file

@ -107,6 +107,8 @@
--dh-input-color-text: @dark;
--dh-trait-color-bg: #b1afb6;
--dh-trait-color-border: #8e8d96;
--dh-window-button-color-bg: #e8e6e3;
--dh-window-button-color-text: @dark-blue;
}
}
@scope (.theme-dark) to (.themed) {
@ -124,6 +126,8 @@
--dh-input-color-text: @beige;
--dh-trait-color-bg: #50433F;
--dh-trait-color-border: #927952;
--dh-window-button-color-bg: @deep-black;
--dh-window-button-color-text: @beige;
}
}

View file

@ -203,4 +203,38 @@
overflow-y: auto;
scrollbar-gutter: stable;
.with-scroll-shadows();
}
}
/** Typography stylings for most longform text, usually item descriptions */
.typography() {
h1 {
font-size: var(--font-size-32);
}
h2 {
font-size: var(--font-size-28);
font-weight: 600;
}
h3 {
font-size: var(--font-size-20);
font-weight: 600;
}
h4 {
font-size: var(--font-size-16);
color: light-dark(@dark, @beige);
font-weight: 600;
}
ul,
ol {
margin: 0.5rem 0;
padding: 0 0 0 1.25rem;
li {
margin-bottom: 0.25rem;
}
}
ul {
list-style: disc;
}
}