fixes styling in merchant sheet

pull/65/head
macniel 2025-11-16 10:18:02 +01:00
parent d355cb2d5c
commit 189db593aa
8 changed files with 62 additions and 25 deletions

View File

@ -0,0 +1,27 @@
@use "./colours";
@mixin raised_button {
background: rgba(0, 0, 0, 0.05);
border: 1px solid #ccc;
box-shadow: 1px 1px 1px #ccc;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
}
@mixin uncut_raised_button {
@include raised_button;
border-radius: 8px;
button {
background: unset;
border: unset;
box-shadow: unset;
color: black;
&:hover {
color: black;
}
@include colours.highlight;
}
}

View File

@ -83,4 +83,12 @@ $special-action: rgba(68, 34, 204, 0.8);
$special-action-color: #000; $special-action-color: #000;
@mixin highlight {
&:hover {
text-shadow: 0 0 10px red;
}
}
@mixin svg-highlight {
filter: drop-shadow(0px 0px 10px rgb(255 0 0));
}

View File

@ -1,4 +1,5 @@
@use "../atoms/assets"; @use "../atoms/assets";
@use "../atoms/colours" as colour;
@mixin equipment($darkmode: false) { @mixin equipment($darkmode: false) {
position: relative; position: relative;
@ -44,7 +45,7 @@
&:hover { &:hover {
.name { .name {
text-shadow: 0 0 10px rgb(255 0 0); @include colour.highlight;
} }
border: 1px solid #ccc; border: 1px solid #ccc;

View File

@ -221,8 +221,8 @@ $deity_colours_tint: (
} }
} }
.clickable:hover { .clickable {
text-shadow: 0 0 10px rgb(255 0 0); @include colour.highlight;
} }
} }

View File

@ -2,6 +2,7 @@
@use 'sass:map'; @use 'sass:map';
@use "../atoms/colours" as colour; @use "../atoms/colours" as colour;
@use "../atoms/numbers" as numbers; @use "../atoms/numbers" as numbers;
@use "../atoms/buttons";
$rollable_colours: ( $rollable_colours: (
"nachteil": colour.$nachteil-color, "nachteil": colour.$nachteil-color,
@ -148,9 +149,7 @@ $rollable_colours_font: (
bottom: 8px; bottom: 8px;
z-index: 3; z-index: 3;
&:hover { @include colour.highlight;
text-shadow: 0 0 10px rgb(255 0 0);
}
} }
} }
@ -159,7 +158,7 @@ $rollable_colours_font: (
.die:hover { .die:hover {
svg { svg {
filter: drop-shadow(0px 0px 10px rgb(255 0 0)); @include colour.svg-highlight;
} }
@ -195,11 +194,7 @@ $rollable_colours_font: (
.container { .container {
// background-image: linear-gradient(to right, rgba($color, numbers.$start_gradient), rgba($color, numbers.$end_gradient)); // background-image: linear-gradient(to right, rgba($color, numbers.$start_gradient), rgba($color, numbers.$end_gradient));
background: rgba(0, 0, 0, 0.05); @include buttons.raised_button;
border: 1px solid #ccc;
box-shadow: 1px 1px 1px #ccc;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
} }
} }
} }

View File

@ -1,3 +1,5 @@
@use "../atoms/colours" as colour;
.application.sheet.dsa41.actor.group { .application.sheet.dsa41.actor.group {
.sheet-header { .sheet-header {
@ -30,8 +32,8 @@
} }
} }
.rollable:hover { .rollable {
text-shadow: 0 0 10px rgb(255 0 0); @include colour.highlight;
} }
.character { .character {
@ -131,9 +133,7 @@
display: inline-block; display: inline-block;
padding: 0 4px; padding: 0 4px;
&:hover { @include colour.highlight;
text-shadow: 0 0 10px rgb(255 0 0);
}
} }
} }
} }
@ -168,7 +168,7 @@
&:hover { &:hover {
.item-name { .item-name {
text-shadow: 0 0 10px rgb(255 0 0); @include colour.highlight;
} }
} }
} }

View File

@ -1,3 +1,6 @@
@use "../atoms/buttons";
.dsa41.actor.merchant { .dsa41.actor.merchant {
.tab.goods.active { .tab.goods.active {
@ -22,9 +25,12 @@
overflow-y: auto; overflow-y: auto;
.merchant-good { .merchant-good {
@include buttons.uncut_raised_button;
width: 100%; width: 100%;
display: grid; display: grid;
break-inside: avoid; break-inside: avoid;
grid-template-columns: 32px 1fr 32px; grid-template-columns: 32px 1fr 32px;
grid-template-rows: 16px 16px; grid-template-rows: 16px 16px;
grid-template-areas: "img title options" "img price options"; grid-template-areas: "img title options" "img price options";
@ -39,6 +45,7 @@
button { button {
grid-area: options; grid-area: options;
height: 100%;
} }
.price { .price {
@ -57,12 +64,7 @@
overflow-y: auto; overflow-y: auto;
.service { .service {
@include buttons.uncut_raised_button;
border: 1px inset rgba(0, 0, 0, 1);
background-color: rgba(0, 0, 0, 0.2);
border-radius: 4px;
padding: 4px;
margin: 4px 0;
display: grid; display: grid;
grid-template-columns: 32px 1fr 32px; grid-template-columns: 32px 1fr 32px;
@ -105,6 +107,9 @@
} }
&.infinite { &.infinite {
width: 32px;
bottom: -2px;
&::before { &::before {
content: ''; content: '';
} }

View File

@ -40,7 +40,8 @@
<span class="name">{{this.name}}</span> <span class="name">{{this.name}}</span>
<span class="price">{{currency this.price}}</span> <span class="price">{{currency this.price}}</span>
<span class="availability {{#if <span class="availability {{#if
(lte this.availability 0)}}infinite{{/if}}">{{this.availability}}</span> (lte this.availability 0)}}infinite{{/if}}">{{#unless
(lte this.availability 0)}}{{this.availability}}{{/unless}}</span>
<button class="actions"><i class="fa-solid fa-coins"></i></button> <button class="actions"><i class="fa-solid fa-coins"></i></button>
</div> </div>
{{/if}} {{/if}}