fix: Sticky header transparent background (#11501)

fix: Custom header color incorrect text color
This commit is contained in:
Tom Moor
2026-02-19 21:15:07 -05:00
committed by GitHub
parent 758d2b62f5
commit dfd969084b
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -1954,8 +1954,10 @@ table {
padding: 4px 0;
}
td[data-bgcolor] {
td[data-bgcolor],
th[data-bgcolor] {
color: var(--cell-text-color);
background: linear-gradient(var(--cell-bg-color), var(--cell-bg-color)), linear-gradient(${props.theme.background}, ${props.theme.background});
p, a, p a {
color: var(--cell-text-color, inherit);
@@ -2287,7 +2289,7 @@ table {
}
.${EditorStyleHelper.tableStickyHeader} {
th {
tr:first-child th {
transform: translateY(calc(var(--header-offset, 64px) + var(--sticky-scroll-offset, 0px)));
border-bottom: 1px solid ${props.theme.divider};
+1 -1
View File
@@ -90,7 +90,7 @@ export function setCellAttrs(node: Node): Attrs {
attrs["data-bgcolor"] = backgroundMark.attrs.color;
attrs.style =
(attrs.style ?? "") +
`background-color: ${backgroundMark.attrs.color}; --cell-text-color: ${readableColor(backgroundMark.attrs.color)};`;
`--cell-bg-color: ${backgroundMark.attrs.color}; --cell-text-color: ${readableColor(backgroundMark.attrs.color)};`;
}
}