Add line-clamp / text shorten feature (CSS only)

Created on 20 February 2023, almost 2 years ago
Updated 8 March 2024, 10 months ago

Problem/Motivation

There are a lot cases where text needs to be shortened, especialy on smaller devices.
We've used JS for this in the past, now we have good browser support for the line-clamp CSS feature: https://codepen.io/Yukishi/pen/zEBoMr

We might still need a little Javascript for a "show all"/"show less" functionality.

Proposed resolution

Add a new setting to (text related) paragraphs:

  • line_clamp_lines (int): "Lines to show"
  • line_clamp_toggable (bool): "Add 'show more' / 'show less' link"

(Like a lot of our other settings) This setting should be possible per device class (small, medium, large).

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024