mirror of
https://github.com/docmost/docmost.git
synced 2026-08-24 03:42:16 +10:00
fix: arbitrary colors in dark mode
This commit is contained in:
@@ -86,6 +86,16 @@
|
|||||||
.ProseMirror {
|
.ProseMirror {
|
||||||
table {
|
table {
|
||||||
@mixin dark {
|
@mixin dark {
|
||||||
|
/* Arbitrary (imported) colors: derive a dark variant; the hand-tuned
|
||||||
|
palette rules below override this for native colors. */
|
||||||
|
td[data-background-color],
|
||||||
|
th[data-background-color] {
|
||||||
|
background-color: oklch(
|
||||||
|
from var(--cell-bg, #fff) min(l, clamp(0.28, calc(1.22 - l), 0.45))
|
||||||
|
min(calc(c * 1.8), 0.09) h
|
||||||
|
) !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Blue */
|
/* Blue */
|
||||||
td[data-background-color="#b4d5ff"],
|
td[data-background-color="#b4d5ff"],
|
||||||
th[data-background-color="#b4d5ff"] {
|
th[data-background-color="#b4d5ff"] {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export const TableCell = TiptapTableCell.extend({
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
style: `background-color: ${attributes.backgroundColor}`,
|
style: `background-color: ${attributes.backgroundColor}; --cell-bg: ${attributes.backgroundColor}`,
|
||||||
"data-background-color": attributes.backgroundColor,
|
"data-background-color": attributes.backgroundColor,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export const TableHeader = TiptapTableHeader.extend({
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
style: `background-color: ${attributes.backgroundColor}`,
|
style: `background-color: ${attributes.backgroundColor}; --cell-bg: ${attributes.backgroundColor}`,
|
||||||
"data-background-color": attributes.backgroundColor,
|
"data-background-color": attributes.backgroundColor,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user