Just an idea, but are you, by any chance, using any high contrast themes in Windows? Those will override any custom styles like that. Also, can you post a screenshot showing the whole Joplin window with the non-functional code?