ZeroXNoxus / dark-mode-5e

2 stars 0 forks source link

Request for assistance with helping Dark Mode 5e and Tidy 5e Sheets coexist #5

Closed kgar closed 5 months ago

kgar commented 5 months ago

Hello, I am the author of the Tidy 5e Sheets rewrite, and I have a request from a user to help with some CSS overlap between our modules.

Tidy 5e Sheets have dark/light mode handling of their own, and there is some custom theming also. With default settings in Tidy's dark mode, it normally looks like this:

image

With dark mode 5e turned on, it changes somewhat:

image

Likewise, here is my sheet's light mode:

image

Then with the module engaged:

image

For now, the user is going in and deleting the styles in the dark mode CSS that affect the New Tidy sheets.

Is there any possibility of updating dark mode to somehow ignore sheets that are not officially supported in the dark mode 5e module? I saw specific sheet support in the CSS, so this request is mostly about the wide open styles that target the majority of the DOM, like the input backgrounds.

ZeroXNoxus commented 5 months ago

Sure thing, this shouldn't be a problem. I have already taken note of the issue myself and this in my To-Do list, but I had worked in the "Only Sheet" Module in the recent days. I work on this issue asap. Thanks for the analysis!

kgar commented 5 months ago

🙏 Thank you very much!

ZeroXNoxus commented 5 months ago

I have edited my CSS files (I really need to refactor the stylings... badly xD) and all specific sheet stylings should now be excluded for Tidy5e. If another styling is present in the sheet, you can let me know, though these shouldn't be in a conflict with the Tidy5e sheets.

Thanks for using my module and have a nice day! ❤️

kgar commented 5 months ago

Some more info:

Currently, Old Tidy and New Tidy are able to be used side-by-side while I finish compatibility efforts, so our sheet classes differ. Old Tidy uses the .tidy5e class. So any styles targeting or specifically avoiding .tidy5e will not affect New Tidy sheets.

New Tidy uses an attribute to denote any sheet that comes from the new Tidy 5e Sheets module. Here is the selector: [data-sheet-module="tidy5e-sheet"]

kgar commented 5 months ago

Thank you again for taking the time to help me with this.

I test-drove it, and I still get the dark inputs:

image

Would it be possible to try excluding styles for [data-sheet-module="tidy5e-sheet"]?

If you want to see my sheets in action, they are available at this repo: https://github.com/kgar/foundry-vtt-tidy-5e-sheets Module JSON: https://github.com/kgar/foundry-vtt-tidy-5e-sheets/releases/latest/download/module.json

One day, it'll just be New Tidy out there. Before I overtake the official Package in Foundry, I have a few more things to iron out over the next few months. It may coincide with Foundry 12 coming out, possibly? I'm hopeful.

ZeroXNoxus commented 5 months ago

Alright, thanks for the heads-up. I'll add the data-selector as an exclusion, which should resolve the issue. I'll let you know when you can test this again!

Thanks by the way for building Tidy5e, we have recently started to use Tidy5e and, while taking some time to getting used to it, it works wonderfully for us. If I can provide anything that helps you, I'd be honored. Cheers!

kgar commented 5 months ago

When I first discovered Tidy 5e, I was a big fan. As I learned, the original author had stepped down after a while, and a solid contributor took over as maintainer and made a lot of awesome upgrades to it. However, for a variety of reasons, it entered minimal maintenance mode. When I learned that it was going into minimal maintenance mode, I was very worried, because I really liked the sheets. So, I learned Foundry dev and started on the rewrite about 7 months ago. I've learned a lot along the way, and there's a lot more for me to learn, that's for sure. I selfishly want the sheets to live on for my players at my games, but a whole community of interested folks have gathered around the continuing development of the sheets, which has been really cool. If you're ever interested in checking out the discord community, there's an invite link in the repo readme.

ZeroXNoxus commented 5 months ago

@kgar FYI - The next release will exclude "[data-sheet-module="tidy5e-sheet"]" from dark mode styling. I was thinking, though: should I enable Tidy5e Sheet dark mode automatically when my module enables the dark mode?

kgar commented 5 months ago

That's great news!

If you would like to change the Tidy theme when toggling dark mode, I can provide some API functionality for that, to make it resilient to changes within Tidy.

It'd really be a question for the Dark Mode user base, I think. If you ever want to utilize the Tidy community, there's a Tidy discord invite on my repo readme. I can make a dedicated forum thread for you to poll users for feedback.