-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Resolution: Solution ProvidedAn existing solution to the issue was providedAn existing solution to the issue was provided
Description
Bug report
Current Behavior
When active, the DropdownMenu component adds the following CSS to the document body.
body {
overflow: hidden !important;
position: relative !important;
padding-left: 8px;
padding-top: 8px;
padding-right: 8px;
margin-left:0;
margin-top:0;
margin-right: 0px !important;
}This can cause layout shift on layouts that have set padding / margin on the body.
Expected behavior
Opening the dropdown should not cause the layout to shift.
Reproducible example
Suggested solution
I'm guessing that the margins / padding have a function, though it isn't clear to me what that is. As long as that part of the CSS may be removed without breaking the component, I would suggest removing the padding / margins.
Your environment
| Software | Name(s) | Version |
|---|---|---|
| Radix Package(s) | Dropdown | 0.0.1 |
| React | n/a | 17.0.0 |
| Browser | Chrome | |
| Assistive tech | n/a | |
| Node | n/a | |
| npm/yarn | ||
| Operating System | Mac |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Resolution: Solution ProvidedAn existing solution to the issue was providedAn existing solution to the issue was provided