contao-themes-net / nature-theme-bundle

nature theme bundle for contao cms
Other
7 stars 2 forks source link

`has-text-dark` not working for headlines in dark mode #71

Closed simonla82 closed 1 year ago

simonla82 commented 1 year ago

Bug description

When assigning the CSS-class has-text-black (or in general, any has-text-*) to an article, headlines in that article do not receive that color when the page is in darkmode, but instead are displayed in the default dark mode headline color. This is problematic if it is used in combination of a light color for this article's background color.

Steps to reproduce

  1. Create an article and assign the class has-text-black to it
  2. Create a content element that has a headline in that article
  3. View the page in dark mode

grafik

The root cause of this issue seems to be that the h2 color CSS rule in nature_dark_mode.scss takes precedence over the has-text-black rule, as one can see below:

grafik

Expected behavior

I would expect has-text-* and has-background-* classes to consistently influence all elements they are applied to, independent of dark or light mode.

Environment

seibtph commented 1 year ago

Fixed in version 2.2.1 (contao 5) and 1.11.2 (contao 4).