UNPKG

wix-style-react

Version:
148 lines (118 loc) 2.46 kB
@st-import [card] from '../Card/Card.st.css'; :import { -st-from: '../Foundation/stylable/colors.st.css'; -st-named: F00, B10; } :import { -st-from: "../Foundation/stylable/shadows.st.css"; -st-named: shadow30; } .root { -st-states: withFooter, showActions, draggable, size(enum(small, medium)), imagePlacement(enum(top, side)), showSuffixOnHover, suffix; position: relative; flex: 1 0; min-width: 0; height: 100%; } .root:showActions { cursor: pointer; } .root:focus-visible { outline: none; box-shadow: 0 0 0 3px value(F00); } .root:withFooter .overlay { border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .primaryAction { position: relative; width: 100%; display: flex; justify-content: center; } .secondaryAction { position: absolute; top: 100%; display: flex; justify-content: center; padding-top: 6px; } .footer { display: flex; flex-direction: row; align-items: center; justify-content: space-between; padding: 18px 24px; } .root:imagePlacement(side) .card:hover { box-shadow: value(shadow30); } .root:imagePlacement(side):not(:suffix) .settingsMenu { padding-left: 12px; } .root:imagePlacement(side):suffix .settingsMenu { padding-left: 6px; } .root:imagePlacement(side) .footerSuffix { padding-left: 12px; } .root:size(medium):draggable .footer { padding: 18px 24px 18px 18px; } .root:size(small) .footer { padding: 12px 18px; } .root:size(small):draggable .footer { padding: 12px 18px 12px 12px; } .footerContent { display: flex; flex-direction: column; flex: 1 0; min-width: 0; } .footerImage { -st-states: size(enum(small, medium)); margin-right: 12px; height: 40px; width: 40px; } .footerImage:size(small) { height: 30px; width: 30px; } .footerSuffix { flex: 0 1; padding-left: 24px; } .root:showSuffixOnHover .footerSuffix { display: none; } .root:showSuffixOnHover:hover .footerSuffix { display: block; } .root:size(small):not(:imagePlacement(side)) .footerSuffix { padding-left: 18px; } .badgeWrapper { position: absolute; left: -6px; top: 12px; } :global([dir="rtl"]) .badgeWrapper { left: auto; right: -6px; } .dragHandleWrapper { margin-right: 12px; } .dragHandleFloatingWrapper { position: absolute; left: 12px; bottom: 15px; } .root:not(:hover) .dragHandleFloatingWrapper { display: none; } /* st-namespace-reference="../../../src/CardGalleryItem/CardGalleryItem.st.css" */