Fix css cost (#554)

* Fix css cost

* comment
This commit is contained in:
Dapoulp 2025-08-03 22:08:13 +02:00 committed by GitHub
parent 90cef3a7a8
commit 0bcff99ef7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View file

@ -383,13 +383,17 @@
.scalable-input { .scalable-input {
display: grid; display: grid;
grid-template-columns: 1fr 1fr auto; grid-template-columns: 1fr 1fr auto;
// display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
gap: 10px; gap: 10px;
.form-group { .form-group {
width: fit-content; width: fit-content;
&.span-2 {
grid-column: 1 / span 2;
}
.nest-inputs { .nest-inputs {
width: fit-content; width: fit-content;
} }

View file

@ -3,19 +3,18 @@
<ul> <ul>
{{#if uses}} {{#if uses}}
<li class="scalable-input"> <li class="scalable-input">
<div class="form-group"> <div class="form-group span-2">
<div class="form-fields nest-inputs"> <div class="form-fields nest-inputs">
<input name="uses.enabled" type="checkbox"{{#if uses.enabled}} checked{{/if}}> <input name="uses.enabled" type="checkbox"{{#if uses.enabled}} checked{{/if}}>
<label for="uses.enabled">Uses{{#if uses.consumeOnSuccess}}<span class="hint">{{localize "DAGGERHEART.ACTIONS.Settings.consumeOnSuccess.short"}}{{/if}}</span></label> <label for="uses.enabled">Uses{{#if uses.consumeOnSuccess}}<span class="hint">{{localize "DAGGERHEART.ACTIONS.Settings.consumeOnSuccess.short"}}{{/if}}</span></label>
</div> </div>
</div> </div>
<div></div>
<label class="modifier-label">{{uses.value}}/{{formulaValue uses.max @root.rollConfig.data}}</label> <label class="modifier-label">{{uses.value}}/{{formulaValue uses.max @root.rollConfig.data}}</label>
</li> </li>
{{/if}} {{/if}}
{{#each costs as | cost index |}} {{#each costs as | cost index |}}
<li class="scalable-input"> <li class="scalable-input">
<div class="form-group"> <div class="form-group{{#unless (and scalable (gt maxStep 1))}} span-2{{/unless}}">
<div class="form-fields nest-inputs"> <div class="form-fields nest-inputs">
<input name="costs.{{index}}.enabled" type="checkbox"{{#if enabled}} checked{{/if}}> <input name="costs.{{index}}.enabled" type="checkbox"{{#if enabled}} checked{{/if}}>
<label>{{label}}{{#if cost.consumeOnSuccess}}<span class="hint">{{localize "DAGGERHEART.ACTIONS.Settings.consumeOnSuccess.short"}}</span>{{/if}}</label> <label>{{label}}{{#if cost.consumeOnSuccess}}<span class="hint">{{localize "DAGGERHEART.ACTIONS.Settings.consumeOnSuccess.short"}}</span>{{/if}}</label>
@ -23,8 +22,6 @@
</div> </div>
{{#if (and scalable (gt maxStep 1))}} {{#if (and scalable (gt maxStep 1))}}
<input type="range" value="{{scale}}" min="0" max="{{maxStep}}" step="1" name="costs.{{index}}.scale" data-tooltip="{{localize "DAGGERHEART.ACTIONS.Settings.cost.stepTooltip" step=step}}" data-tooltip-direction="UP"> <input type="range" value="{{scale}}" min="0" max="{{maxStep}}" step="1" name="costs.{{index}}.scale" data-tooltip="{{localize "DAGGERHEART.ACTIONS.Settings.cost.stepTooltip" step=step}}" data-tooltip-direction="UP">
{{else}}
<div></div>
{{/if}} {{/if}}
<label class="modifier-label">{{total}}/{{max}}</label> <label class="modifier-label">{{total}}/{{max}}</label>
</li> </li>