javalent / fantasy-statblocks

Create Dungeons and Dragons style statblocks for Obsidian.md
MIT License
341 stars 71 forks source link

refactor(css): seperate active-heading-font-color from active-font-color #366

Closed natowb closed 4 months ago

natowb commented 4 months ago

Pull Request Description

Currently working on adding support for this plugin with my theme and stumbled into this issue. statblocks sets a css variable called ---statblock-heading-font-color however it doesn't seem to be used when settting the --active--heading-font-color

we don't lose any existing functionality or break existing styles as --statblock-heading-font-color defaults to --statblock-font-color which defaults to --statblock-primary-color. this mimics the functionality that --active-font-color has as well.

src/main.css

--statblock-primary-color: #7a200d;
[ ... ]
--statblock-font-color: var(--statblock-primary-color);
[ ... ]
--statblock-heading-font-color: var(--statblock-font-color);

src/view/Statblock.svelte

--active--font-color: var(
    --statblock-font-color,
    --active--primary-color
);

Changes Proposed

Related Issues

N/A

Checklist

Screenshots (if applicable)

if i set --statblock-heading-font-color to #00c2a8 I would expect the heading to change color.

Current With Changes
current-behaviour new-behavior

Additional Notes

N/A