krassowski / Anki-Night-Mode

Enabling studying at night with Anki - without eye strain
https://ankiweb.net/shared/info/1496166067
GNU General Public License v3.0
72 stars 13 forks source link

Cloze Deletion answers unreadable colour, .cloze CSS selector broken #54

Closed mangelozzi closed 6 years ago

mangelozzi commented 6 years ago

Problem description

The close deletion answer is a dark blue on a black background. I cannot read it on my screen. CSS selectors for cloze deletion answers not longer work with night mode installed, i.e.:

.cloze, .nightMode .cloze { color: #00FF00 !important; }**

* { color: #00FF00 !important; } /This styles everything EXCEPT the cloze deletion answers in night mode, in normal mode they are affected /**

Checklist

Please put x inside brackets if following sentences apply to you:

Information about your Anki Setup

Please open Anki, go to Help → About, look-up two lines, starting with Version: and Qt and copy-paste them below:

Version: Version 2.1.5
Qt: Qt 5.9.2 PyQt 5.9

Please got to Night Mode → About now and copy-paste the first line from the pop-up window below:

Night Mode x.x.x (uninstalled now but was the latest)

Please fill in your OS details (Linux/Mac/Windows):

OS: Windows 10

If you have a compatibility problem with a specific add-on or add-ons, please paste the add-on page links below:

Backtrace (if any)

*If you had an error which resulted in producing exception with a backtrace, please paste the backtrace below:* ```python" [paste your backtrace in here if you got any; otherwise feel free to remove this part] ```
krassowski commented 6 years ago

Hi Michael,

let me explain why it does not work for you: the correct class name for this add-on (as described in the README file) is .night_mode, while you are using .nightMode.

Please, see the code and screenshot below:

.night_mode .cloze {
 color: red!important;
}

screenshot from 2018-12-02 11-52-57

Also, if you used .night_mode * selector, this would work for you as well. In simpler terms cloze deletion is not broken - it only requires higher specificity, and you have incidentally used the wrong class name. Please let me know if everything works for you now. If you would like to lower the specificity required, please feel free to send PR, we can discuss the pros and cons then.