Changing button-color for changing source-view to preview-view

What I’m trying to do

The button, with which source-view and preview-view can be switched, can be colored in principle, also by hover.
I would like to know if and how a “two-color” design, depending on the view status, can be achieved; e.g. “pencil-symbol” in yellow and “book-symbol” in orange.

Things I have tried

On my question was not answered in appearance in discord at all, not even in the sense of does not go or a bug.

Couldn’t find any on discord, here on the forum or internet either, though it’s hard to make it browser friendly.

Use the following CSS snippet:

*[data-mode='source'] .view-action:first-child {
    background-color: orange;
}
*[data-mode='preview'] .view-action:first-child {
    background-color: yellow;
}
1 Like

Thank you very much for your help. I then omitted “background” and set the colors to hex values individually - everything perfect.

I am not a programmer, everything worked out by myself - therefore no reference to the *-selector and attributes,
if I understand it right, a “value assignment” is done with data.
I will still deal with it (e.g. at mdn).

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.