Skip to content

Transition does not respect responsive display styles from the parent element #3328

@anniegiang-octave

Description

@anniegiang-octave

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

2.0.4

What browser are you using?
Chrome Version 126.0.6478.114 (Official Build) (arm64)

Reproduction URL
https://kw6kvd-3000.csb.app/

Sandbox

Describe your issue

  1. Open the reproduction URL above. You should see two texts that have colored backgrounds. Only the red one is rendered inside of a Transition.
  2. In Chrome, open the inspector and toggle the device toolbar. Set the dimensions to be responsive.
  3. Decrease the screen width until you know longer see both texts.
  4. Increase the screen width until you see the yellow one.

Expected behavior:
In step 4, the red one should also appear at breakpoints greater than md as specified in the parent div but it doesn't appear.

It's worth noting that this issue does not happen with the React + Tailwind boilerplate sandbox and versions for the following packages:

"@headlessui/react": "2.0.4",
"react": "18.3.1",
"react-dom": "18.3.1"

https://n5lf4f-5173.csb.app/

Sandbox

Metadata

Metadata

Assignees

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