Gallery title and description on multiple lines

MarcQuinlivanMarcQuinlivan Beginner grinnerIrelandPosts: 47Registered Users Big grins

I have a couple of galleries where the title and description run to more than two lines for title and three lines for description on mobile devices and I don't like the "Read More" option.

I've added the following code to adjust the number of lines before it truncates the text. Might be of use to some of you.

`
/* set gallery cover title to max 4 lines */
.sm-gallery-cover-title {
max-height: none !important;
-webkit-line-clamp: 4 !important;
}

/*set gallery cover description to max 4 lines */
.sm-gallery-cover[data-show-image=true] .sm-gallery-cover-info .sm-gallery-cover-description {
overflow: hidden;
max-height: none !important;
-webkit-line-clamp: 4 !important;
}
`

You can change the 4 to any other value you like if you want more or fewer lines.

You can see an example here

Sign In or Register to comment.