Skip to content

labelMdFontWeight is adding 200 to the value selected #220

@famonfa

Description

@famonfa

I’ve encountered a bug with the labelMdFontWeight appearance variable in the Stripe Connect embedded components. No matter what value I set, the computed CSS font-weight is always 200 more than the value I provide.

Steps to Reproduce

Set up a minimal reproducible example (see sandbox link below).
Set labelMdFontWeight to "400" in the appearance variables.
Inspect the rendered label in the Stripe Connect component.

Expected Behavior

If I set labelMdFontWeight: "400", the computed CSS should be font-weight: 400.

Actual Behavior

If I set labelMdFontWeight: "400", the computed CSS is font-weight: 600.
If I set labelMdFontWeight: "100", the computed CSS is font-weight: 300.
If I set labelMdFontWeight: "500", the computed CSS is font-weight: 700.
It appears that the value is always offset by +200.

Image
labelMdFontWeight is 400. Computed 600

Minimal Reproducible Example

You can reproduce this issue here:
https://codesandbox.io/p/devbox/m4ld6c?file=%2Fapp%2Fstripe.tsx%3A29%2C1-30%2C1

Environment

Stripe Connect JS version: 3.3.23
Browser: Chrome

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