Skip to content

Individual transforms can't get converted to compatible syntax by lightningcss #14094

@ottomated

Description

@ottomated

What version of Tailwind CSS are you using?

4.0.0-alpha.18

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

vite@5.3.5

What version of Node.js are you using?

v20.16.0

What browser are you using?

Chrome 103.0.5060.134 (OBS CEF)

What operating system are you using?

Linux

Reproduction URL

LightningCSS

Describe your issue

The translate property (and other individual transforms) is only supported in newer browsers.

Per parcel-bundler/lightningcss#247, lightningcss does support converting translate: ...; into transform: translate(...);. However, it seems to have a few caveats - it needs a transform property in the same class, and it also doesn't seem to work when vars are used to define the parameters.

The v3 docs say:

While most of the features in Tailwind CSS will work in all modern browsers, Tailwind also includes APIs for several bleeding-edge features that aren’t yet supported by all browsers, for example the :focus-visible pseudo-class and backdrop-filter utilities.

In my opinion, a common utility such as transform should be supported in all browsers - the lack of support blocks me from using v4 in any production applications.

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