Link hover color problem

Created on 27 June 2022, almost 3 years ago
Updated 5 May 2024, 12 months ago

Problem/Motivation

A problem seems to exist with the color module.

If the Bartik theme top color is white, e.g. #ffffff, therefore in an user page a link becomes white when flying hover it. It seems not good. The rule seems to be the new link hover color given by color module is the top color one.

According to Drupal users this rule was different in older versions: the link hover color was different and independent from top color. Some investigations shown default Bartik theme colors changes: now in the theme css link hover color and top color are the same. Not before.

The use of white top color by Drupal users should be possible.
The use of non distinct colors in css by theme designers should be possible.
Therefore the problem is properly from color module.

Steps to reproduce

With Bartik theme, 9.4.1., in the form admin/appearance/settings/bartik, set top color to white with #ffffff value.
Save the configuration.
In an user page fly hover a link.

Proposed resolution

The color module recalculates the theme css colors. The origin of this behavior seem to be in the fact that if a color does not exist in the default value form the color module calculates the new value by interpolate. Whereas if the value exists the new value is got with a map, given by default/old values and the theme form ones as new one.

The color module considers different types for html object: base, text and link. The problem may come because a new color is determining by mapping without takes this type into account. Therefore a link color could correspond to a base top color. Thus a solution may be to map colors only between same types, or to always interpolate not base type colors.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

color.module

Created by

🇫🇷France Chris64 France

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024