Skip to content

font-variant-numeric not rendering correctly #2898

@sps-campbellwray

Description

@sps-campbellwray

What versions are you using? (if relevant)

@react-email/components@1.0.6, react-email@5.2.5, etc.

Describe the Bug

When using the tailwind classes for font-variant-numeric, for example tabular-nums, the output is not formatted correctly

 <p className="tabular-nums">
    1234
</p>

Becomes

<p
  style="font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) tabular-nums var(--tw-numeric-fraction,)">
  1234
</p>

What is affected (leave empty if unsure)

No response

Link to the code that reproduces this issue

tabular-nums.tsx

import { Html, Body, Tailwind, pixelBasedPreset } from "@react-email/components";
import * as React from "react";

export default function SocietEmail() {
    return (
        //@ts-ignore
        <Tailwind
            config={{
                presets: [pixelBasedPreset],
            }}
        >
            <Html>
                <Body>
                    <p className="tabular-nums">
                    1234
                    </p>
                </Body>
            </Html>
        </Tailwind>
    );
}

To Reproduce

Use the provided template provided above

Expected Behavior

Should probably convert to the following, not certain on this though

font-variant-numeric:tabular-nums

What's your node version? (if relevant)

No response

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