jwstegemann / fritz2

Easily build reactive web-apps in Kotlin based on flows and coroutines.
https://www.fritz2.dev
MIT License
653 stars 28 forks source link

toast container styling adds display: contents, which breaks styling #802

Closed jillesvangurp closed 1 year ago

jillesvangurp commented 1 year ago

Describe the bug

When I add a toast container, it ends up with a portal-container class and a styling rule that adds this rule somehow.

.portal-container {
  display: contents;
}

This breaks my tailwind styling. Including the styling suggested in the manual. Instead of appearing at the top on the right, the toasts appear at the bottom below my other content because the container is not rendered as a block.

I can change it to display: block in my browser and that fixes it. But I can't do this from code because of this undesired style rule overrides this.

It seems like #782 broke this. It was working fine before that. Right now, toasts are not usable for me.

Expected behavior

There are no magic classes being added to anything and I have full control over the layout. Alternatively, there is a nested div that gets added with the styling of my choice.

Screenshots

Lysander commented 1 year ago

You are right! We do not need this style anymore, as the portal-Factories create their own, but configurable tag. So the whole portalling can be rendered in a CSS agnostic way.

Hint to solution:

see #799 and probably solve those two as a whole.