diff --git a/src/index.test.js b/src/index.test.js index c777ea3..7f2f51f 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -24693,3 +24693,97 @@ it('should be possible to override backticks for the inline `code` tag', async ( " `) }) + +it('should be possible to add colors without 600 and still get default and custom prose color helpers created', async () => { + expect( + await diffOnly( + {}, + { + theme: { + extend: { + colors: { + 'darkish-red': '#a85555', + 'darkish-green': { + 600: '#55a855', + }, + }, + }, + }, + } + ) + ).toMatchInlineSnapshot(` + " + + + .prose-darkish-green a { + + color: #55a855; + + } + + + + .prose-darkish-green a code { + + color: #55a855; + + } + + + + --- + + + } + + + + .sm\\\\:prose-darkish-green a { + + color: #55a855; + + } + + + + .sm\\\\:prose-darkish-green a code { + + color: #55a855; + + --- + + + } + + + + .md\\\\:prose-darkish-green a { + + color: #55a855; + + } + + + + .md\\\\:prose-darkish-green a code { + + color: #55a855; + + --- + + + } + + + + .lg\\\\:prose-darkish-green a { + + color: #55a855; + + --- + + + + + .lg\\\\:prose-darkish-green a code { + + color: #55a855; + + } + + --- + + + } + + + + .xl\\\\:prose-darkish-green a { + + color: #55a855; + + --- + + + + + .xl\\\\:prose-darkish-green a code { + + color: #55a855; + + } + + --- + + + } + + + + .\\\\32xl\\\\:prose-darkish-green a { + + color: #55a855; + + } + + + + .\\\\32xl\\\\:prose-darkish-green a code { + + color: #55a855; + + " + `) +}) diff --git a/src/styles.js b/src/styles.js index 190b537..93d97ee 100644 --- a/src/styles.js +++ b/src/styles.js @@ -1075,7 +1075,7 @@ module.exports = (theme) => ({ // Add color modifiers ...Object.entries(theme('colors')).reduce((reduced, [color, values]) => { if (!isUsableColor(color, values)) { - return {} + return reduced } return {