Skip to content

Commit

Permalink
implement font-size for resources
Browse files Browse the repository at this point in the history
  • Loading branch information
reonZ committed Jul 12, 2024
1 parent 8270bbc commit a201c09
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/hud/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class PF2eHudResources extends PF2eHudBase<ResourcesSettings, ResourcesUserSetti
_replaceHTML(result: string, content: HTMLElement, options: ResourcesRenderOptions) {
content.innerHTML = result;

content.style.setProperty(`--font-size`, `${options.fontSize}px`);
this.element!.style.setProperty(`--font-size`, `${options.fontSize}px`);

this.#activateListeners(content);
}
Expand Down
2 changes: 2 additions & 0 deletions styles/_resources.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
min-width: 0;
box-shadow: none;
border-radius: unset;
font-size: var(--font-size);

.window-header {
pointer-events: none;
background: none;
border: 0;
padding: 0;
flex: 0;
font-size: inherit;

> * {
pointer-events: all;
Expand Down
2 changes: 1 addition & 1 deletion styles/pf2e-hud.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion styles/pf2e-hud.css.map

Large diffs are not rendered by default.

0 comments on commit a201c09

Please sign in to comment.