Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions packages/fiori/src/themes/SearchField.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,15 @@
--_ui5_select_label_color: var(--sapShell_TextColor);
}

[ui5-select]:hover {
box-shadow: var(--sapField_Hover_Shadow);
[ui5-select]:hover,
.ui5-search-field-select::part(icon-wrapper):hover {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we change the box-shadow? Could you please tell me about the new value 0 0 0 var(--sapField_BorderWidth) var(--sapButton_Lite_Hover_BorderColor); -> where it comes from as I did not manage to find it in the specification

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The solution with box-shadow was introduced before this change as if using border visual design cannot be achieved because the select and the dropdown icon (arrow down) border cannot stack on top of each other. Dropdown icon is inside the select and if use border - the border looks more thick because of parent-child stacking. This code achieved the border from visual design with box-shadow.

Image

box-shadow: var(--_ui5-search_input_scope_hover_shadow);
}

[ui5-select]:active,
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you check if that styles are applied?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. They are applied on mousedown as :active state is applied then.

.ui5-search-field-select:active::part(icon-wrapper) {
box-shadow: var(--_ui5-search_input_scope_active_shadow);
background: var(--sapShell_Active_Background);
}

[ui5-select]::part(icon) {
Expand Down Expand Up @@ -283,18 +290,6 @@
height: 100%;
}

.ui5-search-field-select[focused]::part(icon-wrapper) {
box-shadow: var(--sapField_Hover_Shadow);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it expected to not have styles applied for the search button icon when you hover over it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This styles are not for the search button icon as it does not have ::part(icon-wrapper).


:host(:not([collapsed]):hover):has([ui5-select]:hover) {
background: var(--_ui5-search-wrapper-background);
}

:host(:not([collapsed])):has([ui5-select][focused]) {
background: var(--_ui5-search-wrapper-background);
}

.ui5-search-field-inner-input::selection {
background: var(--sapSelectedColor);
color: var(--sapContent_ContrastTextColor);
Expand Down
2 changes: 2 additions & 0 deletions packages/fiori/src/themes/base/SearchField-parameters.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
--_ui5-search-elements-hover-background: none;
--_ui5-search-elements-active-background: none;
--_ui5_search_input_scope_margin: 0 0.125rem 0 .5rem;
--_ui5-search_input_scope_hover_shadow: inset 0 0 0 var(--sapField_BorderWidth) var(--sapButton_Lite_Hover_BorderColor);
--_ui5-search_input_scope_active_shadow: inset 0 0 0 var(--sapField_BorderWidth) var(--sapButton_Lite_Active_BorderColor);
--_ui5-search-elements-background: inherit;
--_ui5_search_wrapper_outline: var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapField_Active_BorderColor);
--_ui5_search_input_outline: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
--_ui5-search-wrapper-hover-background: none;
--_ui5-search-wrapper-hover-background-color: none;
--_ui5_search_input_scope_margin: 0;
--_ui5-search_input_scope_hover_shadow: none;
--_ui5-search_input_scope_active_shadow: none;
--_ui5-search-elements-background: var(--sapShell_InteractiveBackground);
--_ui5-search-elements-hover-background: var(--sapShell_Hover_Background);
--_ui5-search-elements-active-background: var(--sapShell_Active_Background);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
--_ui5-search-wrapper-hover-background: none;
--_ui5-search-wrapper-hover-background-color: none;
--_ui5_search_input_scope_margin: 0;
--_ui5-search_input_scope_hover_shadow: none;
--_ui5-search_input_scope_active_shadow: none;
--_ui5-search-elements-background: var(--sapShell_InteractiveBackground);
--_ui5-search-elements-hover-background: var(--sapShell_Hover_Background);
--_ui5-search-elements-active-background: var(--sapShell_Active_Background);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
--_ui5-search-wrapper-hover-background: none;
--_ui5-search-wrapper-hover-background-color: none;
--_ui5_search_input_scope_margin: 0;
--_ui5-search_input_scope_hover_shadow: none;
--_ui5-search_input_scope_active_shadow: none;
--_ui5-search-elements-background: var(--sapShell_InteractiveBackground);
--_ui5-search-elements-hover-background: var(--sapShell_Hover_Background);
--_ui5-search-elements-active-background: var(--sapShell_Active_Background);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
--_ui5-search-wrapper-hover-background: none;
--_ui5-search-wrapper-hover-background-color: none;
--_ui5_search_input_scope_margin: 0;
--_ui5-search_input_scope_hover_shadow: none;
--_ui5-search_input_scope_active_shadow: none;
--_ui5-search-elements-background: var(--sapShell_InteractiveBackground);
--_ui5-search-elements-hover-background: var(--sapShell_Hover_Background);
--_ui5-search-elements-active-background: var(--sapShell_Active_Background);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
--_ui5-search-wrapper-hover-background: none;
--_ui5-search-wrapper-hover-background-color: none;
--_ui5_search_input_scope_margin: 0;
--_ui5-search_input_scope_hover_shadow: none;
--_ui5-search_input_scope_active_shadow: none;
--_ui5-search-elements-background: var(--sapShell_InteractiveBackground);
--_ui5-search-elements-hover-background: var(--sapShell_Hover_Background);
--_ui5-search-elements-active-background: var(--sapShell_Active_Background);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
--_ui5-search-wrapper-hover-background: none;
--_ui5-search-wrapper-hover-background-color: none;
--_ui5_search_input_scope_margin: 0;
--_ui5-search_input_scope_hover_shadow: none;
--_ui5-search_input_scope_active_shadow: none;
--_ui5-search-elements-background: var(--sapShell_InteractiveBackground);
--_ui5-search-elements-hover-background: var(--sapShell_Hover_Background);
--_ui5-search-elements-active-background: var(--sapShell_Active_Background);
Expand Down
Loading