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

color-modes: printColorModeName option not working properly #1964

Closed
xiaoxinghu opened this issue Oct 3, 2021 · 2 comments · Fixed by #2090
Closed

color-modes: printColorModeName option not working properly #1964

xiaoxinghu opened this issue Oct 3, 2021 · 2 comments · Fixed by #2090
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@xiaoxinghu
Copy link

Describe the bug
printColorModeName doesn't seem to work, at least with nextjs.

To Reproduce
I have created an example repo, which is a simple copy of the next project in the examples folder. I did the following extra to make it work:

  • install typescript and @types/react as it's complained after yarn
  • add printColorModeName: 'light' to the theme.ts file.
  • toggle to dark mode, then cmd + p to print the page, you get the dark them in preview.

Expected behavior
the print should use light theme

Screenshots
CleanShot 2021-10-03 at 14 17 57@2x
I have checked the source, it seems the current theme is applied in @media print.
CleanShot 2021-10-03 at 14 18 38@2x

@lachlanjc lachlanjc added bug Something isn't working help wanted Extra attention is needed labels Oct 3, 2021
@lachlanjc
Copy link
Member

Thank you for the repo + details!

@lachlanjc lachlanjc changed the title printColorModeName option does not working properly color-modes: printColorModeName option not working properly Nov 29, 2021
@lachlanjc
Copy link
Member

Updated the repro to the latest Theme UI & dependencies, issue is unresolved. https://codesandbox.io/s/broken-tree-pm9nh?file=/src/theme.ts / https://pm9nh.sse.codesandbox.io/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
3 participants