-
Notifications
You must be signed in to change notification settings - Fork 88
Description
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:
- Go to any page that contains a basic table component
- See the issue
Expected behavior
No cut off
Screenshots
In OSD:
In OUI documentation (not very obvious due to background):
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'.
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.