Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Dynamic Styles #205

Closed
Closed
@CryogenicPlanet

Description

@CryogenicPlanet

What version of @tailwindcss/jit are you using?

0.1.18

What version of Node.js are you using?

14.15.5

What build tool (or framework if it abstracts the build tool) are you using?

Next,js@latest

What browser are you using?

Firefox

What operating system are you using?

Pop Os

Reproduction repository

https://github.com/CryogenicPlanet/tailwind-jit-dynamic-styles

Ran into this bug when converting a regular tailwind codebase to use the @tailwindcss/jit, where dynamic styling is not generated at all.

Styling based on state like this, where color can be red | green. I use this as it is shorter and cleaner than writing a ternary operator each time especially when you want to change a lot of styles based on color.

      <p className={`text-${color}-500 text-3xl`}>I am colored text</p>

I fully recognise that something like this may not be possible to support, but wanted to report it as a bug and see if there were any potential ways to mitigate it.

Reproduction

  1. Clone https://github.com/CryogenicPlanet/tailwind-jit-dynamic-styles
  2. Install and Run yarn and yarn dev

The error will be clearly visible that none of the elements have been styled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions