Skip to content

Commit

Permalink
fix: hr and img tags shouldn't break with global css overrides (#102)
Browse files Browse the repository at this point in the history
* fix: prevent tailwind from overriding the hr tag margin

* fix: card title image sizing
  • Loading branch information
Benehiko authored Mar 16, 2023
1 parent 069fb78 commit 40bc4ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
8 changes: 3 additions & 5 deletions src/react-components/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ export const Card = ({
>
<div className={gridStyle({ gap: 32 })}>
{image && (
<div className={cardTitleImage}>
<>
{typeof image === "string" ? (
<img
style={{
width: "auto",
}}
className={cardTitleImage}
src={image}
alt={image}
width="100%"
Expand All @@ -46,7 +44,7 @@ export const Card = ({
) : (
image
)}
</div>
</>
)}

<div className={cardTitleStyle}>
Expand Down
6 changes: 2 additions & 4 deletions src/theme/card.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ export const cardTitleStyle = style({
})

export const cardTitleImage = style({
display: "flex",
justifyContent: "center",
alignItems: "center",
height: pxToRem(42),
objectFit: "contain",
maxHeight: pxToRem(42),
})

// recipe for the card style
Expand Down
1 change: 1 addition & 0 deletions src/theme/divider.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const dividerStyle = recipe({
borderTop: `${pxToRem(4)} solid`,
borderColor: oryTheme.border.def,
width: pxToRem(64),
margin: "auto !important",
},
variants: {
sizes: {
Expand Down

0 comments on commit 40bc4ab

Please sign in to comment.