question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix @theme-ui/tailwind color conversion

See original GitHub issue

When converting my theme-ui config to tailwind via @theme-ui/tailwind, the colors are not converted the correct way.

Current: As the plugin does not touch the color config at all, it will result in the following structure: https://github.com/system-ui/theme-ui/blob/master/packages/preset-tailwind/src/index.ts#L18-L29

Expected: While tailwind expects a different structure for color palettes: https://tailwindcss.com/docs/customizing-colors/#overriding-a-default-color

Workaround: I was able to convert the structure on my own, but my lacking typescript knowledge prevents my to provide a working version of my fix as PR 😦

https://github.com/axe312ger/gatsby-starter-theme-ui-emotion-tailwind/blob/master/tailwind.config.js#L9-L21

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mxstbrcommented, Jul 20, 2020

See #862!

1reaction
mxstbrcommented, Feb 20, 2020

If you submit that as a PR without the correct TypeScript stuff I’ll help you fix it up! How’s that sound?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customizing Colors - Tailwind CSS
Using custom colors. If you'd like to completely replace the default color palette with your own custom colors, add your colors directly under...
Read more >
Convert to TypeScript · Issue #668 · system-ui/theme-ui
Based on the discussions around #121 and the test we just merged in #662, we are going to convert theme-ui to TypeScript!
Read more >
How I used Theme UI to seamlessly convert Design to Code
I want to focus on Theme UI and explain how I used it on this landing page, especially the breakpoints syntax, variants, and...
Read more >
How to add new colors to tailwind-css and keep the ...
How to add new colors to tailwind-css and keep the originals ones ? · Step 1: Run the below code to your folder's...
Read more >
theme-ui/typography
This page uses themes from Typography.js to populate the theme object. ... try to solve the extremely complex problems of how to name...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found