Skip to content

Commit

Permalink
css card alignment issue #1001 (#1005)
Browse files Browse the repository at this point in the history
* css card alignment issue #1001

* bug-issue-1001 alignment issue

* style: format

---------

Co-authored-by: Narayan soni <[email protected]>
  • Loading branch information
biplavmz and narayan954 authored Aug 1, 2023
1 parent 2146c86 commit d2a3820
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
21 changes: 13 additions & 8 deletions src/components/Post/ImgBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,22 @@ const ImgBox = ({
)}

<div className={caption.length ? "p-0" : "post__text"}>
{caption && postHasImages && caption.length >= 200 ? (
<p style={{ color: "var(--color)", paddingInline: "8px" }}>
{caption && postHasImages ? (
<p
className={`${
caption.length >= 200 ? "postCaption" : "postCaptiontext"
}`}
>
<ReadMore postId={postId}>{caption}</ReadMore>
</p>
) : (
caption &&
postHasImages && (
<p style={{ color: "var(--color)", paddingInline: "16px" }}>
<Caption caption={caption} />
</p>
)
<p
style={{
color: "var(--color)",
paddingInline: "8px",
height: "80px",
}}
></p>
)}
</div>
</div>
Expand Down
16 changes: 15 additions & 1 deletion src/components/Post/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
}

.post__background {
min-height: 200px;
min-height: 350px;
background: linear-gradient(
130deg,
#dee2ed,
Expand Down Expand Up @@ -379,3 +379,17 @@
font-size: 14px;
}
}

.postCaption {
color: var(--color);
padding-inline: 8px;
height: 80px;
}

.postCaptiontext {
color: var(--color);
padding-inline: 8px;
height: 80px;
display: flex;
align-items: flex-end;
}

0 comments on commit d2a3820

Please sign in to comment.