Skip to content

Colors defined as functions cause error #143

Closed
@Nick-Mazuk

Description

@Nick-Mazuk

If you define colors as functions, it breaks @tailwind/typography.

This code works correctly on Tailwind v1.9

error - ./styles/globals.css:2024:9
Syntax error: Unknown word

  2022 | .prose-primary a {
  2023 |   color: ({ opacityVariable, opacityValue }) => {
> 2024 |         if (typeof opacityValue !== 'undefined') return `rgba(${colorString}, ${opacityValue})`
       |         ^
  2025 |         if (typeof opacityVariable !== 'undefined')
  2026 |             return `rgba(${colorString}, var(${opacityVariable}, 1))`

Metadata

  • tailwindcss: 2.0.3
  • @tailwindcss/typography: 0.4.0
  • postcss: 8.2.6

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions