-
-
Notifications
You must be signed in to change notification settings - Fork 484
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
Element borders are removed when placed inside a card #726
Comments
Thanks for reporting this bug, @miqsoft! It seems like with ui.card():
ui.label('A')
with ui.card():
with ui.card(): # <-- this card has no visible border
ui.label('B') This bug sounds familiar. A few months ago we had very similar problems with |
Apparently this is "normal" behavior in Quasar. Using the UMD example from https://quasar.dev/start/umd and nesting two cards, the inner card has not shadow: <div id="q-app">
<q-card style="padding: 1em; background-color: #ffdddd">
<q-card style="padding: 1em; background-color: #ddddff">Hello World!</q-card>
</q-card>
</div> Here are the rules from quasar.css that disable shadow and border in some cases: .q-card>div:first-child,
.q-card>img:first-child {
border-top: 0;
border-top-left-radius: inherit;
border-top-right-radius: inherit
}
.q-card>div:last-child,
.q-card>img:last-child {
border-bottom: 0;
border-bottom-left-radius: inherit;
border-bottom-right-radius: inherit
}
.q-card>div:not(:first-child),
.q-card>img:not(:first-child) {
border-top-left-radius: 0;
border-top-right-radius: 0
}
.q-card>div:not(:last-child),
.q-card>img:not(:last-child) {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0
}
.q-card>div {
border-left: 0;
border-right: 0;
box-shadow: none
} |
I think I understand the reason for this weird behavior:
As a workaround you have two options:
I'm not sure if and how we should handle this glitch in NiceGUI. Maybe we just add some remarks and a demo to the documentation? I'd rather not change the default padding, since it would break many existing layouts and is usually very handy. |
Description
Hey,
I just figured out that the bordered property does not work when table is inside a card.
I sadly could not figure out the reason for that behaviour.
Here is a small example showing the issue:
The text was updated successfully, but these errors were encountered: