Skip to content

load material icons, rank from one, gate the skill row - #206

Open
nmbradley wants to merge 3 commits into
1e-mainfrom
1e/rolltemplate-icons-and-verdict
Open

load material icons, rank from one, gate the skill row#206
nmbradley wants to merge 3 commits into
1e-mainfrom
1e/rolltemplate-icons-and-verdict

Conversation

@nmbradley

@nmbradley nmbradley commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Four fixes to the adopted roll template.

The word "adjust" instead of a bullseye

The design replaces the Target/Damage label with a Material ligature:

.sheet-ms-readout__label::before {
  content: "adjust";
  font-family: "Material Symbols Outlined", "Material Icons";
}

Nothing imported that family, so the literal ligature name rendered. Material Symbols is a variable font and cannot come through Roll20's CSS-1 import, which the chat parser requires — so legacy Material Icons is added to the existing import instead. The SCSS already lists it as the fallback, so the declaration is unchanged:

family=Archivo:400,700,800,900|IBM+Plex+Mono:400|Material+Icons&display=swap

An empty verdict pill on cards that have no verdict

RANKS started at 0, and a card that sets no rank at all — an alert, a damage roll, an armour-destroyed notice — leaves the placeholder reading 0. The verdict block testing rank 0 matched it and printed an empty Critical Failure pill.

Ranks now run 1–4, so "no rank" matches nothing and those cards show no verdict at all.

The Skill row reading "0"

Same root cause one field over. {{#computed::skill}} is a section test, which reads the original roll — always truthy for a [[0]] placeholder — so the row rendered on every card, printing the placeholder where no skill was set. It is now gated by a hasskill flag tested with rollTotal, the same pattern hasnotes already uses.

Smaller title, and one real defect behind it

The title slab now takes --ms-text-lg rather than --ms-text-xl.

While changing it: the adoption had left three separate .sheet-ms-roll blocks overriding one another, so the height and padding that actually applied were whichever happened to come last — height: auto beat the design's fixed --ms-roll-h, which is part of why the advantage layout looked wrong. Merged into one block that keeps the intended fixed height.

345 tests, tsc, eslint, stylelint clean.


Follow-up: the roll box

  • Square. Set through --ms-roll-h: var(--ms-roll-w) rather than aspect-ratio, because the target footer is positioned by calc(var(--ms-roll-h) + …) and has to follow the box — an aspect-ratio with no explicit height would have left the footer floating at the old offset.
  • The discarded die moved beneath the result. The two dice shared one grid cell (grid-area: 1 / 1) with the spent one absolutely positioned into the corner, where it collided with the target readout. They now flow as rows, ordered so the counted die is first and the struck-out one sits under it.
  • Accent ring removed from the counted die. The strike-through already distinguishes them, and an accent outline read as an error state rather than an edge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant