Skip to content

--tw-prose-kbd-shadows is NaN NaN NaN since the colors are assumed to be hex #386

Open
@te6-in

Description

@te6-in

What version of @tailwindcss/typography are you using?

v0.5.16

What version of Node.js are you using?

v22.14.0

What browser are you using?

Chrome 133.0.6943.127

What operating system are you using?

macOS

Reproduction repository

https://github.com/te6-in/tailwind-prose-repro

Describe your issue

From Tailwind CSS v4 the colors are in oklch, but the keyboard shadow colors generated here assume that the colors are in hex.

'--tw-prose-kbd-shadows': hexToRgb(colors.slate[900]),

So the values become NaN NaN NaN and no box shadow is shown.

Image

Image

I guess this can be replaced with color functions which have mostly the same browser availability as oklch. Or maybe we can try parsing and fallback to hex → rgb.

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