Skip to content

[BUG] Pagination button for basic table shows text that is cut off at the bottom #1486

@FriedhelmWS

Description

@FriedhelmWS

Describe the bug

A few pixels appear to be cut off from the bottom of the pagination button (empty button), as shown in the screenshots. This issue doesn't appear to occur with empty buttons that are used alone.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any page that contains a basic table component
  2. See the issue

Expected behavior

No cut off

Screenshots

Image

In OSD:

Image

In OUI documentation (not very obvious due to background):

Image

Host/Environment:

  • OUI Version: 2.0
  • OSD Version (if applicable): 2.18
  • OS: IOS
  • Browser and version Chrome 132

Additional context

Causes

In _button_empty.scss:

.ouiButtonEmpty {
@include ouiButton;

border-color: transparent;
background-color: transparent;
box-shadow: none;
// sass-lint:disable-block no-important
transform: none !important; /* 1 */
animation: none !important; /* 1 */
transition-timing-function: ease-in; /* 2 */
transition-duration: $ouiAnimSpeedFast; /* 2 */
line-height: inherit; // here

.ouiButtonEmpty__content {
  padding: 0 $ouiSizeS;
}

.ouiButtonEmpty__text {
  text-overflow: ellipsis;
  overflow: hidden;
}

The line-height: inherit; property causes the button text to inherit a line-height: 1; from ouiBody, which doesn't provide enough height to fully display characters with descenders, such as 'g' and 'y'.

Image

Suggested Fix

.ouiButtonEmpty__text {
  text-overflow: ellipsis;
  overflow: hidden;
  line-height: normal;
}

Add line-height: normal; to the button text only so that the line height is auto-adjusted by the browser (roughly 1.2 according to the docs), without changing the inherited behavior of the parent button styles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions