You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Styles passed from a parent component using resolve are not overwriting styles defined in the child component.
If the current behavior is a bug, please provide the steps to reproduce and possibly a minimal demo or testcase in the form of a Next.js app, CodeSandbox URL or similar
I'd expect MyButton is blue instead of red. According to the resolve section in the docs, it seems like this should work but instead the local styles are overwriting the parent styles. For reference, the style from MyWrapper is being applied correctly, but just overwritten.
I know I can add a .button class to MyButton then use it in the resolve or use the :global selector but I was wondering if the child style being prioritised is the intended behaviour.
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?
Report a bug.
What is the current behavior?
Styles passed from a parent component using
resolve
are not overwriting styles defined in the child component.If the current behavior is a bug, please provide the steps to reproduce and possibly a minimal demo or testcase in the form of a Next.js app, CodeSandbox URL or similar
I have a component
MyButton
:I use this component in
MyWrapper
:The background color for
MyButton
is still red.What is the expected behavior?
I'd expect
MyButton
is blue instead of red. According to theresolve
section in the docs, it seems like this should work but instead the local styles are overwriting the parent styles. For reference, the style fromMyWrapper
is being applied correctly, but just overwritten.Environment (include versions)
[email protected]
and[email protected]
Did this work in previous versions?
N/A
Extra notes
I know I can add a
.button
class toMyButton
then use it in theresolve
or use the:global
selector but I was wondering if the child style being prioritised is the intended behaviour.The text was updated successfully, but these errors were encountered: