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
{{ message }}
Repository navigation
Adding padding to a grid-card-item adds it to the sd-col div and not to sd-card div #26
with the idea to add padding to the cards itself (so inner padding inside the card). But it adds the sd-p-3 class to the outer sd-col div, and not to the sd-card div:
I personally would have expected it to add it to the sd-card div. But if this was intentional behaviour, is there another way to add padding to the card?
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
OK, I see now that it was intentional, and it are indeed the classes listed at https://sphinx-design.readthedocs.io/en/furo-theme/grids.html#grid-item-card-options which are at set on the grid-item (it might be useful to mention it there explicitly in the docs).
But specifically for padding, I am wondering a bit what the use case can be to want to set specifically a padding on the grid-item. Since it's just a parent div with no other content, does it matter in practice if you set margin or padding? Is being able to set both useful? (genuine questions, as I am a CSS noob :))
Thanks for the report. This is intentional: on grid-item-card, columns, margin, padding and class-item apply to the grid column (the grid options describe padding as the inner padding of the grid item). To pad the card itself, use the utility classes, e.g. :class-body: sd-p-1 (the body padding) or :class-card: sd-p-2. Closing, but feel free to reopen if that doesn't cover your case.
Activity
welcome commentedon Aug 24, 2021
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! 🎉
chrisjsewell commentedon Aug 24, 2021
Heya, yeh as you can see in
sphinx-design/sphinx_design/grids.py
Line 234 in 9226a12
columns,margin,paddingandclass-itemare set on the grid item, and the rest is passed through to the card.Yes it is intentional, although could re-consider if people thought the other way was more intuitive
grid-item-cardis a shortcut for using acard(withwidth: 100%) inside agrid-item, so you can always use that for added control:jorisvandenbossche commentedon Aug 24, 2021
Thanks for the quick response!
It seems that "padding" is an unknown option for
card(it's also not listed at https://sphinx-design.readthedocs.io/en/furo-theme/cards.html#card-options)OK, I see now that it was intentional, and it are indeed the classes listed at https://sphinx-design.readthedocs.io/en/furo-theme/grids.html#grid-item-card-options which are at set on the grid-item (it might be useful to mention it there explicitly in the docs).
But specifically for padding, I am wondering a bit what the use case can be to want to set specifically a padding on the grid-item. Since it's just a parent div with no other content, does it matter in practice if you set margin or padding? Is being able to set both useful? (genuine questions, as I am a CSS noob :))
chrisjsewell commentedon Nov 10, 2026
Thanks for the report. This is intentional: on
grid-item-card,columns,margin,paddingandclass-itemapply to the grid column (the grid options describepaddingas the inner padding of the grid item). To pad the card itself, use the utility classes, e.g.:class-body: sd-p-1(the body padding) or:class-card: sd-p-2. Closing, but feel free to reopen if that doesn't cover your case.