Currently, the module sets a class="dark" attribute on the <html> element while also relying on data attributes (e.g., data-dark-mode-source). This combines two approaches, resulting in redundancy and potential conflicts.
A cleaner, more consistent approach would be to rely solely on a custom data attribute on the <html> element (e.g., `data-dark-mode="dark"` or `data-dark-mode="light"`).
Benefits of using a dedicated data attribute:
dark.<html> element when toggling dark mode.class="dark" attribute is added, rather than a unified data attribute.Replace the use of class="dark" on the <html> element with a single custom data attribute, e.g., <html data-dark-mode="dark"> or <html data-dark-mode="light">
data-dark-mode instead of class="dark".README.md accordingly, instructing users to use the [data-dark-mode="dark"] attribute.No visible UI changes to end users.
Developers inspecting the DOM will see data-dark-mode instead of a dark class attribute.
[data-dark-mode="dark"] instead of .dark.None. No changes will be made to the stored configuration or database schema.
Active
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.