Skip to content

Commit

Permalink
feat: Card no longer has overflow: hidden. Instead, the figure will…
Browse files Browse the repository at this point in the history
… adapt the card border radius, fix: saadeghi#1175
  • Loading branch information
saadeghi committed Nov 1, 2022
1 parent 3a93a61 commit 9c98557
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/components/styled/card.css
@@ -1,5 +1,19 @@
.card {
@apply rounded-box;
:where(figure:first-child) {
@apply overflow-hidden;
border-top-left-radius: inherit;
border-top-right-radius: inherit;
border-bottom-left-radius: unset;
border-bottom-right-radius: unset;
}
:where(figure:last-child) {
@apply overflow-hidden;
border-top-left-radius: unset;
border-top-right-radius: unset;
border-bottom-left-radius: inherit;
border-bottom-right-radius: inherit;
}
&:focus-visible {
outline: 2px solid currentColor;
outline-offset: 2px;
Expand Down Expand Up @@ -30,4 +44,10 @@
&.image-full > &-body {
@apply z-20 text-neutral-content;
}
&.image-full {
:where(figure) {
@apply overflow-hidden;
border-radius: inherit;
}
}
}
2 changes: 1 addition & 1 deletion src/components/unstyled/card.css
@@ -1,5 +1,5 @@
.card {
@apply relative flex flex-col overflow-hidden;
@apply relative flex flex-col;
&:focus {
@apply outline-none;
}
Expand Down
14 changes: 14 additions & 0 deletions src/utilities/unstyled/card.css
@@ -1,6 +1,20 @@
.card-side {
align-items: stretch;
flex-direction: row;
:where(figure:first-child) {
@apply overflow-hidden;
border-top-left-radius: inherit;
border-top-right-radius: unset;
border-bottom-left-radius: inherit;
border-bottom-right-radius: unset;
}
:where(figure:last-child) {
@apply overflow-hidden;
border-top-left-radius: unset;
border-top-right-radius: inherit;
border-bottom-left-radius: unset;
border-bottom-right-radius: inherit;
}
& figure > * {
max-width: unset;
}
Expand Down

0 comments on commit 9c98557

Please sign in to comment.