UNPKG

tdesign-react

Version:
160 lines (159 loc) 3.3 kB
.t-image__wrapper { position: relative; background: var(--td-bg-color-secondarycontainer); z-index: 1; } .t-image__wrapper--shape-square { border-radius: 0; } .t-image__wrapper--shape-round { border-radius: var(--td-radius-medium); } .t-image__wrapper--shape-circle { border-radius: 50%; } .t-image__wrapper--gallery { border-radius: var(--td-radius-medium); } .t-image__wrapper--gallery .t-image { position: relative; z-index: 5; } .t-image__wrapper--need-hover { cursor: pointer; } .t-image { width: 100%; height: 100%; border-radius: inherit; position: relative; z-index: inherit; } .t-image--fit-fill { -o-object-fit: fill; object-fit: fill; } .t-image--fit-contain { -o-object-fit: contain; object-fit: contain; } .t-image--fit-cover { -o-object-fit: cover; object-fit: cover; } .t-image--fit-scale-down { -o-object-fit: scale-down; object-fit: scale-down; } .t-image--fit-none { -o-object-fit: none; object-fit: none; } .t-image--position-center { -o-object-position: center; object-position: center; } .t-image--position-bottom { -o-object-position: bottom; object-position: bottom; } .t-image--position-top { -o-object-position: top; object-position: top; } .t-image--position-left { -o-object-position: left; object-position: left; } .t-image--position-right { -o-object-position: right; object-position: right; } .t-image__gallery-shadow { position: absolute; left: 0; right: -24px; top: 24px; bottom: 24px; background: rgba(238, 238, 238, 0.26); border-radius: var(--td-radius-medium); z-index: calc(5 - 2); } .t-image__gallery-shadow::before, .t-image__gallery-shadow::after { content: ''; position: absolute; left: 0; border-radius: var(--td-radius-medium); } .t-image__gallery-shadow::after { top: -16px; right: 16px; bottom: -16px; background: rgba(238, 238, 238, 0.8); z-index: calc(5 - 1); } .t-image__gallery-shadow::before { top: -8px; right: 8px; bottom: -8px; background: rgba(238, 238, 238, 0.5); z-index: calc(5 - 3); } .t-image__placeholder { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; z-index: 0; } .t-image__overlay-content { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: calc(5 + 1); opacity: 1; visibility: visible; -webkit-transition: visibility 0s, opacity 0.2s linear; transition: visibility 0s, opacity 0.2s linear; } .t-image__overlay-content--hidden { visibility: hidden; opacity: 0; } .t-image__loading, .t-image__error { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; z-index: calc(0 + 1); } .t-image__loading { color: var(--td-text-color-secondary); } .t-image__error { color: var(--td-text-color-disabled); }