Skip to content

Commit

Permalink
fix(card): make the UI more responsive
Browse files Browse the repository at this point in the history
There is a good chance that the `value` which will
be rendered in markdown is very large.
In such cases, the consumer may limit the `height` or
`max-height` of the component, which will result in
the content to overflow out of the card.
The component should have a more responsive UI
when its size is more limited by the consumer.
  • Loading branch information
Kiarokh authored and LucyChyzhova committed Jan 17, 2025
1 parent 896ed7d commit bc2a007
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/card/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ section {
}

img {
flex-shrink: 0;
transition: filter 0.6s ease;
object-fit: cover;
border-radius: calc(
Expand All @@ -66,6 +65,8 @@ img {
}

:host(limel-card[orientation='landscape']) & {
flex-shrink: 0;

max-width: 40%;
height: 100%;
}
Expand All @@ -78,10 +79,12 @@ img {
}

limel-markdown {
overflow-y: auto;
padding: 0.5rem 0.75rem;
}

header {
flex-shrink: 0;
display: flex;
justify-content: center;

Expand Down Expand Up @@ -131,8 +134,8 @@ header {
}

limel-action-bar {
flex-shrink: 0;
--action-bar-background-color: transparent;
padding: 0.5rem;
margin-left: auto;
}

Expand Down

0 comments on commit bc2a007

Please sign in to comment.