[IMP] spreadsheet: implement dark mode for UI #7362
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Description:
[IMP] spreadsheet: implement dark mode for UI
This commit implements a dark mode for spreadsheet for the whole UI,
excluding the canvas and the figures.
It is mostly implemented using the
light-dark()CSS function, whichallows to define colors for both light and dark modes. The style
color-scheme: dark/lightis set on the main spreadsheet componentbased on its props.
Some notes/limitations:
colors were simply a bit tweaked to look okay in both modes. Having them
change based on the mode would be hard mostly because we need to sync
the token colors with the highlight colors, but the highlight are drawn
on the canvas, which does not support
light-dark().be white instead of dark-gray, but they are not in odoo. That means
that we have mostly invisible shadows in dark mode, and need to add
a border to the popover to separate it from the background.
[REF] composer: use opacity rather than color alpha
For the dark mode, we will start using colors using
light-dark()CSSvariables. Those colors do not work with the
toHexmethod.To prepare for this change:
[FIX] demo: log something when catching global errors
We have a external listener listening on
window.error, but we don'tlog anything when catching an error.
Task: 5082659
review checklist