-
-
Notifications
You must be signed in to change notification settings - Fork 476
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
Nesting cards merges the elements #2265
Comments
Hi @ghbm-itk, this is an unfortunate consequence of how NiceGUI adds default padding to |
Since the problem is so easily fixed by simply wrapping the element in another element, it seems like something should be possible to fix. I don't understand the backend of NiceGui well enough yet, but I will look into it at some point. Could a simple hotfix be something like: "If parent is a card wrap this element." ? |
@ghbm-itk I don't think it's a good idea to automatically change the element hierarchy, because it would break certain assumptions (see #2040 for a discussion about a similar case). I tried once again to undo Quasar's CSS magic - without success. But I found a way to wrap the card content in a separate div, so that it isn't affected by the Quasar's CSS; see PR #2301. What do you think? |
@falkoschindler Isn't that just q-card-section reinvented? When looking at the examples on quasar.dev it seems that all content in cards is wrapped in card sections: <q-card>
<q-card-section>
<div class="text-h6">Our Changing Planet</div>
<div class="text-subtitle2">by John Doe</div>
</q-card-section>
</q-card> |
@ghbm-itk Sorry for the late reply. I think it's a bit different:
|
I just closed PR #2301, because we're no longer convinced that it is a good idea to add additional layers to
Even though this requires all users to change |
Description
When placing cards inside other cards they merge insted of nesting, which seems very unintentional.
Somehow this also affects toggles. I guess they're based around cards? Or maybe it's the drop shadow that's weird.
If I use intermediate containers like a row the cards don't merge.
It doesn't seems to be a problem in Quasar, but the q-card-sections need to be there for the cards to nest properly:
https://codepen.io/Hermasetas/pen/oNVXKGB
The text was updated successfully, but these errors were encountered: