UNPKG

@openui5/sap.m

Version:

OpenUI5 UI Library sap.m

334 lines (271 loc) 6.94 kB
/* =================================== */ /* CSS for control sap.m/ListItemBase */ /* Base theme */ /* =================================== */ @_sap_m_ListItemBase_DeleteIcon: sys-cancel; @_sap_m_ListItemBase_ButtonMarginTop: auto; @_sap_m_ListItemBase_Highlight_InformationColor: var(--sapInformationBorderColor); @_sap_m_ListItemBase_Navigated: var(--sapList_SelectionBorderColor); @_sap_m_ListItemBase_Detail_Delete_MarginLeft: 0.125rem; @_sap_m_ListItemBase_Focus_Outline: var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor); @_sap_m_ListItemBase_Focus_OffsetWithGap: calc(-@sapUiContentFocusWidth ~"- 0.0625rem"); .sapMLIB, .sapMLIBImgNav { box-sizing: border-box; } .sapMLIB { display: flex; align-items: center; position: relative; background: var(--sapList_Background); border-bottom: 1px solid var(--sapList_BorderColor); padding: 0 1rem 0 1rem; } .sapMLIBIconDet, .sapMLIBIconDel { margin-left: @_sap_m_ListItemBase_Detail_Delete_MarginLeft; } .sapMLIBContent { flex: 1 1 auto; max-width: 100%; overflow: hidden; } .sapMLIBFocusable:focus, .sapMTblCellFocusable:focus { outline: @_sap_m_ListItemBase_Focus_Outline; outline-offset: @_sap_m_ListItemBase_Focus_OffsetWithGap; } /* makes the focus outline visible when hightlight is used */ .sapMLIBFocusable:focus .sapMLIBHighlight, .sapMLIBFocusable:focus + .sapMListTblSubRow .sapMLIBHighlight { top: 4px; left: 4px; bottom: 3px; } .sapMListTblRow:not(.sapMLIBFocusable):focus, .sapMLIB:not(.sapMLIBFocusable):focus, .sapMListTblSubRow:focus { outline: none; } .sapMLIBActionable, .sapMLIBActionable > .sapMLIBImgNav, .sapMListTblNavCol > .sapMLIBImgNav, .sapMLIBActionable .sapMSLIThumbnail, .sapMLIBActionable .sapMSLIImgIcon { cursor: pointer; } .sapMLIBImgNav, .sapMLIBImgDet, .sapMLIBImgDel, .sapMLIBIconDet, .sapMLIBSelectS, .sapMLIBSelectM, .sapMLIBSelectD, .sapMLIBCounter { flex: none; } .sapMLIBHighlight { position: absolute; width: 0.375rem; bottom: 0; left: 0; top: 0; box-sizing: border-box; } .sapMLIBHighlight + .sapMLIBContent, .sapMListHighlight .sapMLIBContent:first-child { margin-left: 0.375rem; } .sapMLIBSelectS, .sapMLIBSelectM { margin-right: 0.75rem; } .sapMLIBHighlight + .sapMLIBSelectS, .sapMLIBHighlight + .sapMLIBSelectM, .sapMListHighlight > .sapMLIB > .sapMLIBSelectS:first-child, .sapMListHighlight > .sapMLIB > .sapMLIBSelectM:first-child { margin-left: -0.625rem; } .sapMLIB > .sapMLIBSelectS:first-child, .sapMLIB > .sapMLIBSelectM:first-child { margin-left: -0.8125rem; } .sapMLIBHighlightInformation { background: @_sap_m_ListItemBase_Highlight_InformationColor; } .sapMLIBHighlightSuccess { background: var(--sapSuccessBorderColor); } .sapMLIBHighlightWarning { background: var(--sapWarningBorderColor); } .sapMLIBHighlightError { background: var(--sapErrorBorderColor); } .sapMLIBHighlightIndication01 { background: var(--sapIndicationColor_1); } .sapMLIBHighlightIndication02 { background: var(--sapIndicationColor_2); } .sapMLIBHighlightIndication03 { background: var(--sapIndicationColor_3); } .sapMLIBHighlightIndication04 { background: var(--sapIndicationColor_4); } .sapMLIBHighlightIndication05 { background: var(--sapIndicationColor_5); } .sapMLIBHighlightIndication06 { background: var(--sapIndicationColor_6); } .sapMLIBHighlightIndication07 { background: var(--sapIndicationColor_7); } .sapMLIBHighlightIndication08 { background: var(--sapIndicationColor_8); } .sapMLIBHighlightIndication09 { background: var(--sapIndicationColor_9); } .sapMLIBHighlightIndication10 { background: var(--sapIndicationColor_10); } :not(.sapMListModeDelete) > .sapMLIB.sapMLIBTypeNavigation { padding-right: 0; } .sapMListShowSeparatorsNone .sapMLIBShowSeparator { border-bottom: 1px solid transparent; } .sapMListShowSeparatorsInner .sapMLIBShowSeparator:last-child { border-bottom-color: transparent; } .sapMLIB.sapMListTblSupRow { border-bottom: 0; } .sapMLIBSelectAnimation { animation-duration: 0.25s; animation-timing-function: ease-in; animation-name: resize; } @keyframes resize { 0% { width: 0; opacity: 0; } 100% { width: 2.5rem; opacity: 1; } } .sapUiSizeCompact .sapMLIBSelectAnimation { animation-duration: 0.25s; animation-timing-function: ease-in; animation-name: resizeCompact; } @keyframes resizeCompact { 0% { width: 0; opacity: 0; } 100% { width: 2rem; opacity: 1; } } .sapMLIBUnselectAnimation { animation-duration: 0.25s; animation-timing-function: ease-in; animation-name: close; } @keyframes close { 0% { width: 3rem; } 100% { width: 0; } } .sapMLIBUnread, .sapMLIBUnread > .sapMListTblCell, .sapMLIBUnread + .sapMListTblSubRow { font-family: var(--sapFontFamily); font-weight: bold; } .sapMLIBCounter { font-size: 0.875rem; color: var(--sapContent_MarkerTextColor); padding-left: 1rem; } .sapMLIBImgNav { width: 2.5rem; font-size: 0.75rem; color: var(--sapContent_LabelColor); } .sapMLIBActive .sapMLIBImgNav, .sapMLIBActive .sapMLIBIconDet .sapMBtnIcon, .sapMLIBActive .sapMLIBIconDel .sapMBtnIcon { color: var(--sapList_Active_TextColor); } .sapMListBGTransparent .sapMLIB { background: fade(@sapUiListBackground, 0); } .sapMLIBHoverable:hover { background: var(--sapList_Hover_Background); } .sapMLIB.sapMLIBSelected { background: var(--sapList_SelectionBackgroundColor); } .sapMLIB.sapMLIBActive { color: var(--sapList_Active_TextColor); background: var(--sapList_Active_Background); } .sapMLIBHoverable.sapMLIBSelected:hover { background : @sapUiListSelectionHoverBackground; } .sapMLIBHoverable.sapMLIBSelected.sapMLIBActive:hover { background: var(--sapList_Active_Background); } .sapMLIBActive div, .sapMLIBActive .sapMLIBCounter { color: var(--sapList_Active_TextColor); } .sapMLIBNavigated { width: 0.1875rem; position: absolute; right: 0; top: 0; bottom: 0; background-color: @_sap_m_ListItemBase_Navigated; } /* to make the focus outline visible when navigated=true */ .sapMLIBFocusable:focus .sapMLIBNavigated, .sapMLIBFocusable:focus + .sapMListTblSubRow .sapMLIBNavigated { top: 4px; right: 4px; bottom: 3px; } .sapMLIBActions { display: flex; align-items: center; margin-inline: 0.5rem -0.125rem; gap: 0.125rem; } .sapMLIBActionHidden { width: 2.25rem; } /* Compact size */ .sapUiSizeCompact .sapMLIB > .sapMLIBSelectS:first-child, .sapUiSizeCompact .sapMLIB > .sapMLIBSelectM:first-child { margin-left: -0.5rem; } /* Correct alignment of the selection control according to the specs. */ /* 1rem padding-left (.sapMLIB) - 0.5rem margin-left (.sapMLIBSelectM) + 3rem width (.sapMLIBSelectM) - 0.5rem margin-left (.sapMLIBSelectM + .sapMLIBContent) = 3rem */ .sapUiSizeCompact .sapMLIB > .sapMLIBSelectM + .sapMLIBContent, .sapUiSizeCompact .sapMLIB > .sapMLIBSelectS + .sapMLIBContent { margin-left: -0.5rem; } .sapUiSizeCompact .sapMLIBActionHidden { width: 2rem; }