@opensig/opendesign
Version:
55 lines (49 loc) • 1.21 kB
CSS
@charset "UTF-8";
/**
* OVirtualList 组件级 CSS 变量
*
* 以下变量为只读内部变量,由组件 JS 运行时通过内联 style 动态注入,
* 控制虚拟滚动的尺寸和偏移。此处声明的默认回退值仅在 JS 未执行
* (如 SSR 首屏)时生效,确保安全渲染。调用方不应自行覆盖这些变量。
*/
.o-virtual-list {
--_vl-content-height: auto;
--_vl-content-width: auto;
--_vl-offset-y: 0px;
--_vl-offset-x: 0px;
}
.o-virtual-list {
display: block;
}
.o-virtual-list-wrapper {
height: 100%;
width: 100%;
max-height: inherit;
min-height: inherit;
max-width: inherit;
min-width: inherit;
overflow: auto;
overflow-anchor: none;
}
.o-virtual-body {
overflow: hidden;
height: var(--_vl-content-height, auto);
width: var(--_vl-content-width, auto);
}
.o-virtual-render-list {
transform: translate3d(var(--_vl-offset-x, 0), var(--_vl-offset-y, 0), 0);
}
.o-virtual-render-item {
overflow: auto;
}
.o-horizontal .o-virtual-list-wrapper {
overflow-y: hidden;
overflow-x: auto;
}
.o-horizontal .o-virtual-render-list {
display: flex;
flex-direction: row;
}
.o-horizontal .o-virtual-render-item {
flex-shrink: 0;
}