On Wed, 17 Aug 2022 11:38:18 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:
>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css >> line 959: >> >>> 957: } >>> 958: div.page-search-info button#page-search-copy:hover { >>> 959: background-color: rgba(128, 128, 160, 0.2); >> >> why have the old hex values just been converted to `rgba` values, and not >> CSS custom properties? > > One of my intentions was to keep the number of CSS custom properties as small > as possible. I think the hover color of the copy-to-clipboard button (in this > case for the search page extra information) is "fringe" enough to not want to > define a dedicated property for it. > > Using a `rgba` value with a middle-of-the-road blue-grey color and a low > alpha value allows me to generate a semitransparent overlay that works both > with light and dark background colors. The only background color this would > not work with is if the background was itself a medium grey color, but in > this case it could be overridden with a extra CSS rule. mmmm ... OK, but ... _Keep everything as simple as possible, but no simpler_ Yes, there is merit it reducing the number of CSS custom properties, but there is equal merit in a simple rule that says that all colors are set via custom properties. As it stands, we have to explain the (reason for the) exception, ------------- PR: https://git.openjdk.org/jdk/pull/9839