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.

extended colors (in object format) including a default color name gets replaced with the default colors value

See original GitHub issue

in tailwind.config.js if you define a color, with a name including a default colors name in object format, gets the value of the default color. ie. module.exports = { theme: { extend: { colors: { 'my-blue': { 100: '#2200ff' } } } } } There is a class blue-100 in tailwind default color palette. So when you use my-blue-100 twin.macro uses that color value instead of the one defined in this config. That looks like a regex issue I think. It happens in text-color, bg-color or border-color.

Here is the sample forked from the starter. https://codesandbox.io/s/next-emotion-tailwind-twin-starter-tf34f?file=/tailwind.config.js

Thanks @regenrek for giving point to when color definition is an object not a string.

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
ben-rogersoncommented, Jul 19, 2020

This match bug was fixed in 1.5.1 🎉

Feel free to reopen the issue if there’s any problems.

0reactions
ben-rogersoncommented, Sep 14, 2020

@avinash-BB I couldn’t see any issues using custom colors, check out this demo here

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customizing Colors - Tailwind CSS
Customizing the default color palette for your project. Default color palette. Tailwind includes an expertly-crafted default color palette out-of-the-box that ...
Read more >
MATLAB colororder - MathWorks
This MATLAB function sets the color order for the current figure. ... Here are the RGB triplets and hexadecimal color codes for the...
Read more >
<named-color> - CSS: Cascading Style Sheets | MDN
The CSS data type is the name of a color, such as red, blue, black, ... They are called the extended color keywords,...
Read more >
Color (Java Platform SE 7 ) - Oracle Help Center
The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a...
Read more >
Apply colors to objects in an Adobe InDesign document
Apply colors to object such as strokes or fills in an InDesign document. Apply colors to grayscale images and create color themes.
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