light background colors became semi-transparent in v0.35, making them unreadable when they are stacked on top of other elements

未关闭
#948 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
css
领域
frontend

调研方向

The report compares the generated .bg-azure-lt CSS in versions 0.34 and 0.35, but does not identify the source file or a test. Start by searching the repository for .bg-azure-lt and checking how the light-color variables are defined and generated. Done means determining whether the changed opacity is unintended and documenting or testing the expected behavior for stacked rows.

由索引模型根据 Issue 内容生成。

描述

In my project I use the "Azure" SQLPage color in the last row of my table. I have noticed that there is a difference between behaviour between 0.34 and 0.35:
In 0.34, the css style assigned with my row is

.bg-azure-lt {
  --tblr-bg-opacity: 1;
  --tblr-text-opacity: 1;
  color: rgba(var(--tblr-azure-rgb),var(--tblr-text-opacity)) !important;
  background-color: rgba(var(--tblr-azure-lt-rgb),var(--tblr-bg-opacity)) !important;
}

which gives it a solid background color, while in 0.35 the css style is

.bg-azure-lt {
  color: color-mix(in srgb,var(--tblr-azure) calc(var(--tblr-text-opacity,1) * 100%),transparent) !important;
  background-color: color-mix(in srgb,var(--tblr-azure-lt) calc(var(--tblr-bg-opacity,1) * 100%),transparent) !important;
}

which results in a half-transparent background. Ofc this is irrelevant if the background behind the table row is 100% white, but if the row is sticky, then what happens is that two rows are rendered on top of each other.

I know very little CSS so I cannot understand if this is a bug or a feature... According to Firefox inspector, the --tblr-azure-lt is a color with alpha at 10% (90% transparency), --tblr-azure-lt-rgb is visually the same color but coded in RGB-only, no transparency applied to it.

So, the question is: is it normal that the behavior of the colors changed between 0.34 and 0.35? Is any one of those "correct" or are they both right in their own way?

主要语言
Rust
星标
2.6k
派生
175
平均合并
14 小时 16 分钟
30 天内合并 PR
43

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

sqlpage/SQLPage 的其他 Issue

查看 sqlpage/SQLPage 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。