JustOff / advanced-night-mode

Advanced Night Mode
https://justoff.github.io
20 stars 2 forks source link

Icon on dark theme #12

Open rn2208 opened 5 years ago

rn2208 commented 5 years ago

Hello! Icon addon not visible in dark themes. It's not critical, but still a little annoying. In "Toolbarize Menu Button" you can choose the color of the button, and "Reader mode" is suitable for any theme. In the picture. Adwaita dark theme.

  1. Like looks in normal condition.

  2. Mouse over.

  3. How does reader mode of the same theme.

darkmode

Everything else is fine.

JustOff commented 5 years ago

What is the dark theme on your examples?

rn2208 commented 5 years ago

Adwaita-dark

JustOff commented 5 years ago

Oh, that seems to be a Linux-specific issue. Sorry, but I'm afraid that it will be difficult for me to reproduce the necessary environment to deal with this.

Perhaps @Lootyhoof or @FranklinDM will be so kind as to advise a css-rule for fixing this glitch?

rn2208 commented 5 years ago

If this is ever fixed it will be great.

Lootyhoof commented 5 years ago

Dark toolbars (including both dark personas and dark system themes) emit the property brighttext on the toolbar in question. So, you could for example do:

toolbar[brighttext]  #button-id-here {
  list-style-image: url("chrome://whatever");
}

This will force the button to use whatever icon you set whenever the toolbar is dark (for whatever reason it may be dark). It will revert to the normal styling for when the toolbar is not dark.

Lootyhoof commented 5 years ago

Alternatively, to save creating new icons each time it's also possible to just invert the current one:

toolbar[brighttext] #button-id-here .toolbarbutton-icon {
  filter: invert(1);
}

Of course replacing #button-id-here with your button ID (which looks to be generated on-the-fly from what it seems).

JustOff commented 5 years ago

@Lootyhoof, thank you very much for the tips!

@rn2208, please try advanced-night-mode-1.0.10b1.xpi

rn2208 commented 5 years ago

As you can see the problem is solved by 50 %.

darkmode

Perhaps it is better to use different icons to display the status. For example, a light bulb on and off(included with strokes around)

JustOff commented 5 years ago

As you can see the problem is solved by 50 %.

Try advanced-night-mode-1.0.10b2.xpi.

rn2208 commented 5 years ago

That's right. My star for you.

rn2208 commented 5 years ago

By the same principle, changes to the Global Preferences tab are required.

darkmode

JustOff commented 5 years ago

Try advanced-night-mode-1.0.10b3.xpi.

rn2208 commented 5 years ago

Now it's just like I wanted.

darkmode