Compare commits

...

1 commit

Author SHA1 Message Date
Carlos Fernandez
6ee4515c4a Styling pass for scrollbars, fieldsets, and scroll shadows 2026-05-29 05:41:22 -04:00
42 changed files with 346 additions and 207 deletions

View file

@ -7,7 +7,7 @@ export default class AdversarySheet extends DHBaseActorSheet {
/** @inheritDoc */
static DEFAULT_OPTIONS = {
classes: ['adversary'],
position: { width: 660, height: 766 },
position: { width: 670, height: 766 },
window: { resizable: true },
actions: {
toggleHitPoints: AdversarySheet.#toggleHitPoints,

View file

@ -41,5 +41,11 @@
list-style: disc;
}
}
// Fixes centering and makes it not render over scrollbar
&:hover button.toggle:enabled {
display: flex;
right: 12px;
}
}
}

View file

@ -54,7 +54,7 @@ body.game:is(.performance-low, .noblur) {
position: relative;
min-height: -webkit-fill-available;
transition: opacity 0.3s ease;
padding-bottom: 20px;
padding-bottom: 16px;
.tab {
padding: 0 10px;

View file

@ -3,8 +3,7 @@
.daggerheart.dh-style {
.tab-navigation {
margin: 5px 0;
height: 40px;
margin: 5px 0 10px 0;
width: 100%;
.navigation-container {

View file

@ -38,11 +38,23 @@
}
.tab.inventory {
.search-section {
display: flex;
.gold-section {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
gap: 10px;
align-items: center;
padding: 12px 12px 0 10px;
.input {
color: light-dark(@dark, @beige);
}
}
}
.search-section {
display: flex;
gap: 10px;
align-items: center;
justify-content: space-between;
.search-bar {
position: relative;
color: light-dark(@dark-blue-50, @beige-50);
@ -72,22 +84,11 @@
height: 32px;
position: absolute;
right: 20px;
font-size: 16px;
font-size: var(--font-size-16);;
z-index: 1;
color: light-dark(@dark-blue-50, @beige-50);
}
}
.gold-section {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
gap: 10px;
padding: 10px 10px 0;
.input {
color: light-dark(@dark, @beige);
}
}
}
&.limited {

View file

@ -1,15 +0,0 @@
@import '../../../utils/colors.less';
@import '../../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.adversary {
.tab.features {
.feature-section {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%);
padding-bottom: 20px;
}
}
}

View file

@ -1,4 +1,5 @@
@import '../../../utils/colors.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.adversary {
.tab.effects {
@ -7,8 +8,9 @@
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%);
padding-bottom: 20px;
scrollbar-gutter: stable;
padding-bottom: 4px;
.with-scroll-shadows();
}
}
}

View file

@ -0,0 +1,29 @@
@import '../../../utils/colors.less';
@import '../../../utils/fonts.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.adversary {
.tab.features.active {
position: relative;
padding-left: 15px;
.feature-section {
display: flex;
flex-direction: column;
gap: 10px;
padding: 6px 2px 4px 0;
overflow-y: auto;
scrollbar-gutter: stable;
.with-scroll-shadows();
}
> button {
--button-size: 1.75rem;
width: 1.75rem;
position: absolute;
inset: auto 16px 0 auto;
box-shadow: 0 0 5px @light-black;
}
&:has(> button) .feature-section {
padding-bottom: calc(1px + 1.75rem);
}
}
}

View file

@ -71,7 +71,10 @@
.adversary-navigation {
display: flex;
gap: 8px;
align-items: center;
align-items: baseline;
.tab-navigation {
margin-top: 0;
}
}
}
}

View file

@ -0,0 +1,6 @@
@import './sheet.less';
@import './features.less';
@import './header.less';
@import './sidebar.less';
@import './effects.less';
@import './notes.less';

View file

@ -0,0 +1,11 @@
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.adversary {
.tab.notes {
padding: 6px 0 4px 15px;
.editor-content {
scrollbar-gutter: stable;
.with-scroll-shadows();
}
}
}

View file

@ -9,28 +9,31 @@
height: 100%;
width: 100%;
padding-bottom: 0;
}
.adversary-sidebar-sheet {
grid-row: 1 / span 2;
grid-column: 1;
.adversary-sidebar-sheet {
grid-row: 1 / span 2;
grid-column: 1;
overflow: hidden;
display: flex;
flex-direction: column;
}
.adversary-header-sheet {
grid-row: 1;
grid-column: 2;
}
.tab {
grid-row: 2;
grid-column: 2;
&.active {
overflow: hidden;
display: flex;
flex-direction: column;
}
.adversary-header-sheet {
grid-row: 1;
grid-column: 2;
}
.tab {
grid-row: 2;
grid-column: 2;
&.active {
overflow: hidden;
display: flex;
flex-direction: column;
}
padding-right: 0;
margin-right: 2px;
margin-bottom: 16px;
}
}
}

View file

@ -286,9 +286,8 @@
overflow-y: hidden;
padding-top: 10px;
padding-bottom: 20px;
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
scrollbar-gutter: stable;
.with-scroll-shadows();
&:hover {
overflow-y: auto;

View file

@ -1,5 +1,6 @@
@import '../../../utils/colors.less';
@import '../../../utils/fonts.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.character {
.tab.biography {
@ -9,10 +10,11 @@
gap: 10px;
height: 100%;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 98%, transparent 100%);
padding-top: 8px;
padding-bottom: 20px;
padding-bottom: 4px;
height: 100%;
scrollbar-gutter: stable;
.with-scroll-shadows();
}
.characteristics-section {

View file

@ -1,15 +1,18 @@
@import '../../../utils/colors.less';
@import '../../../utils/fonts.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.character {
.tab.effects {
padding-right: 0;
overflow-y: auto;
scrollbar-gutter: stable;
.with-scroll-shadows();
.effects-sections {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%);
padding-bottom: 20px;
padding-bottom: 4px;
}
}
}

View file

@ -1,15 +1,18 @@
@import '../../../utils/colors.less';
@import '../../../utils/fonts.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.character {
.tab.features {
overflow-y: auto;
scrollbar-gutter: stable;
padding-right: 0;
padding-bottom: 4px;
.with-scroll-shadows();
.features-sections {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%);
padding-bottom: 20px;
}
}
}

View file

@ -0,0 +1,8 @@
@import './sheet.less';
@import './biography.less';
@import './effects.less';
@import './features.less';
@import './header.less';
@import './inventory.less';
@import './loadout.less';
@import './sidebar.less';

View file

@ -1,15 +1,22 @@
@import '../../../utils/colors.less';
@import '../../../utils/fonts.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.character {
.tab.inventory {
padding-right: 0;
.search-section {
padding-right: 14px;
}
.items-section {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
padding: 20px 0;
scrollbar-gutter: stable;
margin-top: 20px;
padding-bottom: 4px;
.with-scroll-shadows();
}
}
}

View file

@ -4,44 +4,7 @@
.application.sheet.daggerheart.actor.dh-style.character {
.tab.loadout {
.search-section {
display: flex;
align-items: center;
justify-content: space-between;
.search-bar {
position: relative;
color: light-dark(@dark-blue-50, @beige-50);
width: 80%;
padding-top: 5px;
input {
border-radius: 50px;
background: light-dark(@dark-blue-10, @golden-10);
border: none;
outline: 2px solid transparent;
transition: all 0.3s ease;
padding: 0 20px;
&:hover {
outline: 2px solid light-dark(@dark, @golden);
}
&::-webkit-search-cancel-button {
-webkit-appearance: none;
display: none;
}
}
.icon {
align-content: center;
height: 32px;
position: absolute;
right: 20px;
font-size: var(--font-size-16);
z-index: 1;
color: light-dark(@dark-blue-50, @beige-50);
}
}
padding-right: 14px;
.btn-toggle-view {
background: light-dark(@dark-blue-10, @dark-blue);
@ -90,8 +53,10 @@
gap: 10px;
height: 100%;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 10%, black 98%, transparent 100%);
padding: 20px 0;
scrollbar-gutter: stable;
margin-top: 20px;
padding-bottom: 4px;
.with-scroll-shadows();
}
}
}

View file

@ -10,28 +10,31 @@
width: 100%;
padding-bottom: 0;
overflow-x: auto;
}
.character-sidebar-sheet {
grid-row: 1 / span 2;
grid-column: 1;
display: flex;
flex-direction: column;
}
.character-sidebar-sheet {
grid-row: 1 / span 2;
grid-column: 1;
.character-header-sheet {
position: relative;
grid-row: 1;
grid-column: 2;
}
.tab {
grid-row: 2;
grid-column: 2;
padding-right: 0;
margin-right: 2px;
margin-bottom: 12px;
&.active {
display: flex;
flex-direction: column;
}
.character-header-sheet {
position: relative;
grid-row: 1;
grid-column: 2;
}
.tab {
grid-row: 2;
grid-column: 2;
&.active {
display: flex;
flex-direction: column;
overflow: hidden;
}
overflow: hidden;
}
}
}

View file

@ -549,8 +549,8 @@
overflow-y: hidden;
padding-top: 10px;
padding-bottom: 20px;
mask-image: linear-gradient(0deg, transparent 0%, black 5%);
scrollbar-gutter: stable;
.with-scroll-shadows();
&:hover {
overflow-y: auto;

View file

@ -1,14 +1,18 @@
@import '../../../utils/colors.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.companion {
.tab.effects {
margin-right: 2px;
padding-right: 0;
.effects-sections {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%);
padding-bottom: 20px;
padding-bottom: 4px;
scrollbar-gutter: stable;
.with-scroll-shadows();
}
}
}

View file

@ -151,7 +151,7 @@
display: flex;
gap: 8px;
align-items: baseline;
width: 100%;
width: calc(100% - 32px);
}
}
}

View file

@ -10,3 +10,16 @@
background: url('../assets/parchments/dh-parchment-light.png');
}
});
.application.sheet.daggerheart.actor.dh-style.companion {
.window-content {
display: flex;
}
.tab.active {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
}
}

View file

@ -1,15 +0,0 @@
@import '../../../utils/colors.less';
@import '../../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.environment {
.tab.features {
.feature-section {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%);
padding-bottom: 20px;
}
}
}

View file

@ -0,0 +1,28 @@
@import '../../../utils/colors.less';
@import '../../../utils/fonts.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.environment {
.tab.features {
position: relative;
.feature-section {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
padding: 4px 8px;
scrollbar-gutter: stable;
.with-scroll-shadows();
}
> button {
--button-size: 1.75rem;
width: 1.75rem;
position: absolute;
inset: auto 16px 0 auto;
box-shadow: 0 0 5px @light-black;
}
&:has(> button) .feature-section {
padding-bottom: calc(1px + 1.75rem);
}
}
}

View file

@ -0,0 +1,5 @@
@import './sheet.less';
@import './features.less';
@import './header.less';
@import './potentialAdversaries.less';
@import './notes.less';

View file

@ -0,0 +1,11 @@
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.environment {
.tab.notes {
padding: 6px 0 4px 15px;
.editor-content {
scrollbar-gutter: stable;
.with-scroll-shadows();
}
}
}

View file

@ -1,4 +1,5 @@
@import '../../../utils/colors.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.environment {
.tab.potentialAdversaries {
@ -7,8 +8,9 @@
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%);
padding-bottom: 20px;
padding-bottom: 0 4px 4px 4px;
scrollbar-gutter: stable;
.with-scroll-shadows();
}
}
}

View file

@ -16,6 +16,8 @@
.tab {
flex: 1;
overflow-y: auto;
padding-right: 0;
margin-right: 2px;
&.active {
overflow: hidden;

View file

@ -0,0 +1,5 @@
@import './sheet.less';
@import './header.less';
@import './party-members.less';
@import './inventory.less';
@import './notes.less';

View file

@ -1,15 +1,23 @@
@import '../../../utils/colors.less';
@import '../../../utils/fonts.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.party {
.tab.inventory {
padding-right: 0;
.search-section {
padding-right: 14px;
}
.items-section {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
padding: 20px 0;
scrollbar-gutter: stable;
margin-top: 20px;
padding-bottom: 4px;
.with-scroll-shadows();
}
}
}

View file

@ -0,0 +1,12 @@
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.party {
.tab.notes {
padding: 16px 0 4px 15px;
.editor-content {
scrollbar-gutter: stable;
padding-left: 8px;
.with-scroll-shadows();
}
}
}

View file

@ -4,6 +4,8 @@
.application.sheet.daggerheart.actor.dh-style.party .tab.partyMembers {
overflow: auto;
scrollbar-gutter: stable;
.with-scroll-shadows();
.actors-list {
display: flex;

View file

@ -19,8 +19,8 @@
.application.sheet.daggerheart.actor.dh-style.party {
.tab {
flex: 1;
overflow-y: auto;
scrollbar-gutter: stable;
margin-right: 2px;
padding-right: 8px;
&.active {
overflow: auto;

View file

@ -2,36 +2,16 @@
@import './actors/actor-sheet-shared.less';
@import './actors/adversary/actions.less';
@import './actors/adversary/header.less';
@import './actors/adversary/sheet.less';
@import './actors/adversary/sidebar.less';
@import './actors/adversary/effects.less';
@import './actors/character/biography.less';
@import './actors/character/effects.less';
@import './actors/character/features.less';
@import './actors/character/header.less';
@import './actors/character/inventory.less';
@import './actors/character/loadout.less';
@import './actors/character/sheet.less';
@import './actors/character/sidebar.less';
@import './actors/adversary/index.less';
@import './actors/character/index.less';
@import './actors/environment/index.less';
@import './actors/party/index.less';
@import './actors/companion/details.less';
@import './actors/companion/header.less';
@import './actors/companion/sheet.less';
@import './actors/companion/effects.less';
@import './actors/environment/actions.less';
@import './actors/environment/header.less';
@import './actors/environment/potentialAdversaries.less';
@import './actors/environment/sheet.less';
@import './actors/party/header.less';
@import './actors/party/party-members.less';
@import './actors/party/sheet.less';
@import './actors/party/inventory.less';
@import './items/beastform.less';
@import './items/class.less';
@import './items/domain-card.less';

View file

@ -160,3 +160,47 @@
@destination @length
);
}
// Scroll shadows, but only if the browser supports. At the time of writing, this doesn't work on firefox
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
@property --fade-start {
syntax: "<length>";
inherits: false;
initial-value: 0;
}
@property --fade-end {
syntax: "<length>";
inherits: false;
initial-value: 0;
}
@keyframes scrollfade {
0% {
--fade-start: 0;
}
10%, 100% {
--fade-start: 10px;
}
0%, 90% {
--fade-end: 10px;
}
100% {
--fade-end: 0;
}
}
}
.with-scroll-shadows() {
animation: scrollfade;
animation-timeline: --scrollfade;
scroll-timeline: --scrollfade y;
mask-image: linear-gradient(
0deg,
transparent 0%,
black var(--fade-end),
black calc(100% - var(--fade-start)),
transparent 100%
);
}

View file

@ -1,14 +1,20 @@
<section class='tab {{tabs.features.cssClass}} {{tabs.features.id}}' data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'>
<div class="feature-section">
{{> 'daggerheart.inventory-items'
title=tabs.features.label
type='feature'
collection=@root.features
hideContextMenu=true
hideModifyControls=true
canCreate=@root.editable
showActions=@root.editable
}}
{{#each @root.features as |item|}}
{{> 'daggerheart.inventory-item'
item=item
type='feature'
actorType=@root.document.type
hideContextMenu=true
hideModifyControls=true
showActions=@root.editable
}}
{{/each}}
</div>
</section>
{{#if @root.editable}}
<button data-action="createDoc" data-document-class="Item" data-type="feature" data-tooltip="{{localize 'DOCUMENT.Create' type=(localize 'TYPES.Item.feature')}}">
<i class="fa-solid fa-plus icon-button"></i>
</button>
{{/if}}
</section>

View file

@ -3,10 +3,7 @@
data-tab='{{tabs.notes.id}}'
data-group='{{tabs.notes.group}}'
>
<fieldset class="fit-height">
<legend>{{localize tabs.notes.label}}</legend>
{{formInput notes.field value=notes.value enriched=notes.enriched toggled=true}}
</fieldset>
{{formInput notes.field value=notes.value enriched=notes.enriched class="aaa" toggled=true}}
{{#if (and showAttribution document.system.attribution.artist)}}
<label class="artist-attribution">{{localize "DAGGERHEART.GENERAL.artistAttribution" artist=document.system.attribution.artist}}</label>

View file

@ -4,14 +4,20 @@
data-group='{{tabs.features.group}}'
>
<div class="feature-section">
{{> 'daggerheart.inventory-items'
title=tabs.features.label
type='feature'
collection=@root.features
hideContextMenu=true
hideModifyControls=true
canCreate=@root.editable
showActions=@root.editable
}}
</div>
{{#each @root.features as |item|}}
{{> 'daggerheart.inventory-item'
item=item
type='feature'
actorType=@root.document.type
hideContextMenu=true
hideModifyControls=true
showActions=@root.editable
}}
{{/each}}
</div>
{{#if @root.editable}}
<button data-action="createDoc" data-document-class="Item" data-type="feature" data-tooltip="{{localize 'DOCUMENT.Create' type=(localize 'TYPES.Item.feature')}}">
<i class="fa-solid fa-plus icon-button"></i>
</button>
{{/if}}
</section>

View file

@ -3,10 +3,7 @@
data-tab='{{tabs.notes.id}}'
data-group='{{tabs.notes.group}}'
>
<fieldset class="fit-height">
<legend>{{localize tabs.notes.label}}</legend>
{{formInput notes.field value=notes.value enriched=notes.value toggled=true}}
</fieldset>
{{formInput notes.field value=notes.value enriched=notes.value toggled=true}}
{{#if (and showAttribution document.system.attribution.artist)}}
<label class="artist-attribution">{{localize "DAGGERHEART.GENERAL.artistAttribution" artist=document.system.attribution.artist}}</label>

View file

@ -3,8 +3,5 @@
data-tab='{{tabs.notes.id}}'
data-group='{{tabs.notes.group}}'
>
<fieldset class="fit-height">
<legend>{{localize tabs.notes.label}}</legend>
{{formInput notes.field value=notes.value enriched=notes.value toggled=true}}
</fieldset>
{{formInput notes.field value=notes.value enriched=notes.value toggled=true}}
</section>