HD Quiz

HD Quiz Plugin – Issue with Dark Theme Compatibility

Published: December 5, 2024
Support status: closed

Dear HD Quiz Support Team,

I am using the HD Quiz plugin on my website, and I’ve noticed an issue when users view the site in dark mode. Specifically, the quiz result text becomes almost unreadable due to insufficient contrast between the text color and the background color (a screenshot is attached for reference). This negatively impacts the user experience.

I’ve tried to resolve the issue by making adjustments to the CSS, but I haven’t been able to fully fix the problem. I would greatly appreciate your assistance in addressing this issue. If you could provide guidance on how to implement proper dark theme compatibility or suggest a solution, it would be immensely helpful.

Thank you in advance for your time and support.

thread author: LittNews

Hi LittNews,
HD Quiz inherits font colours from your site, and when your site toggles dark mode, it sets colours to white.

Taking a look at your site, it looks like the dark/light mode toggle your site uses a custom data attribute data-scheme on the body class to denote the active theme.

The dark theme specifically sets data-scheme="dark".

You can use this create custom CSS styles only for the dark theme.

body[data-scheme="dark"] .hdq_results_wrapper, body[data-scheme="dark"] .hdq_results_wrapper * {color:#000000 !important}

The above CSS will set the results and all subelements to use a black font colour.

05 December 2024 — 10:30 support admin - Dylan

I added the code in WP > Appearance > Customize > Additional CSS, and it worked on the desktop, but it still isn’t fixed on mobile. Could you please assist me with this issue?

05 December 2024 — 10:41 thread author - LittNews

clear your browser cache

05 December 2024 — 10:42 support admin - Dylan

Unfortunately, it still didn’t work.

05 December 2024 — 11:20 thread author - LittNews

If you haven’t already, make sure to clear out your site cache (looks like you are using litespeed) as well. If it works on desktop but not mobile, it’s probably because you are logged in and seeing the non cached version.

05 December 2024 — 11:28 support admin - Dylan

Respond to thread

This thread has been closed / marked as resolved.
You can reply to this thread, but it might be better to start a new thread if you need help
.

You can also upload images to imgur and paste the links here. Just make sure that your images don't include any sensitive information.

Submit