Skip to content

Commit 28330eb

Browse files
author
iosip
committed
Polish roll card presentation
1 parent 92fae8f commit 28330eb

6 files changed

Lines changed: 83 additions & 37 deletions

File tree

src/styles/partials/_controls.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
display: flex;
3535
flex-wrap: wrap;
3636
justify-content: flex-end;
37+
width: 2rem;
3738
gap: 0.5rem;
3839

3940
input {
@@ -80,8 +81,10 @@
8081
}
8182

8283
&--compact {
83-
min-width: 2rem;
84-
padding: 0 0.2rem;
84+
padding: 0;
85+
height: 1.5rem;
86+
min-width: 1.5rem;
87+
min-height: 1.5rem;
8588
}
8689
}
8790

src/styles/partials/_rolls.scss

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@
3939
padding: 0.8rem 0.9rem;
4040
}
4141

42+
&__summary {
43+
strong {
44+
color: inherit;
45+
}
46+
47+
&--success {
48+
background: rgb(219 233 221 / 72%);
49+
color: var(--yd-success-player);
50+
}
51+
52+
&--failure {
53+
background: rgb(241 216 211 / 72%);
54+
color: var(--yd-success-pain);
55+
}
56+
}
57+
4258
&__snap-effect {
4359
background: rgb(176 28 46 / 10%);
4460
border: 1px solid rgb(176 28 46 / 26%);
@@ -89,13 +105,31 @@
89105
min-width: 0;
90106
}
91107

108+
&__header {
109+
align-items: baseline;
110+
display: flex;
111+
flex-wrap: wrap;
112+
gap: 0.35rem;
113+
}
114+
92115
&__result {
93116
align-items: center;
94117
display: flex;
95118
flex-wrap: wrap;
96119
gap: 0.45rem;
97120
}
98121

122+
&__adjustments {
123+
align-self: stretch;
124+
display: grid;
125+
gap: 0.35rem;
126+
justify-items: end;
127+
128+
.yakov-dryh-button {
129+
width: 1.5rem;
130+
}
131+
}
132+
99133
&__dice {
100134
align-items: center;
101135
display: flex;
@@ -170,23 +204,14 @@
170204
}
171205

172206
&__successes {
173-
align-items: center;
174-
color: var(--yd-muted);
175207
display: inline-flex;
176-
font-size: 0.95rem;
177208
font-weight: 700;
178-
gap: 0.35rem;
179-
letter-spacing: 0.02em;
180209
white-space: nowrap;
181210
}
182211

183212
&__successes-count {
184213
color: var(--yd-success-player);
185-
font-size: large;
186-
}
187-
188-
&__arrow {
189-
font-size: 0.8em;
214+
font-size: 1.05rem;
190215
}
191216

192217
&--exhaustion {

src/styles/partials/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
--yd-stress-madness-border: #825264;
3838

3939
--yd-shadow: 0 14px 30px rgb(33 22 30 / 12%);
40-
--yd-round-shadow: radial-gradient(60% 60% at 40% 40%, #898073 0%, #473b2e 100%);
40+
--yd-round-shadow: radial-gradient(60% 60% at 40% 40%, #474361 0%, #0a0912 100%);
4141
--yd-pip-discipline: #fffdf8;
4242
--yd-pip-inactive: #a89d95;
4343

styles/yakov-dryh.css

Lines changed: 33 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

styles/yakov-dryh.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/chat/roll-card.hbs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
<article class="yakov-dryh-chat-card yakov-dryh-roll-card {{#if isFinal}}yakov-dryh-roll-card--final{{/if}}">
22
<header class="yakov-dryh-header">
33
<h3 class="m0">{{stageLabel}}</h3>
4-
5-
{{#if showOutcome}}
6-
<span class="yakov-dryh-status yakov-dryh-status--{{rollResult.outcome}}">{{outcomeLabel}}</span>
7-
{{/if}}
84
</header>
95

106
<div class="yakov-dryh-chat-card__body">
117
{{#if showOutcome}}
12-
<p class="yakov-dryh-roll-card__summary m0">
8+
<p class="yakov-dryh-roll-card__summary yakov-dryh-roll-card__summary--{{rollResult.outcome}} m0">
139
{{localize "YAKOV_DRYH.ROLL.Chat.Successes"}}
1410
{{rollResult.successes.player}}
1511
vs
@@ -23,7 +19,12 @@
2319
{{#each poolSummaries}}
2420
<section class="yakov-dryh-roll-pool {{cssClass}}">
2521
<div class="yakov-dryh-roll-pool__content">
26-
<strong>{{label}}</strong>
22+
<div class="yakov-dryh-roll-pool__header">
23+
<strong>{{label}}:</strong>
24+
<span class="yakov-dryh-roll-pool__successes">
25+
<span class="yakov-dryh-roll-pool__successes-count">{{successes}}</span>
26+
</span>
27+
</div>
2728
<div class="yakov-dryh-roll-pool__result">
2829
{{#if hasDice}}
2930
<div class="yakov-dryh-roll-pool__dice" aria-label="{{label}}">
@@ -40,15 +41,11 @@
4041
{{else}}
4142
<span class="yakov-dryh-copy">-</span>
4243
{{/if}}
43-
<span class="yakov-dryh-roll-pool__successes">
44-
<i class="fa-solid fa-arrow-right yakov-dryh-roll-pool__arrow" aria-hidden="true"></i>
45-
<span class="yakov-dryh-roll-pool__successes-count">{{successes}}</span>
46-
</span>
4744
</div>
4845
</div>
4946

5047
{{#if ../showAdjustments}}
51-
<div class="yakov-dryh-inline-actions mt075">
48+
<div class="yakov-dryh-inline-actions yakov-dryh-roll-pool__adjustments mt075">
5249
<button
5350
class="yakov-dryh-button yakov-dryh-button--secondary yakov-dryh-button--compact"
5451
type="button"

0 commit comments

Comments
 (0)