kenset / obsidian-theme-picker

MIT License
39 stars 4 forks source link

[SUGGESTION] Remove inline `background-color` for `.modal-bg` #19

Open tingmelvin opened 2 years ago

tingmelvin commented 2 years ago

Currently, the Theme Picker sets background-color: transparent inline for the .modal-bg when the theme picker prompt is selected.

image

This overrides (what I presume is new in Obsidian 1.0) the slightly dimmed background from app.css, giving it a different look from most other prompts.

Additionally, I believe .theme-picker-modal { box-shadow: 0px 0px 17px 0px rgb(0 0 0 / 25%); } can also be removed, as .prompt in itself has a box-shadow applied to it.

This would help reduce the complexity for theming for theme devs as well.

kenset commented 2 years ago

The reason I added background-color: transparent is so that you could see the true colors of the theme behind the modal, and so be able to make a selection while browsing themes, instead of having to select one in order to see what the true colors are.

You're right that the box-shadow is redundant -- thank you for the suggestions!

tingmelvin commented 2 years ago

The reason I added background-color: transparent is so that you could see the true colors of the theme behind the modal, and so be able to make a selection while browsing themes, instead of having to select one in order to see what the true colors are.

You're right that the box-shadow is redundant -- thank you for the suggestions!

That's a fair point about the transparency - would it be possible to not make it inline though?

kenset commented 2 years ago

Sure, it should be possible -- are the inline styles getting in the way of something you're doing?

tingmelvin commented 2 years ago

In general, inline styles are a pain for theme devs to override so it's not a great idea for any plugin to have them - personally for my own use-case, I rely on the theme-set background-color to set the modal background and differentiate it from the prompt, which I can override much easily if it isn't inline.