lobsters/lobsters

replace 'opacity' in CSS

Open

#2,032 建立於 2026年5月28日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Ruby (961 fork)user submission
bugdesigngood first issue

倉庫指標

Star
 (4,680 star)
PR 合併指標
 (平均合併 6天 5小時) (30 天內合併 24 個 PR)

描述

In the CSS we use opacity to gray out stories and comments with negative scores. This has prompted recurring bugs over the years because opacity creates a stacking context, sometimes child elements like the popups for caches and flags appear under other elements. And then those inherit the opacity so they're hard to see. (These two bugs have recurred roughly annually for the life of the site.)

We have a light and a dark mode, and high contrast modes. This is not a huge matrix of potential colors for this effect. Can we precalculate those values and use the colors directly on the text color attribute? Then we wouldn't have a growing list of :not exclusions on the opacity like #2024.

貢獻者指南