/* * 云仓视频溯源 · 注入元素样式 * * 两条铁律: * 1. 所有选择器都以 .pst- 开头,绝不碰宿主页自己的类名; * 2. 视觉属性一律 !important —— 宿主页常有 `.content span { border:0 }` 这类全局规则, * 不加 !important 在有些后台里会「标记生效了但看不见」。 * * 另外:underline / highlight 用的是 border-bottom 与 box-shadow, * 都不参与布局,所以标记前后页面不会跳;chip 会撑开一点,用负 margin 抵掉。 */ /* ============ 默认方式:在命中元素旁边渲染的「查看打包视频」按钮 ============ * 这个按钮是**新增的兄弟节点**,宿主元素一个字都没改,所以不会影响页面原有的事件。 * 又因为它被放在别人的表格/列表里,得抵抗 Element-Plus 这类全局 button 样式,所以属性写得比较霸道。 */ .pst-trace-btn { display: inline-block !important; margin: 0 0 0 6px !important; padding: 1px 7px !important; border: 0 !important; border-radius: 3px !important; background: #0ea5a4 !important; color: #fff !important; font-family: inherit !important; font-size: 11px !important; line-height: 16px !important; font-weight: 400 !important; letter-spacing: 0 !important; text-transform: none !important; text-align: center !important; vertical-align: middle !important; white-space: nowrap !important; width: auto !important; min-width: 0 !important; height: auto !important; min-height: 0 !important; box-shadow: none !important; outline: 0 !important; -webkit-user-select: none; user-select: none; } .pst-trace-btn::before { content: '\25B6'; /* ▶ */ font-size: 8px !important; margin-right: 4px; vertical-align: 1px; } .pst-trace-btn:hover { background: #0b8c8b !important; } .pst-trace-btn:active { background: #0b7d7c !important; } /* text 模式下给按钮定位用的 span:不带任何视觉,只是想有个锚点 */ .pst-trace-anchor { display: inline !important; } .pst-trace-mark { cursor: pointer !important; border-radius: 3px; /* * 这里**故意不写 transition: border-color**: * border-bottom-color 不写时初始值是 currentColor(宿主页的链接色,实测 #409eff), * 一旦把 border-color 放进过渡里,标记出来的瞬间 computed 值是“渐变中”的宿主色 —— * 表现为每标记一处都闪一下蓝(实测 0ms=rgb(64,158,255) → 150ms 后=rgb(14,165,164))。 * 去掉后边框色立即确定。 */ transition: background-color .15s ease, box-shadow .15s ease; -webkit-box-decoration-break: clone; box-decoration-break: clone; } /* ---------- 下划线:默认样式,零布局影响 ---------- */ .pst-trace-mark.pst-style-underline { border-bottom: 1px dashed #0ea5a4 !important; padding-bottom: 1px; } .pst-trace-mark.pst-style-underline:hover, .pst-trace-mark.pst-style-underline.pst-open { border-bottom-style: solid !important; border-bottom-color: #0b7d7c !important; } /* ---------- 高亮:淡青底 + 内描边(box-shadow 不占布局) ---------- */ .pst-trace-mark.pst-style-highlight { background-color: rgba(14, 165, 164, .16) !important; box-shadow: inset 0 0 0 1px rgba(14, 165, 164, .45) !important; } .pst-trace-mark.pst-style-highlight:hover, .pst-trace-mark.pst-style-highlight.pst-open { background-color: rgba(14, 165, 164, .30) !important; box-shadow: inset 0 0 0 1px rgba(11, 125, 124, .85) !important; } /* ---------- 胶囊:视觉最重,适合少量关键字段 ---------- */ .pst-trace-mark.pst-style-chip { background-color: rgba(14, 165, 164, .16) !important; box-shadow: inset 0 0 0 1px rgba(14, 165, 164, .5) !important; padding: 0 4px !important; margin: 0 -4px !important; } .pst-trace-mark.pst-style-chip:hover, .pst-trace-mark.pst-style-chip.pst-open { background-color: rgba(14, 165, 164, .30) !important; } /* ---------- 小播放角标:提示「点了能看视频」 ---------- */ .pst-trace-mark.pst-has-icon::after { content: '\25B6'; /* ▶ */ font-size: 9px !important; line-height: 1 !important; color: #0b7d7c !important; vertical-align: super; margin-left: 2px; opacity: .8; -webkit-user-select: none; user-select: none; } /* 点了给个反馈 */ .pst-trace-mark.pst-open { animation: pst-pulse .7s ease-out; } @keyframes pst-pulse { 0% { background-color: rgba(14, 165, 164, .55); } 100% { background-color: transparent; } } /* selector 模式标在宿主元素(可能是