Skip to content

Commit

Permalink
assets: fix item description overflow issue
Browse files Browse the repository at this point in the history
* addresses mathjax formulas truncation
  • Loading branch information
kpsherva committed Oct 10, 2024
1 parent 7068551 commit c97c828
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ class RecordsResultsListItem extends Component {
<Item className="creatibutors">
<SearchItemCreators creators={creators} othersLink={viewLink} />
</Item>
<Item.Description>
{_truncate(descriptionStripped, { length: 350 })}
<Item.Description className="truncate-lines-2">
{descriptionStripped}
</Item.Description>
<Item.Extra>
{subjects.map((subject) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,8 @@ export const ComputerTabletUploadsItem = ({
<SearchItemCreators creators={creators} />
</div>
</Item.Meta>
<Item.Description>
{_truncate(descriptionStripped, {
length: 350,
})}
<Item.Description className="truncate-lines-2">
{descriptionStripped}
</Item.Description>
<Item.Extra>
{subjects.map((subject) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@ export const MobileUploadsItem = ({
<SearchItemCreators creators={creators} />
</div>
</Item.Meta>
<Item.Description>
{_truncate(descriptionStripped, {
length: 100,
})}
<Item.Description className="truncate-lines-2">
{descriptionStripped}
</Item.Description>
<Item.Extra>
<Item.Extra>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@

.ui.items {


&.link > .item:hover .content .header {
color: @darkTextColor;
}
Expand All @@ -109,6 +110,13 @@
}

.content {
.description.truncate-lines-2 {
display: -webkit-box !important;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}

.header {
&.flex {
display: flex;
Expand Down

0 comments on commit c97c828

Please sign in to comment.