Display certain number of lines in description

Add this code to the Custom CSS field on the Style tab of your Job Board widget’s settings:

.global-styles,
:root {
  --description-rows: 4;
}
[class*='Grid__GridContainer-sc'] [class^='Description__Text-sc'] {
  -webkit-line-clamp: var(--description-rows);
  max-height: calc(var(--description-rows) * 20px);
}
1 Like

I have pasted in the above code and that has given me the number of rows I want in the initial description. But now when I click on Learn More, I can’t see or scroll through the longer description. Any suggestions re how I can fix this? Thanks

2 Likes

Hi there, @user20471 :wave:

Sure, our devs adjusted the code:

.global-styles,
:root {
  --description-rows: 4;
}
[class*='Grid__GridContainer-sc'] [class^='Description__Text-sc'] {
  -webkit-line-clamp: var(--description-rows);
  max-height: calc(var(--description-rows) * 20px);
}

Try it out and let me know if it worked :slightly_smiling_face:

1 Like

Yes!! Thank you!

2 Likes

Awesome! You’re welcome :wink:

1 Like