Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Investigation] Darkmode for source components #9333

Open
sophie-macmillan opened this issue Oct 26, 2023 · 0 comments
Open

[Investigation] Darkmode for source components #9333

sophie-macmillan opened this issue Oct 26, 2023 · 0 comments
Milestone

Comments

@sophie-macmillan
Copy link
Contributor

sophie-macmillan commented Oct 26, 2023

The way AR did dark mode made it possible to only override source component styling for in dark mode (e.g in ClickToView, we only add button styles for darkmode

In DCR we require both light and dark colour definitions.

This means for ClickToView in DCR when we overrode the values for dark mode, we also had to override the values for light mode.

This was fine for the button, as the light palette was exposed from source, so if that ever updates in source, we should get the updated values in DCR.

However for other source components we might not get that benefit if the colours haven't been exported.
We could also end up with a lot of unnecessary duplication as we could feasibly end up redefining the light mode colours for a lot of the source components.

We should think about this, and decide if we're ok with the duplication, or if there are any other solutions

This was referenced Oct 26, 2023
@mxdvl mxdvl added this to the Health milestone Oct 26, 2023
mxdvl added a commit to guardian/csnx that referenced this issue Nov 30, 2023
## What are you changing?

- Refactor `Tabs` so it receives an optional `theme` object which is
used to define relevant custom properties which drive the colour of the
component
- Remove CSS Overrides as we enable consumers to override every single
colour
- Add stories to demonstrate usage
- Refactors `Tabs` with some destructuring, but this can be kept to a
different PR 0a75669

## Why?

- This enables us to use Callouts with dark mode in dotcom-rendering:
guardian/dotcom-rendering#9277
- Proposal for an answer to:
guardian/dotcom-rendering#9333
@github-project-automation github-project-automation bot moved this to Triage in WebX Team Mar 14, 2024
@alinaboghiu alinaboghiu moved this from Triage to Backlog in WebX Team Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants