diff --git a/apps/client/src/features/editor/styles/table.css b/apps/client/src/features/editor/styles/table.css index 7d02ef03..f7e8e399 100644 --- a/apps/client/src/features/editor/styles/table.css +++ b/apps/client/src/features/editor/styles/table.css @@ -38,8 +38,8 @@ th { background-color: light-dark( - var(--mantine-color-gray-1), - var(--mantine-color-dark-5) + var(--mantine-color-gray-1), + var(--mantine-color-dark-5) ); font-weight: bold; text-align: left; @@ -66,8 +66,54 @@ position: absolute; z-index: 2; } - } } +/* Table cell background colors with dark mode support */ +.ProseMirror { + table { + @mixin dark { + /* Blue */ + td[style*="background-color: #b4d5ff"], + th[style*="background-color: #b4d5ff"] { + background-color: #1a3a5c !important; + } + /* Green */ + td[style*="background-color: #acf5d2"], + th[style*="background-color: #acf5d2"] { + background-color: #1a4d3a !important; + } + + /* Yellow */ + td[style*="background-color: #fef1b4"], + th[style*="background-color: #fef1b4"] { + background-color: #7c5014 !important; + } + + /* Red */ + td[style*="background-color: #ffbead"], + th[style*="background-color: #ffbead"] { + background-color: #5c2a23 !important; + } + + /* Pink */ + td[style*="background-color: #ffc7fe"], + th[style*="background-color: #ffc7fe"] { + background-color: #4d2a4d !important; + } + + /* Gray */ + td[style*="background-color: #eaecef"], + th[style*="background-color: #eaecef"] { + background-color: #2a2e33 !important; + } + + /* Purple */ + td[style*="background-color: #c1b7f2"], + th[style*="background-color: #c1b7f2"] { + background-color: #3a2f5c !important; + } + } + } +}