ironmonk88 / monks-enhanced-journal

GNU General Public License v3.0
53 stars 54 forks source link

[BUG] Sidebar Folder Text Color #374

Closed Crowguard closed 1 year ago

Crowguard commented 2 years ago

The text color and folder icon are a dark grey now and harder to see with custom folder colors. image

V9

image

V10

image

D&D 5e 2.0.3 Foundry 10.286 MEJ 10.1

Crowguard commented 2 years ago

Closing this. It seems to have solved itself with the newest Foundry update.

Crowguard commented 2 years ago

Nevermind. I just checked the wrong folders.

Truncated commented 2 years ago

It's still a problem with v10.3 and Foundry 10.288 (Pathfinder 1e in my case).

The folders can have backgrounds set, but not font color set.

MEJ side-bar on left, docked journal bar on right image

In v10 right now, you cannot modify the font color but you can modify the background color. Given that Foundry sets it as white throughout, users will set background colors to be readable vs. white. Having the same background deal for both is nearly impossible, from a usability standpoint.

In a perfect world, the text would be programmed to use conditional CSS to detect the background and provide a high-contrast font color globally. https://css-tricks.com/switch-font-color-for-different-backgrounds-with-css/ https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html https://www.msfw.com/Services/ContrastRatioCalculator

If the point of changing color is to show that a folder is opened or closed, perhaps instead using div-box outlines, bolding and/or italics on the labels would be more effective and less likely to become contrast issues regardless of the colors used.

The approach above should make it pretty future-proof, regardless of how styling goes for core foundry and 3rd party styling.

Truncated commented 1 year ago

Had a chance to dig into this some more, found it's due to the style.css for Foundry - the collapsed style for h3 has "color: inherit", which is blocking the normal non-collapsed color that usually gets inherited which implements the variable contrastI was mentioning above.

I made a bug entry for Foundry; hopefully they will just fix it there and it will magically resolve itself. https://github.com/foundryvtt/foundryvtt/issues/8538

ironmonk88 commented 1 year ago

Honestly... folders should allow for the font colour to be changed. Not just the background colour. Since, in Foundry, if you use a really light colour for the folder the text will be hard to read.

ironmonk88 commented 1 year ago

That actually looks like an introduced bug. It should have been switching the colour when the folder colour changed... but I guess it got dropped off during an update. Restored the code and it should be working now.