Skip to content

Commit

Permalink
Merge pull request #444 from nextui-org/fix/remove-first-last-child-c…
Browse files Browse the repository at this point in the history
…ard-margin-styles

fix(react-card):  :first-child/:last-child margin was removed
  • Loading branch information
jrgarciadev committed May 1, 2022
2 parents f7df1e1 + e588299 commit 4723bc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
22 changes: 3 additions & 19 deletions packages/react/src/card/card.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ export const StyledCardBody = styled('div', {
p: '$sm $lg',
oy: 'auto',
position: 'relative',
ta: 'left',
'*:first-child': {
mt: 0
},
'*:last-child': {
mb: 0
}
ta: 'left'
});

export const StyledCard = styled('div', {
Expand Down Expand Up @@ -144,7 +138,7 @@ export const StyledCard = styled('div', {
true: {
'&:hover': {
transform: 'translateY(-2px)',
boxShadow: '$lg'
boxShadow: '$md'
}
}
},
Expand Down Expand Up @@ -196,13 +190,7 @@ export const StyledCardHeader = styled('div', {
overflow: 'hidden',
color: 'inherit',
fontSize: '$xs',
p: '$sm',
'*:first-child': {
mt: 0
},
'*:last-child': {
mb: 0
}
p: '$sm'
});

export const StyledCardFooter = styled('div', {
Expand All @@ -216,10 +204,6 @@ export const StyledCardFooter = styled('div', {
fontSize: '$xs',
bblr: '$lg',
bbrr: '$lg',
'*': {
mt: 0,
mb: 0
},
variants: {
blur: {
true: {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/theme/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const defaultTokens = {
'background 0.25s ease 0s, color 0.25s ease 0s, border-color 0.25s ease 0s, box-shadow 0.25s ease 0s, transform 0.25s ease 0s, opacity 0.25s ease 0s',
avatar: 'box-shadow 0.25s ease 0s, opacity 0.25s ease 0s',
link: 'opacity 0.25s ease 0s, background 0.25s ease 0s',
card: 'transform 0.25s ease 0s'
card: 'transform 0.25s ease 0s, box-shadow 0.25s ease 0s'
},
breakpoints: {
xs: '650px',
Expand Down

0 comments on commit 4723bc6

Please sign in to comment.