You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For changing between light/dark modes of display texts, each display template has an associated colormap (*.cmap) file in INI format to specify colors for both modes and the CSS file has #PLACEHOLDER# for these colors which are replaced using a separate call to ColorManager::replaceColors() wherever rendering is required.
Consequences
This is useless complexity which makes things difficult for developers and theme designers, because this color map technology must be learnt.
Remediation approach
The colormap files must go, and all the light/dark color logic must be embedded in pure CSS files. One way to do that is to just add a light or dark class to the respective <body> element, and let CSS do the rest of the work.
Notes
After the colormap files were introduced, the color values therein got used for other slightly different purposes as well, but due to the flexibility of CSS we can hopefully expand the use of display templates to those places as well.
The text was updated successfully, but these errors were encountered:
Summary
For changing between light/dark modes of display texts, each display template has an associated colormap (
*.cmap
) file in INI format to specify colors for both modes and the CSS file has#PLACEHOLDER#
for these colors which are replaced using a separate call toColorManager::replaceColors()
wherever rendering is required.Consequences
This is useless complexity which makes things difficult for developers and theme designers, because this color map technology must be learnt.
Remediation approach
The colormap files must go, and all the light/dark color logic must be embedded in pure CSS files. One way to do that is to just add a
light
ordark
class to the respective<body>
element, and let CSS do the rest of the work.Notes
After the colormap files were introduced, the color values therein got used for other slightly different purposes as well, but due to the flexibility of CSS we can hopefully expand the use of display templates to those places as well.
The text was updated successfully, but these errors were encountered: