Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rearrange style prop to override unused CSS Variable #3303

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .yarn/versions/780ba100.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
releases:
"@radix-ui/react-context-menu": patch
"@radix-ui/react-dropdown-menu": patch
"@radix-ui/react-menubar": patch
2 changes: 1 addition & 1 deletion packages/react/context-menu/src/ContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ const ContextMenuSubContent = React.forwardRef<
{...subContentProps}
ref={forwardedRef}
style={{
...props.style,
// re-namespace exposed content custom properties
...{
'--radix-context-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',
Expand All @@ -513,6 +512,7 @@ const ContextMenuSubContent = React.forwardRef<
'--radix-context-menu-trigger-width': 'var(--radix-popper-anchor-width)',
'--radix-context-menu-trigger-height': 'var(--radix-popper-anchor-height)',
},
...props.style,
}}
/>
);
Expand Down
4 changes: 2 additions & 2 deletions packages/react/dropdown-menu/src/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ const DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, Dropdow
if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
})}
style={{
...props.style,
// re-namespace exposed content custom properties
...{
'--radix-dropdown-menu-content-transform-origin':
Expand All @@ -206,6 +205,7 @@ const DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, Dropdow
'--radix-dropdown-menu-trigger-width': 'var(--radix-popper-anchor-width)',
'--radix-dropdown-menu-trigger-height': 'var(--radix-popper-anchor-height)',
},
...props.style,
}}
/>
);
Expand Down Expand Up @@ -472,7 +472,6 @@ const DropdownMenuSubContent = React.forwardRef<
{...subContentProps}
ref={forwardedRef}
style={{
...props.style,
// re-namespace exposed content custom properties
...{
'--radix-dropdown-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',
Expand All @@ -481,6 +480,7 @@ const DropdownMenuSubContent = React.forwardRef<
'--radix-dropdown-menu-trigger-width': 'var(--radix-popper-anchor-width)',
'--radix-dropdown-menu-trigger-height': 'var(--radix-popper-anchor-height)',
},
...props.style,
}}
/>
);
Expand Down
4 changes: 2 additions & 2 deletions packages/react/menubar/src/Menubar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ const MenubarContent = React.forwardRef<MenubarContentElement, MenubarContentPro
{ checkForDefaultPrevented: false }
)}
style={{
...props.style,
// re-namespace exposed content custom properties
...{
'--radix-menubar-content-transform-origin': 'var(--radix-popper-transform-origin)',
Expand All @@ -389,6 +388,7 @@ const MenubarContent = React.forwardRef<MenubarContentElement, MenubarContentPro
'--radix-menubar-trigger-width': 'var(--radix-popper-anchor-width)',
'--radix-menubar-trigger-height': 'var(--radix-popper-anchor-height)',
},
...props.style,
}}
/>
);
Expand Down Expand Up @@ -658,7 +658,6 @@ const MenubarSubContent = React.forwardRef<MenubarSubContentElement, MenubarSubC
{...subContentProps}
ref={forwardedRef}
style={{
...props.style,
// re-namespace exposed content custom properties
...{
'--radix-menubar-content-transform-origin': 'var(--radix-popper-transform-origin)',
Expand All @@ -667,6 +666,7 @@ const MenubarSubContent = React.forwardRef<MenubarSubContentElement, MenubarSubC
'--radix-menubar-trigger-width': 'var(--radix-popper-anchor-width)',
'--radix-menubar-trigger-height': 'var(--radix-popper-anchor-height)',
},
...props.style,
}}
/>
);
Expand Down