Skip to content

Transition of border radius #514

@istarkov

Description

@istarkov

What happened?

I have following global.css setup

@import 'tailwindcss';
@import 'uniwind';
:root {
  font-size: 16px;
}

@theme {
  --spacing: 4px;

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --radius-4xl: 32px;
}

Then during the following transition

        <View
          className={cn(
            "relative border border-border bg-input",
            "transition-[padding-left,padding-right,padding-top,padding-bottom,border-radius]",
            expanded
              ? "rounded-[26px] pt-2.5 pr-3.5 pb-12 pl-3.5"
              : "rounded-4xl pt-1.5 pr-1.5 pb-1.5 pl-1.5",
          )}
        >

I see radius disappeared for a moment

Image

See attached video

Screen.Recording.2026-04-25.at.19.17.36.mov

If I set @theme inline { or directly set radius like below [32px] everything is fine

This is working fine so the issue is with custom variables in @theme

        <View
          className={cn(
            "relative border border-border bg-input",
            "transition-[padding-left,padding-right,padding-top,padding-bottom,border-radius]",
            expanded
              ? "rounded-[26px] pt-2.5 pr-3.5 pb-12 pl-3.5"
              : "rounded-[32px] pt-1.5 pr-1.5 pb-1.5 pl-1.5",
          )}
        >

In docs you have @theme https://docs.uniwind.dev/theming/global-css#modifying-design-tokens here (may be @theme inline would be better recommendation until solved)

Seems like some issue with resolving variables during transitions

Steps to Reproduce

Everything described above

Snack or Repository Link (Optional)

No response

Uniwind version

uniwind-pro@1.1.0

React Native Version

0.83.4

Platforms

Android

Expo

Yes

Additional information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions