140 lines
9.3 KiB
CSS
140 lines
9.3 KiB
CSS
/* promptlib(提示词库)自带样式
|
||
作用域全部带 .iwb-plp-*,不影响宿主与其他插件;样式随插件发布,不必等客户端发版。 */
|
||
|
||
/* 分组胶囊「适应面板宽度」自动换行。
|
||
宿主的 .iwb-lib-chips 是 flex-wrap: nowrap(配 .iwb-lib-chips-scroll 做单行横向滚动 + 右侧渐隐),
|
||
分组多时靠后的分类看不见也点不到。双类选择器提高优先级(不依赖样式注入顺序)。 */
|
||
.iwb-lib-chips.iwb-plp-chips {
|
||
flex-wrap: wrap;
|
||
row-gap: 6px;
|
||
}
|
||
|
||
/* + / ⚙ 是动作按钮,不是分组名:不参与压缩,并与最后一个分组稍作分隔 */
|
||
.iwb-plp-chips .iwb-plp-add {
|
||
flex: 0 0 auto;
|
||
margin-left: 2px;
|
||
}
|
||
|
||
/* v1.0.2(2026-11-21):卡片化 —— 白卡 + 悬停 + 文本三行截断。
|
||
颜色一律走宿主 --iwb-plugin-* / --iwb-* token,不在插件里写死。 */
|
||
.iwb-promptlib .iwb-pname { font-weight: 600; }
|
||
.iwb-promptlib .iwb-ptext {
|
||
display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
|
||
overflow: hidden; color: var(--iwb-text2, #4d5668);
|
||
}
|
||
.iwb-promptlib .iwb-lib-cards { gap: 8px; }
|
||
|
||
/* v1.1.0(2026-11-21):封面网格 + 长文详情 + 宽编辑弹窗。
|
||
颜色全部走宿主 token,不写死。 */
|
||
.iwb-plp-card {
|
||
position: relative; border-radius: 10px; overflow: hidden; cursor: pointer;
|
||
aspect-ratio: 1 / 1; border: 1px solid var(--iwb-border, #d5d9e0);
|
||
transition: border-color .12s ease, transform .12s ease;
|
||
}
|
||
.iwb-plp-card:hover { border-color: var(--iwb-border2, #b9bfca); }
|
||
.iwb-plp-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||
.iwb-plp-t {
|
||
position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 7px 6px;
|
||
background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.66));
|
||
color: #fff; font-size: 10.5px; line-height: 1.35; max-height: 48%;
|
||
display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
|
||
text-shadow: 0 1px 2px rgba(0,0,0,.35);
|
||
}
|
||
/* 详情:长文阅读 */
|
||
.iwb-plp-dhead { display: flex; align-items: center; gap: 6px; padding: 2px 0 8px; position: sticky; top: 0; z-index: 2; background: var(--iwb-plugin-surface, #fafafb); }
|
||
.iwb-plp-dtop { align-items: flex-start; gap: 10px; margin-bottom: 8px; }
|
||
.iwb-plp-dthumb { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--iwb-border, #d5d9e0); }
|
||
.iwb-plp-dmeta { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
|
||
.iwb-plp-dtitle { font-size: 13px; font-weight: 600; color: var(--iwb-text, #1c2333); line-height: 1.45; }
|
||
.iwb-plp-dtext {
|
||
font-size: 12px; line-height: 1.75; color: var(--iwb-text2, #4d5668);
|
||
white-space: pre-wrap; word-break: break-word; padding: 4px 0 12px;
|
||
}
|
||
.iwb-plp-dfoot { display: flex; align-items: center; gap: 6px; padding: 8px 0 2px; position: sticky; bottom: 0; background: var(--iwb-plugin-surface, #fafafb); }
|
||
/* 编辑弹窗:760 宽 + 大文本框 */
|
||
.iwb-promptlib-editor { width: 760px; max-width: 94vw; }
|
||
.iwb-promptlib-editor .iwb-modal-body { max-height: 78vh; }
|
||
.iwb-promptlib-text { min-height: 360px; height: 44vh; font-size: 12.5px; line-height: 1.9; resize: vertical; }
|
||
.iwb-plp-editor-cover { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
|
||
.iwb-plp-editor-thumb { flex: 0 0 96px; width: 96px; height: 128px; border-radius: 8px; overflow: hidden; border: 1px solid var(--iwb-border, #d5d9e0); }
|
||
.iwb-plp-editor-coverops { display: flex; flex-direction: column; gap: 8px; }
|
||
|
||
/* v1.2.0:可拖动 / 可缩放的详情与编辑弹窗(同宽 880×640,最小 640×420) */
|
||
.iwb-plp-mask { background: transparent; display: block; }
|
||
.iwb-plp-dialog { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px;
|
||
box-shadow: 0 24px 60px rgba(0,0,0,.28); }
|
||
.iwb-plp-dhead { display: flex; align-items: center; gap: 6px; padding: 10px 14px;
|
||
border-bottom: 1px solid var(--iwb-border, #d5d9e0); cursor: move; user-select: none; }
|
||
.iwb-plp-grip { display: grid; grid-template-columns: repeat(3, 3px); gap: 2px; margin-right: 6px; }
|
||
.iwb-plp-grip i { width: 3px; height: 3px; border-radius: 50%; background: var(--iwb-border2, #b9bfca); display: block; }
|
||
.iwb-plp-dbody { flex: 1 1 auto; min-height: 0; display: flex; gap: 14px; padding: 14px; }
|
||
.iwb-plp-dcov { flex: 0 0 210px; width: 210px; height: 280px; border-radius: 10px; overflow: hidden;
|
||
border: 1px solid var(--iwb-border, #d5d9e0); background: var(--iwb-plugin-inset, #f5f6f7); }
|
||
.iwb-plp-dright { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
|
||
.iwb-plp-dtext { flex: 1 1 auto; min-height: 0; overflow: auto; white-space: pre-wrap; word-break: break-word;
|
||
font-size: 12px; line-height: 1.9; color: var(--iwb-text2, #4d5668); }
|
||
.iwb-plp-dfooter { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 14px;
|
||
border-top: 1px solid var(--iwb-border, #d5d9e0); }
|
||
.iwb-plp-resize { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize;
|
||
background: linear-gradient(135deg, transparent 0 45%, var(--iwb-border2, #b9bfca) 45% 50%, transparent 50% 62%, var(--iwb-border2, #b9bfca) 62% 67%, transparent 67%); }
|
||
/* 编辑:左栏固定 240,右栏大文本框 */
|
||
.iwb-plp-eleft { flex: 0 0 240px; width: 240px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
|
||
.iwb-plp-ecov { width: 240px; height: 300px; border-radius: 10px; overflow: hidden;
|
||
border: 1px solid var(--iwb-border, #d5d9e0); background: var(--iwb-plugin-inset, #f5f6f7); }
|
||
.iwb-plp-lrow { display: flex; flex-direction: column; gap: 4px; font-size: 10px; color: var(--iwb-text2, #4d5668); }
|
||
.iwb-plp-etext { flex: 1 1 auto; min-height: 0; height: auto; resize: none; font-size: 12px; line-height: 1.9; }
|
||
/* 输入框边框柔化(用户反馈现在的边框太深) */
|
||
.iwb-plp-dialog .iwb-input { border-color: color-mix(in srgb, var(--iwb-border, #d5d9e0) 72%, transparent); }
|
||
.iwb-plp-dialog .iwb-input:focus { border-color: var(--iwb-brand, #6b7280); box-shadow: 0 0 0 2px color-mix(in srgb, var(--iwb-brand, #6b7280) 14%, transparent); }
|
||
|
||
/* v1.2.1:去掉弹窗里多余的线框(用户反馈“线框太多、太明显”) */
|
||
.iwb-plp-dialog .iwb-plp-dcov,
|
||
.iwb-plp-dialog .iwb-plp-ecov { border-color: transparent; }
|
||
.iwb-plp-dialog .iwb-plp-dhead { border-bottom-color: color-mix(in srgb, var(--iwb-border, #d5d9e0) 45%, transparent); }
|
||
.iwb-plp-dialog .iwb-plp-dfooter { border-top-color: color-mix(in srgb, var(--iwb-border, #d5d9e0) 45%, transparent); }
|
||
/* 输入框:默认无边框,用浅底区分;聚焦才出现细描边 */
|
||
.iwb-plp-dialog .iwb-input {
|
||
border-color: transparent;
|
||
background: var(--iwb-plugin-inset, #f5f6f7);
|
||
box-shadow: none;
|
||
}
|
||
.iwb-plp-dialog .iwb-input:hover { background: var(--iwb-plugin-hover, #eef1f4); }
|
||
.iwb-plp-dialog .iwb-input:focus {
|
||
background: var(--iwb-panel, #fff);
|
||
border-color: color-mix(in srgb, var(--iwb-brand, #6b7280) 55%, transparent);
|
||
box-shadow: 0 0 0 2px color-mix(in srgb, var(--iwb-brand, #6b7280) 12%, transparent);
|
||
}
|
||
/* 正文编辑区:无边框、无底色,像一张纸 */
|
||
.iwb-plp-dialog .iwb-plp-etext { border-color: transparent; background: transparent; box-shadow: none; }
|
||
.iwb-plp-dialog .iwb-plp-etext:focus { border-color: transparent; box-shadow: none; background: transparent; }
|
||
/* 左侧封面区的两个按钮:去掉按钮描边,弱化成文字按钮 */
|
||
.iwb-plp-dialog .iwb-plp-eleft .iwb-btn { border-color: transparent; background: var(--iwb-plugin-inset, #f5f6f7); }
|
||
.iwb-plp-dialog .iwb-plp-eleft .iwb-btn:hover { background: var(--iwb-plugin-hover, #eef1f4); }
|
||
|
||
/* v1.3.3:封面比例不定 —— 详情/编辑里完整显示(contain,不裁切);列表保持方形裁切(网格整齐) */
|
||
.iwb-plp-dialog .iwb-plp-dcov img,
|
||
.iwb-plp-dialog .iwb-plp-ecov img { object-fit: contain; background: var(--iwb-plugin-inset, #f5f6f7); }
|
||
.iwb-plp-dialog .iwb-plp-dcov,
|
||
.iwb-plp-dialog .iwb-plp-ecov { background: var(--iwb-plugin-inset, #f5f6f7); }
|
||
.iwb-plp-card .iwb-plp-cover { object-fit: cover; object-position: center; }
|
||
|
||
/* v1.3.4:瀑布流(列式)+ 卡片定宽不随面板拉伸;面板底色统一走 --iwb-plugin-surface */
|
||
.iwb-promptlib .iwb-plp-card {
|
||
display: inline-block; width: 100%; margin: 0 0 8px;
|
||
break-inside: avoid; -webkit-column-break-inside: avoid;
|
||
aspect-ratio: auto; /* 高度交给图片原始比例 */
|
||
}
|
||
.iwb-promptlib .iwb-plp-cover { width: 100%; height: auto; object-fit: contain; }
|
||
/* 统一插件灰:面板底(宿主会给 --iwb-plugin-surface,这里只留兜底) */
|
||
.iwb-promptlib { background: transparent; }
|
||
|
||
/* v1.3.5:无封面的提示词也给一个方形占位(否则瀑布流里会塌成一条线) */
|
||
.iwb-promptlib .iwb-plp-card.no-cover { aspect-ratio: 1 / 1; }
|
||
.iwb-promptlib .iwb-plp-card.no-cover .iwb-plp-t { max-height: 60%; }
|
||
|
||
/* v1.4.7:恢复瀑布流列规则(1.4.0 清理 CSS 时把这组规则一起删掉了,列表退化成单列、卡片被拉满宽) */
|
||
.iwb-promptlib .iwb-lib-cards { display: block; column-width: 122px; column-gap: 8px; grid-template-columns: none; }
|
||
.iwb-promptlib .iwb-plp-card { display: inline-block; width: 100%; margin: 0 0 8px; break-inside: avoid; -webkit-column-break-inside: avoid; aspect-ratio: auto; }
|
||
.iwb-promptlib .iwb-plp-cover { width: 100%; height: auto; object-fit: contain; }
|
||
.iwb-promptlib .iwb-plp-card.no-cover { aspect-ratio: 1 / 1; }
|