Skip to content

Safari 16.4 crash on <input placeholder> or text-current + opacity #17194

@aaronadamsCA

Description

@aaronadamsCA

What version of Tailwind CSS are you using?

v4.0.14

What browser are you using?

iOS Safari 16.4

Reproduction URL

https://play.tailwindcss.com/K2JSaOKDJX

<p class="text-current/50">text</p>

https://play.tailwindcss.com/V9jkBlLwU8

<input placeholder="text" />

Describe your issue

Both of the examples above crash the webpage in Safari 16.4:

Image

I don't know the full range of affected versions.

The trigger seems to be passing currentColor to color-mix(), I found more information about it here:

https://stackoverflow.com/questions/76436497/the-color-mix-property-involving-currentcolor-causes-safari-to-crash

My second example above crashes because that exact combo is in preflight.css:

::placeholder {
opacity: 1; /* 1 */
color: color-mix(in oklab, currentColor 50%, transparent); /* 2 */
}

Maybe something like color(from currentColor srgb r g b / 50%) would work instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions