Skip to content

[Bug]: Dialog applies grid gaps for elements which aren't rendered #27681

@stefan-schweiger

Description

@stefan-schweiger

Library

React Components / v9 (@fluentui/react-components)

System Info

System:
    OS: macOS 13.3.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 46.09 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 112.0.5615.137
    Firefox: 110.0
    Safari: 16.4

Are you reporting Accessibility issue?

None

Reproduction

https://codesandbox.io/s/fervent-jepsen-qb0fsj

Bug Description

Actual Behavior

Grid gaps get rendered even if slots where not specified. E.g. if you don't specify a title and actions you will still have additional space around the content.

image

image

Expected Behavior

Gaps should only be added when an element actually is rendered.

https://stackoverflow.com/questions/70776707/css-grid-empty-row-still-adds-gap

Logs

No response

Requested priority

Normal

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions