Skip to main content
Question

Issue with padding when replacing a component in a slot

  • December 17, 2024
  • 1 reply
  • 47 views

Joanna_Majewska

I’m running into an issue with a component that uses a slot. When I replace the slot content with an instance of a different component, the padding of the original slot component is preserved instead of inheriting the padding from the new component.

I expected the replaced component to behave with its own padding settings, but it seems the slot’s container enforces its own padding.

Is there a way to make the new component respect its own padding instead of inheriting it from the slot container?

Any suggestions or workarounds would be greatly appreciated!

1 reply

Pavel_Kiselev
  • Power Member
  • 438 replies
  • December 17, 2024

It seems like the slot itself has padding overrides so when you swap it these overrides persist. I would make sure that my slot placeholder does not have ANY overrides to prevent unwanted behaviour when swapping instances


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings