Skip to content

Combining Pseudo Classes #566

@aPinix

Description

@aPinix

What happened?

The equivalent of Nativewind:

Combining Pseudo-classes

Multiple pseudo-classes can be combined. All conditions must be met for the styles to apply:

<Pressable className="bg-blue-500 active:bg-blue-700 dark:bg-purple-500 dark:active:bg-purple-700"
>
  <Text className="text-white">Click me</Text>
</Pressable>

Steps to Reproduce

  1. Combine multiple pseudo-classes in a <Pressable /> component
  2. Change the appearance between light and dark modes (CMD + SHIFT + A in iOS Simulator)
  3. See that the active state in dark mode doesn't work (The dark:active:bg-purple-700 is working as both dark:active:bg-purple-700 and active:bg-purple-700)

The bg-purple-700 class is applied in the active state for both light and dark modes, instead of only in dark mode.

Snack or Repository Link

https://github.com/aPinix/uniwind-app

Uniwind version

1.8.0

React Native Version

0.85.3

Platforms

iOS, Android

Expo

Yes

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions