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.

Arbitrary values using calc() with whitespace #192

@wagerfield

Description

@wagerfield

What version of @tailwindcss/jit are you using?

0.1.17

What version of Node.js are you using?

14.15.4

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

next@10.1.2

What browser are you using?

Chrome Version 89.0.4389.90 (Official Build) (x86_64)

What operating system are you using?

Mac OSX Big Sur v11.2.3

Reproduction repository

https://github.com/wagerfield/tailwind-jit-calc

When using calc() within the new arbitrary value class syntax, classes are not generated when the body of the calc function contains spaces:

<div class="h-[calc(100px + 50px * 2)]">This does not work</div>
<div class="h-[calc(100px+50px*2)]">This does work</div>

I expect the solution might be as simple as removing whitespace from the contents of arbitrary class names eg.

.h-[calc(100px + 50px * 2)] --> .h-[calc(100px+50px*2)]

...but not sure if that's possible or not?

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