Skip to content

fix(search): increase .meta class line-height to 1.43em - #1037

Closed
mihai-dev2000 wants to merge 1 commit into
masterfrom
fix/search-meta-line-height
Closed

mihai-dev2000 wants to merge 1 commit into
masterfrom
fix/search-meta-line-height

Conversation

@mihai-dev2000

Copy link
Copy Markdown

Addressing Issue #923

Root cause: Clamp boxes use line-height: 1em (14px) at font-size: 14px. Served fonts fit, but several Linux substitutes (DejaVu Sans, Noto Sans, Nimbus Sans, ...) which are a bit taller and causes ~3px overflow and glyph (word) clipping.

Fix:
increased .meta class line height to 1.43em to cover all kind of fonts ( small and tall).

Also I noticed .description class line height is already set to 1.4285em, I think that's why the clipped description doesn't appears:

image

@zzacharo zzacharo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mihai-dev2000 thanks for the fix! Can you check where the rules comes from for the description field? I think the fix make sense to be upstreamed.

@mihai-dev2000

Copy link
Copy Markdown
Author

@mihai-dev2000 thanks for the fix! Can you check where the rules comes from for the description field? I think the fix make sense to be upstreamed.

The 1.4285em on .description comes from Semantic UI core itself: definitions/views/item.less uses line-height: @descriptionLineHeight , then themes/default/views/item.variables resolves it to @lineHeight: 1.4285em.

image

The broken .meta { line-height: 1em } also comes from the same file @metaLineHeight: 1em. will fix it in invenio-app-rdm

@mihai-dev2000

Copy link
Copy Markdown
Author

Closed to be fix in upstream with this PR: inveniosoftware/invenio-app-rdm#3623

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.

3 participants