Skip to content

fix(ui5-card): remove max-height constraint from subtitle to prevent text clipping for tall-character languages#13413

Open
tsanislavgatev wants to merge 1 commit intomainfrom
card-header-subtext
Open

fix(ui5-card): remove max-height constraint from subtitle to prevent text clipping for tall-character languages#13413
tsanislavgatev wants to merge 1 commit intomainfrom
card-header-subtext

Conversation

@tsanislavgatev
Copy link
Copy Markdown
Contributor

@tsanislavgatev tsanislavgatev commented Apr 20, 2026

Description

The ui5-card-header subtitle text was being visually cut off for languages
that require more vertical space per line, such as Hindi. This was caused by
a hardcoded max-height: 2.1rem on the subtitle element, which is calculated
based on Latin character height and does not accommodate the taller glyphs and
diacritics found in other scripts.

The -webkit-line-clamp: 2 rule already enforces the two-line limit correctly
for all languages, making the max-height constraint redundant and harmful.

Changes

  • Removed max-height: 2.1rem from .ui5-card-header-subtitle in CardHeader.css
  • Added a Cypress test to verify no max-height is applied to the subtitle

How to Test

  1. Open a ui5-card-header with a subtitleText containing Hindi text, e.g.:
    आपके डिवाइस या फ़ाइल सर्वर से फ़ाइल (xlsx, csv, txt, आदि)
  2. Verify the subtitle text is fully visible and not clipped at the bottom.

Before:
Screenshot 2026-04-20 at 10 14 36

After:
Screenshot 2026-04-20 at 10 14 24

Fixes #13379

@tsanislavgatev tsanislavgatev marked this pull request as ready for review April 20, 2026 07:15
@tsanislavgatev tsanislavgatev requested a review from a team April 20, 2026 07:16
@tsanislavgatev tsanislavgatev changed the title fix(ui5-card): align height of subheader to language fix(ui5-card): remove max-height constraint from subtitle to prevent text clipping for tall-character languages Apr 20, 2026
@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 20, 2026 07:22 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CardHeader]: Subtitle text is cut off for some languages

3 participants