Skip to content

Commit

Permalink
fix(ui5-li): address additional text contrast issue
Browse files Browse the repository at this point in the history
The contrast of the additional text in the list item is not sufficient.
This change addresses the issue by increasing the contrast of the
additional text by adding a text shadow and aligning the component with
the design guidelines.

Fixes: #9869
  • Loading branch information
kgogov committed Nov 28, 2024
1 parent 3b6cc84 commit 08e029f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/main/src/themes/ListItem.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
color: var(--sapList_Active_TextColor);
}

:host([active][actionable]) .ui5-li-additional-text {
text-shadow: none;
}

/* [ui5-li]: additionalTextState */
:host([additional-text-state="Critical"]) .ui5-li-additional-text {
color: var(--sapCriticalTextColor);
Expand Down
8 changes: 8 additions & 0 deletions packages/main/src/themes/ListItemBase.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@
:host([selected]) {
background-color: var(--sapList_SelectionBackgroundColor);
border-bottom: var(--ui5-listitem-selected-border-bottom);

.ui5-li-additional-text {
text-shadow: var(--sapContent_TextShadow);
}
}

/* hovered */
:host([actionable]:not([active]):not([selected]):not([ui5-li-group-header]):hover) {
background-color: var(--sapList_Hover_Background);

.ui5-li-additional-text {
text-shadow: var(--sapContent_TextShadow);
}
}

/* selected and hovered */
Expand Down

0 comments on commit 08e029f

Please sign in to comment.