Skip to content

fix(ui5-select): correct dropdown button height#13408

Open
NakataCode wants to merge 3 commits intomainfrom
select-dropdown-button-height
Open

fix(ui5-select): correct dropdown button height#13408
NakataCode wants to merge 3 commits intomainfrom
select-dropdown-button-height

Conversation

@NakataCode
Copy link
Copy Markdown
Contributor

The dropdown button height was set to calc(100% - 0.0625rem) in sap_horizon and sap_horizon_dark themes, causing a 1px vertical misalignment with the input field. According to the Input with Button (Horizon) spec, the button height should match the field height exactly (2.25rem cozy, 1.625rem compact). Set --_ui5_select_icon_wrapper_height and --_ui5_select_icon_wrapper_state_height to 100% to align with the specification.

Additionally, the field's bottom border (inset box-shadow) was covered by the dropdown button's hover background. Per spec, the field's underline must appear on top of the button in all states. Fixed by drawing the bottom border as a background-image gradient on the select root element, spanning the full width including under the button, and setting the button hover background to transparent so the gradient remains visible.

Fixes: #13306

@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

ui5-webcomponents-bot commented Apr 17, 2026

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 17, 2026 12:48 Inactive
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 20, 2026 07:48 Inactive
@kgogov
Copy link
Copy Markdown
Contributor

kgogov commented Apr 23, 2026

Code review

Found 1 issue:

  1. Icon button bottom border overlaps with the popover — when the dropdown opens, the bottom border of the select field (including the icon button area) visually overlaps with the top edge of the popover. The popover should be offset by 1px (var(--sapField_BorderWidth)) so the field's bottom border remains visible and the two elements do not bleed into each other.

<>
{this.options.length > 0 &&
<ResponsivePopover
id={this.responsivePopoverId}
class={{
"ui5-select-popover": true,
...this.classes.popover
}}
part="popover"
style={this.styles.responsivePopover}
placement="Bottom"
horizontalAlign="Start"
hideArrow={true}
preventInitialFocus={true}
onOpen={this._afterOpen}
onBeforeOpen={this._beforeOpen}
onClose={this._afterClose}
onKeyDown={this._onkeydown}
accessibleName={this._isPhone ? this._headerTitleText : undefined}

@kgogov
Copy link
Copy Markdown
Contributor

kgogov commented Apr 23, 2026

Web Components:

Screenshot 2026-04-23 at 16 10 59

SAPUI5:

Screenshot 2026-04-23 at 16 07 55

@kgogov
Copy link
Copy Markdown
Contributor

kgogov commented Apr 23, 2026

Code review

Found 1 issue:

  1. Hover background no longer fills the full button area in value states (Fiori and other non-Horizon themes)--_ui5_select_icon_wrapper_state_height is newly added to base/Select-parameters.css with value calc(100% - 0.125rem). Before this PR it was only defined in sap_horizon/sap_horizon_dark; for Fiori 3 and HC themes it was undefined, so the icon button used the full 100% height in value states. After this PR, the button is 2px shorter in value states for all non-Horizon themes, causing the hover background to leave a visible gap at the bottom of the field.

:host {
--_ui5_select_hover_icon_left_border: 1px solid transparent;
--_ui5_select_label_color: var(--sapField_TextColor);
--_ui5_select_icon_width: 2.25rem;
--_ui5_select_icon_wrapper_height: 100%;
--_ui5_select_bottom_border_gradient: none;
--_ui5_select_icon_wrapper_state_height: calc(100% - 0.125rem);
}

Before:
Screenshot 2026-04-23 at 16 18 26

After:
Screenshot 2026-04-23 at 16 18 07

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview April 24, 2026 11:58 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.

[Select][Web Components][2.20.1]: Incorrect visual implementation of the button leads to vertical misalignment with the input field

3 participants