Files
DCU_DesktopController/css/can.css
T
cbb d2c86c425a init: DCU ESP32 调试控制台前端与本地页面服务
纯前端上位机界面 + esp32_server.py 静态服务/桌面窗口外壳, 不含固件、
不直接访问硬件; 业务 API 由 ESP32_COMM 固件 80 端口跨域提供。

- tabs.html 单窗口多标签外壳, iframe 承载各功能页
- index.html OTA 中继(ESP32 WiFi / GD32 relay / BLE), js/ota + js/ble
- can.html / can_monitor.html CAN 通信与接收监控, js/can
- motor.html 电机 CAN FD 控制台, js/motor
- continuity_test.html LAN9252 通断测试, spi_test.html SPI 测速(临时, 自包含)
- 三入口: esp32_app.vbs 桌面窗口 / esp32_web.vbs 浏览器 / serve.bat 控制台调试
- 补 README(页面与目录约定、?v= 缓存版本等改动须知)、.gitignore、
  .gitattributes(* -text 保持 Windows 换行原样)
2026-09-03 21:30:32 +08:00

1713 lines
39 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* === can.css — CAN 面板/工作台/1Hz反馈/ID快照/报文行展开/节点过滤 等 CAN 专用样式 === */
/* === CAN PANEL === */
.can-grid {
display: grid; grid-template-columns: 70px 1fr 60px 1fr; gap: 10px;
}
.can-launch-card {
background:
radial-gradient(circle at top right, rgba(67,217,123,.16), transparent 28%),
linear-gradient(138deg, rgba(18,29,41,.96), rgba(20,29,40,.92) 48%, rgba(14,21,31,.98) 100%);
border: 1px solid rgba(67,217,123,.16);
border-radius: 14px;
padding: 20px;
box-shadow:
inset 0 0 0 1px rgba(255,255,255,.02),
0 18px 40px rgba(0,0,0,.18);
position: relative;
overflow: hidden;
}
.can-launch-card::before {
content: "";
position: absolute;
inset: 0 auto 0 0;
width: 4px;
background: linear-gradient(180deg, rgba(67,217,123,.9), rgba(67,217,123,.18));
}
.can-launch-copy {
position: relative;
z-index: 1;
}
.can-launch-top {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
margin-bottom: 10px;
}
.can-launch-copy h3 {
font-size: 22px;
line-height: 1.2;
margin: 6px 0 0;
}
.can-launch-desc {
color: var(--text-dim);
font-size: 13px;
line-height: 1.7;
max-width: 700px;
}
.can-launch-kicker {
color: #8ef0b4;
font-size: 10px;
letter-spacing: .18em;
text-transform: uppercase;
opacity: .92;
}
.can-launch-badge {
display: inline-flex;
align-items: center;
padding: 7px 12px;
border-radius: 999px;
background: rgba(67,217,123,.09);
border: 1px solid rgba(67,217,123,.22);
color: #a9f5c8;
font-size: 11px;
font-weight: 700;
letter-spacing: .12em;
text-transform: uppercase;
white-space: nowrap;
}
.can-launch-points {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 14px;
}
.can-launch-point {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 7px 11px;
border-radius: 999px;
background: rgba(255,255,255,.03);
border: 1px solid rgba(255,255,255,.06);
color: #c6d7e8;
font-size: 12px;
}
.can-launch-point::before {
content: "";
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--can);
box-shadow: 0 0 10px rgba(67,217,123,.35);
}
.can-launch-actions {
display: grid;
grid-template-columns: minmax(0, 1.15fr) minmax(180px, .85fr);
gap: 10px;
margin-top: 18px;
position: relative;
z-index: 1;
}
.can-launch-primary,
.can-launch-secondary {
min-height: 42px;
}
.can-launch-primary {
background: linear-gradient(135deg, var(--can) 0%, #22b45f 100%);
color: #04240f;
box-shadow: 0 10px 24px rgba(67,217,123,.2);
}
.can-launch-secondary {
color: #d5e4f4;
border-color: rgba(255,255,255,.08);
background: rgba(255,255,255,.015);
}
.can-launch-secondary:hover:not(:disabled) {
background: rgba(255,255,255,.05);
border-color: rgba(67,217,123,.25);
}
.can-launch-foot {
display: flex;
gap: 10px;
align-items: flex-start;
margin-top: 16px;
padding-top: 14px;
border-top: 1px solid rgba(255,255,255,.06);
color: #91a6bc;
font-size: 12px;
line-height: 1.7;
position: relative;
z-index: 1;
}
/* 电机入口:复用 can-launch 布局,换青色强调 */
.motor-launch-card {
background:
radial-gradient(circle at top right, rgba(34,211,238,.16), transparent 28%),
linear-gradient(138deg, rgba(18,29,41,.96), rgba(20,29,40,.92) 48%, rgba(14,21,31,.98) 100%);
border-color: rgba(34,211,238,.16);
}
.motor-launch-card::before {
background: linear-gradient(180deg, rgba(34,211,238,.9), rgba(34,211,238,.18));
}
.motor-launch-card .can-launch-kicker { color: #67e8f9; }
.motor-launch-card .can-launch-badge {
background: rgba(34,211,238,.09);
border-color: rgba(34,211,238,.22);
color: #a5f3fc;
}
.motor-launch-card .can-launch-point::before {
background: var(--motor, #22d3ee);
box-shadow: 0 0 10px rgba(34,211,238,.35);
}
.motor-launch-primary {
background: linear-gradient(135deg, var(--motor, #22d3ee) 0%, #0891b2 100%) !important;
color: #042f2e !important;
box-shadow: 0 10px 24px rgba(34,211,238,.2);
}
.motor-launch-card .can-launch-secondary:hover:not(:disabled) {
border-color: rgba(34,211,238,.25);
}
.can-launch-foot-label {
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 40px;
padding: 4px 8px;
border-radius: 999px;
background: rgba(255,255,255,.04);
color: #d8e6f4;
font-size: 10px;
letter-spacing: .12em;
text-transform: uppercase;
}
/* === CAN WORKSPACE PAGE === */
/* 右侧监控抽屉 translate 出屏时,防止 body 被撑出横向滚动条 */
body.can-page {
overflow-x: hidden;
max-width: 100%;
}
.can-page::after {
content: "";
position: fixed;
inset: 0;
pointer-events: none;
background:
radial-gradient(circle at 10% 18%, rgba(34,211,238,.08), transparent 26%),
radial-gradient(circle at 85% 14%, rgba(245,158,11,.05), transparent 24%);
}
.can-container {
max-width: min(1700px, 100%);
width: 100%;
box-sizing: border-box;
}
.can-header {
position: sticky;
top: 16px;
z-index: 5;
backdrop-filter: blur(14px);
background: rgba(15,22,31,.86);
}
/* sticky+backdrop-filter 合成层冲突致 fadeInUp 卡首帧(translateY(10px)+opacity:0),
* 禁用入场动画。选择器需 .header-bar.can-header 以胜过 responsive.css 的 .header-bar 规则 */
.header-bar.can-header { animation: none; }
.can-header-actions {
margin-left: auto;
}
.can-link-pill {
text-decoration: none;
color: var(--text);
}
.can-toolbar-card,
.can-table-card,
.can-editor-layout {
margin-top: 18px;
}
.can-toolbar-grid {
display: grid;
grid-template-columns: minmax(220px, 1.1fr) 140px minmax(200px, 1fr);
gap: 14px;
align-items: start;
}
.can-toolbar-grid-compact {
grid-template-columns: 140px minmax(220px, 1fr);
}
.can-toolbar-grid-dbc-only {
grid-template-columns: 1fr;
max-width: 420px;
}
/* DBC 并入报文列表卡 */
.can-table-card.dbc-dropzone {
position: relative;
transition: box-shadow .15s, border-color .15s;
}
.can-table-card.dbc-dropzone.dragover {
border-color: var(--accent);
box-shadow: 0 0 0 2px var(--accent-dim);
}
.can-table-card.dbc-dropzone.dragover::after {
content: '松开以导入 DBC';
position: absolute;
inset: 0;
z-index: 5;
display: flex;
align-items: center;
justify-content: center;
background: rgba(9, 14, 21, 0.72);
color: var(--accent);
font-weight: 700;
font-size: 15px;
pointer-events: none;
border-radius: inherit;
}
/* 标题栏内:统计 + 文件 chip 同一行;chip 先铺满横轴,真不够再折行 */
.dbc-summary-inline {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
gap: 8px 10px;
margin: 0 0 0 8px;
flex: 1 1 auto;
min-width: 0;
max-width: none;
padding: 2px 6px;
white-space: nowrap;
overflow: hidden;
}
.dbc-summary-inline .dbc-summary-meta {
flex: 0 0 auto;
}
.dbc-file-chips {
display: flex;
flex-direction: row;
flex-wrap: wrap; /* 仅在占满标题栏剩余宽度后折行 */
align-items: center;
align-content: flex-start;
gap: 4px 6px;
flex: 1 1 auto;
min-width: 0;
max-width: none; /* 去掉 40vw/360px 上限,吃满横轴 */
overflow: hidden;
}
.dbc-file-chip {
display: inline-flex;
align-items: center;
gap: 2px;
max-width: 140px;
padding: 1px 2px 1px 6px;
border-radius: 999px;
background: rgba(34, 211, 238, 0.1);
border: 1px solid rgba(34, 211, 238, 0.25);
font-size: 10px;
color: var(--text);
flex: 0 0 auto;
}
.dbc-file-chip-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 110px;
}
.dbc-file-chip-remove {
border: none;
background: transparent;
color: var(--text-dim);
cursor: pointer;
font-size: 14px;
line-height: 1;
padding: 0 4px;
border-radius: 50%;
}
.dbc-file-chip-remove:hover {
color: var(--red);
background: rgba(239, 68, 68, 0.12);
}
.dbc-empty-drop {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 6px;
min-height: 280px;
padding: 32px 16px;
text-align: center;
color: var(--text-dim);
cursor: pointer;
border: 1px dashed var(--border);
border-radius: var(--radius-sm);
margin: 12px;
background: rgba(255, 255, 255, 0.02);
}
.dbc-empty-drop:hover {
border-color: var(--accent);
color: var(--text);
}
.dbc-empty-drop h4 {
margin: 0;
font-size: 15px;
color: var(--text);
font-weight: 600;
}
.dbc-empty-drop p {
margin: 0;
font-size: 12px;
}
.can-table-card-body .helper-note {
margin: 0 12px 12px;
}
.can-toolbar-block {
min-width: 0;
}
.can-toolbar-upload .upload-zone {
min-height: 72px;
padding: 12px 12px;
}
.can-toolbar-upload .upload-zone h4 { font-size: 13px; margin: 4px 0 2px; }
.can-toolbar-upload .upload-zone p { font-size: 11px; margin: 0; }
/* DBC 解析摘要:强制单行 */
.dbc-summary-strip {
display: flex;
flex-wrap: nowrap;
align-items: center;
gap: 6px 8px;
margin-top: 8px;
padding: 6px 8px;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: rgba(255, 255, 255, 0.02);
font-size: 11px;
color: var(--text-dim);
min-width: 0;
white-space: nowrap;
}
.dbc-summary-strip[hidden] { display: none !important; }
.dbc-summary-name {
flex: 0 1 auto;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--text);
font-weight: 600;
}
.dbc-summary-meta {
display: inline-flex;
flex-wrap: nowrap;
align-items: center;
gap: 0 8px;
flex: 0 0 auto;
white-space: nowrap;
font-variant-numeric: tabular-nums;
}
.dbc-summary-meta > span {
white-space: nowrap;
flex: 0 0 auto;
}
.dbc-summary-meta b {
color: var(--text);
font-weight: 600;
margin-right: 1px;
}
.dbc-summary-strip .btn { flex: 0 0 auto; padding: 2px 8px; white-space: nowrap; }
.can-toolbar-foot {
display: flex;
flex-wrap: wrap;
gap: 10px 16px;
margin-top: 12px;
align-items: center;
}
.can-toolbar-foot .helper-note {
flex: 1 1 160px;
margin: 0;
font-size: 11px;
}
/* 报文列表标题栏:标题 | 摘要+chip(吃满中间) | 清除/添加 */
.can-msg-list-head {
flex-wrap: nowrap;
row-gap: 8px;
min-width: 0;
}
.can-msg-list-head > .dbc-summary-inline {
margin-left: 8px;
flex: 1 1 auto;
min-width: 0;
}
.can-msg-head-actions {
display: inline-flex;
align-items: center;
gap: 6px;
flex: 0 0 auto;
margin-left: 8px;
}
.can-msg-list-head > .dbc-summary-inline + .can-msg-head-actions {
margin-left: 8px;
}
.can-msg-head-actions #clearDbcBtn[hidden] {
display: none !important;
}
/* 通道 / 搜索 / 勾选 / 节点 / 批量 — 同一行工具栏 */
.can-msg-toolbar {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px 10px;
padding: 8px 14px;
border-bottom: 1px solid var(--border);
background: rgba(15, 23, 42, 0.35);
min-width: 0;
/* 不可用 overflow-x:auto:会把 overflow-y 也变成 clip,节点下拉被裁切 */
overflow: visible;
position: relative;
z-index: 40; /* 高于 .message-table-head / 列表,避免下拉沉底 */
}
.can-msg-channel {
display: inline-flex;
align-items: center;
gap: 6px;
flex: 0 0 auto;
font-size: 11px;
color: var(--text-dim);
text-transform: none;
letter-spacing: 0;
font-weight: 500;
cursor: pointer;
margin: 0;
}
.can-msg-channel-label {
white-space: nowrap;
}
.can-msg-channel-select {
width: 72px;
min-width: 72px;
height: 30px;
padding: 2px 6px;
font-size: 12px;
}
.can-msg-search-wrap {
flex: 1 1 140px;
min-width: 120px;
max-width: 260px;
}
.can-msg-search {
width: 100%;
padding: 5px 10px;
font-size: 12px;
height: 30px;
}
.can-msg-toolbar .can-batch-actions {
flex: 0 1 auto;
margin-left: auto;
flex-wrap: nowrap;
gap: 6px;
min-width: 0;
}
.can-msg-toolbar .pill {
white-space: nowrap;
flex-shrink: 0;
}
.can-msg-toolbar .btn-sm {
white-space: nowrap;
flex-shrink: 0;
}
.can-msg-toolbar .can-batch-all-label {
white-space: nowrap;
flex-shrink: 0;
}
.can-table-card-body {
padding: 0;
}
.can-editor-layout {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
gap: 18px;
align-items: start;
min-width: 0;
width: 100%;
max-width: 100%;
}
.can-editor-layout > .can-main-col,
.can-editor-layout > .can-sidepanel {
min-width: 0;
max-width: 100%;
}
.can-sidepanel {
display: flex;
flex-direction: column;
gap: 10px; /* 两卡间距略紧,仍保持独立卡片 */
width: 100%;
}
.can-sidepanel > .card {
margin-top: 0;
min-width: 0;
max-width: 100%;
}
.can-preview-card .card-body,
.can-raw-card .card-body {
padding-top: 12px;
padding-bottom: 12px;
}
.dbc-dropzone {
position: relative;
overflow: hidden;
}
.dbc-dropzone::after {
content: "";
position: absolute;
inset: -40% auto auto -10%;
width: 180px;
height: 180px;
background: radial-gradient(circle, rgba(34,211,238,.18), transparent 68%);
pointer-events: none;
}
.message-list {
max-height: 390px;
overflow-x: hidden !important;
overflow-y: auto;
overscroll-behavior-x: none;
}
.message-table {
/* 列宽随左栏宽度自适应压缩,禁止撑出横向滚动 */
min-width: 0 !important;
width: 100%;
max-width: 100%;
table-layout: fixed;
}
.message-table-body {
min-width: 0;
width: 100%;
max-width: 100%;
overflow-x: hidden;
}
.message-table-head,
.message-row {
display: grid;
/* 报文名称勿抢宽;标识符/DLC/信号/节点给固定下限,避免被挤没 */
grid-template-columns:
34px /* 勾选 */
34px /* 展开 */
28px /* # */
minmax(0, 0.55fr) /* DBC名称 */
minmax(0, 1fr) /* 报文名称(收窄,长名省略) */
minmax(7.2em, 0.65fr)/* 标识符 */
0fr /* 通道 */
0fr /* 类型 */
2.8em /* DLC */
2.8em /* 信号 */
minmax(5.5em, 0.8fr) /* 发送节点 */
minmax(0, 0.65fr); /* 注释 */
align-items: center;
min-width: 0;
width: 100%;
max-width: 100%;
box-sizing: border-box;
}
.message-col-name {
/* 名称过长只省略,不撑开其它列 */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.message-col-id,
.message-col-dlc,
.message-col-signal,
.message-col-node {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.message-table-head {
position: sticky;
top: 0;
z-index: 2;
background: #182330;
border-bottom: 1px solid var(--border);
}
.message-row {
width: 100%;
border: 0;
background: transparent;
color: var(--text);
text-align: left;
cursor: pointer;
border-bottom: 1px solid rgba(255,255,255,.04);
transition: background .12s ease, border-color .12s ease;
}
.message-row:hover {
background: rgba(255,255,255,.03);
}
.message-row.active {
background: linear-gradient(90deg, rgba(34,211,238,.2), rgba(34,211,238,.07));
box-shadow: inset 3px 0 0 0 var(--accent);
}
.message-col {
padding: 8px 6px;
font-size: 12px;
line-height: 1.45;
border-right: 1px solid rgba(255,255,255,.03);
min-width: 0;
box-sizing: border-box;
}
.message-table-head .message-col {
font-size: 11px;
font-weight: 700;
letter-spacing: .08em;
color: #c8d6e7;
text-transform: uppercase;
}
.message-col:last-child {
border-right: 0;
}
.message-col-index,
.message-col-dlc,
.message-col-signal,
.message-col-channel,
.message-col-type {
text-align: center;
}
.message-col-id,
.history-item-hex,
.can-frame-hex,
.can-title,
.can-subtitle,
.byte-pill,
.history-item-main,
.history-item-foot,
.signal-table,
.signal-cell-meta,
.signal-cell-range {
font-family: var(--font-mono);
}
.message-col-id {
color: var(--accent);
font-size: 12px;
}
.message-col-dbc {
color: var(--accent);
font-size: 11px;
font-weight: 600;
opacity: .9;
}
.can-empty-state {
display: grid;
place-items: center;
min-height: 300px;
text-align: center;
border: 1px dashed rgba(34,211,238,.2);
border-radius: var(--radius);
background: linear-gradient(180deg, rgba(26,36,50,.7), rgba(20,29,40,.96));
padding: 28px;
}
.can-empty-icon {
width: 70px;
height: 70px;
border-radius: 18px;
display: grid;
place-items: center;
margin-bottom: 14px;
background: rgba(34,211,238,.12);
font-size: 32px;
box-shadow: inset 0 0 0 1px rgba(34,211,238,.16);
}
.can-empty-state h3 {
font-size: 22px;
margin-bottom: 8px;
}
.can-empty-state p {
max-width: 560px;
color: var(--text-dim);
line-height: 1.75;
}
.can-title {
font-size: 24px;
font-weight: 700;
letter-spacing: .02em;
}
.can-subtitle {
margin-top: 6px;
color: var(--text-dim);
font-size: 13px;
}
.can-selection-bar {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
.can-selection-actions {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.can-meta-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 10px;
margin-top: 16px;
}
.can-meta-card {
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: 10px;
padding: 12px;
}
.can-meta-card span {
display: block;
font-size: 10px;
color: var(--text-label);
letter-spacing: .08em;
text-transform: uppercase;
margin-bottom: 4px;
}
.can-meta-card b {
font-size: 14px;
}
.can-comment-note {
margin-top: 16px;
}
.can-frame-panel {
background: linear-gradient(180deg, rgba(26,36,50,.95), rgba(13,19,27,.98));
border: 1px solid rgba(34,211,238,.12);
border-radius: 16px;
padding: 18px;
box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.can-frame-panel-compact {
padding: 16px;
}
.can-panel-kicker {
color: var(--text-label);
font-size: 10px;
letter-spacing: .12em;
text-transform: uppercase;
}
.can-panel-title {
margin-top: 6px;
font-size: 16px;
font-weight: 700;
}
.can-frame-hex {
margin-top: 14px;
padding: 16px 18px;
border-radius: 12px;
background: #081019;
color: #7ef3ff;
font-size: 18px;
line-height: 1.6;
word-break: break-all;
border: 1px solid rgba(34,211,238,.16);
}
.can-byte-strip {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-top: 8px;
}
.byte-pill {
min-width: 0;
width: 36px;
padding: 3px 2px 4px;
border-radius: 6px;
background: rgba(34,211,238,.08);
border: 1px solid rgba(34,211,238,.16);
text-align: center;
font-size: 11px;
line-height: 1.2;
font-family: var(--font-mono);
flex: 0 0 auto;
}
.byte-pill b {
display: block;
color: var(--text-label);
font-size: 9px;
font-weight: 600;
margin-bottom: 1px;
letter-spacing: 0;
font-family: var(--font);
}
.byte-pill > span {
font-variant-numeric: tabular-nums;
}
.signal-table-host {
display: block;
margin-top: 18px;
min-width: 0;
max-width: 100%;
}
.signal-table {
width: 100%;
max-width: 100%;
min-width: 0;
border: 1px solid var(--border);
border-radius: 12px;
overflow: hidden;
}
.signal-table-head,
.signal-row {
display: grid;
/* 全部可收缩,禁止固定 min 像素把容器撑宽 */
grid-template-columns:
2.2em
minmax(0, 1.15fr)
minmax(0, 0.9fr)
minmax(0, 0.95fr)
minmax(0, 0.85fr)
minmax(0, 0.9fr);
align-items: stretch;
min-width: 0;
width: 100%;
max-width: 100%;
box-sizing: border-box;
}
.signal-table-inline .signal-cell {
padding: 8px 8px;
}
.signal-table-inline .signal-cell b,
.signal-table-inline .signal-cell small {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 100%;
}
.signal-table-head {
background: #182330;
border-bottom: 1px solid var(--border);
}
.signal-table-body {
max-height: 520px;
overflow-x: hidden;
overflow-y: auto;
}
.signal-row {
border-bottom: 1px solid rgba(255,255,255,.04);
background: rgba(255,255,255,.01);
}
.signal-row:nth-child(even) {
background: rgba(255,255,255,.025);
}
.signal-cell {
padding: 11px 12px;
border-right: 1px solid rgba(255,255,255,.03);
font-size: 12px;
line-height: 1.5;
min-width: 0;
}
.signal-cell:last-child {
border-right: 0;
}
.signal-table-head .signal-cell {
font-size: 11px;
font-weight: 700;
letter-spacing: .08em;
color: #c8d6e7;
text-transform: uppercase;
}
.signal-cell-index {
text-align: center;
}
.signal-cell-name b,
.signal-cell-range b,
.signal-cell-meta b {
display: block;
font-size: 12px;
color: var(--text);
}
.signal-cell-name small,
.signal-cell-range small,
.signal-cell-meta small,
.signal-cell-comment {
display: block;
margin-top: 4px;
color: var(--text-dim);
font-size: 11px;
line-height: 1.45;
}
.signal-input-compact {
min-width: 0;
padding: 8px 10px;
font-size: 12px;
}
.can-response {
margin-top: 14px;
padding: 12px 14px;
border-radius: 12px;
background: var(--bg-elevated);
border: 1px solid var(--border);
font-family: var(--font-mono);
font-size: 12px;
word-break: break-all;
}
.can-response.ok {
border-color: rgba(34,197,94,.25);
color: #c7f9d5;
}
.can-response.err {
border-color: rgba(239,68,68,.25);
color: #fecaca;
}
.can-response-label {
color: var(--text-label);
font-size: 11px;
margin-bottom: 6px;
font-family: var(--font);
}
.history-list {
display: flex;
flex-direction: column;
gap: 4px;
max-height: 620px;
overflow-x: hidden;
overflow-y: auto;
padding-right: 4px;
min-width: 0;
max-width: 100%;
}
.history-list-compact {
max-height: 420px;
}
/* 单行紧凑历史:充分利用横轴,减少行高 */
.history-item {
padding: 5px 10px;
border-radius: 8px;
background: var(--bg-elevated);
border: 1px solid var(--border);
min-width: 0;
max-width: 100%;
box-sizing: border-box;
}
.history-item-row {
display: grid;
grid-template-columns:
auto
56px
minmax(0, 0.7fr)
minmax(0, 0.8fr)
minmax(0, 1.6fr);
align-items: center;
gap: 8px 10px;
min-width: 0;
max-width: 100%;
}
.history-item-row.is-err {
border-color: rgba(239, 68, 68, 0.35);
}
.history-item-time {
color: var(--text-label);
font-size: 11px;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.history-item-tag {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 2px 7px;
border-radius: 999px;
font-size: 10px;
font-weight: 700;
letter-spacing: .06em;
white-space: nowrap;
line-height: 1.3;
}
.history-item-tag.ok {
background: rgba(34,197,94,.12);
color: #b8f5cb;
}
.history-item-tag.err {
background: rgba(239,68,68,.12);
color: #fecaca;
}
.history-item-main {
margin-top: 0;
font-size: 12px;
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}
.history-item-hex {
margin-top: 0;
font-size: 11px;
color: #7ef3ff;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
word-break: normal;
}
.history-item-foot {
margin-top: 0;
font-size: 11px;
color: var(--text-dim);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
text-align: right;
}
/* Click-to-Copy 样式 */
.history-item-row .copyable {
cursor: pointer;
border-radius: 4px;
padding: 1px 4px;
margin: -1px -4px;
transition: background .15s, color .15s;
}
.history-item-row .copyable:hover {
background: rgba(255,255,255,.08);
}
.history-item-row .copyable:active {
background: rgba(255,255,255,.14);
}
.history-item-row .copyable.copied {
background: rgba(34,197,94,.18);
color: #86efac;
}
/* === CAN 1Hz FEEDBACK === */
.can-feedback-card { margin-top: 18px; }
.can-feedback-card .card-head {
display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.feedback-controls { display: flex; align-items: center; gap: 8px; }
.feedback-grid {
display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
/* can.html 右侧监控抽屉:竖向排三路,窄宽也能读 */
.feedback-grid-drawer {
grid-template-columns: 1fr;
gap: 12px;
}
.can-monitor-drawer {
/* 用 100% 视口减量,避免 100vw 含滚动条宽度把页面撑出横条 */
--sys-drawer-panel-w: min(440px, calc(100% - 48px));
max-width: 100%;
}
.can-monitor-drawer .sys-drawer-body .status-section-title:first-child {
margin-top: 0;
}
.can-monitor-drawer .conn-indicator {
display: inline-flex;
align-items: center;
padding: 2px 8px;
margin: 0;
background: transparent;
border: none;
}
.feedback-channel.ch-disabled {
opacity: 0.45;
filter: grayscale(0.35);
}
.feedback-channel.ch-disabled .feedback-ch-head {
cursor: default;
}
.feedback-channel {
background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
border-radius: 10px; padding: 14px 16px;
}
.feedback-ch-head {
font-weight: 700; font-size: 15px; margin-bottom: 10px;
display: flex; align-items: center; gap: 8px;
cursor: pointer;
user-select: none;
}
.feedback-expand-caret {
margin-left: auto;
font-size: 11px;
color: var(--text-dim);
transition: transform .15s ease;
opacity: .7;
}
.feedback-channel.collapsed .feedback-expand-caret {
transform: rotate(-90deg);
}
.feedback-channel.collapsed .feedback-detail {
display: none;
}
.feedback-channel:not(.collapsed) .feedback-ch-head {
margin-bottom: 8px;
}
.feedback-primary .feedback-row:last-child {
border-bottom: 1px solid rgba(255,255,255,.04);
}
.feedback-channel:not(.collapsed) .feedback-primary .feedback-row:last-child {
border-bottom: 1px solid rgba(255,255,255,.04);
}
.feedback-detail {
margin-top: 2px;
padding-top: 2px;
border-top: 1px dashed rgba(255,255,255,.06);
}
.ch-dot {
width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.ch-dot.ch0 { background: #22d3ee; }
.ch-dot.ch1 { background: #a78bfa; }
.ch-dot.ch2 { background: #f59e0b; }
.feedback-row {
display: flex; justify-content: space-between; padding: 3px 0;
font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.04);
}
.feedback-row:last-child { border-bottom: none; }
.fb-label { color: var(--muted, #8892a4); }
.fb-val { font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; border-radius: 4px; padding: 1px 4px; margin: -1px -4px; transition: background .15s; }
.fb-val:hover { background: rgba(255,255,255,.08); }
.fb-val:active { background: rgba(255,255,255,.14); }
.fb-val.copied { background: rgba(34,197,94,.18); color: #86efac; }
.fb-val.mono { font-family: monospace; }
.fb-val.ok { color: #34d399; }
.fb-val.warn { color: #f59e0b; }
.fb-val.err { color: #f87171; }
.fb-val.zero { color: #64748b; }
@media (max-width: 900px) {
.feedback-grid { grid-template-columns: 1fr; }
}
/* === ID SNAPSHOT TABLE === */
.idsnap-table-wrap { overflow-x: auto; }
.idsnap-table {
width: 100%; border-collapse: collapse; font-size: 13px;
font-variant-numeric: tabular-nums;
}
.idsnap-table th {
text-align: left; padding: 6px 10px; font-weight: 600;
border-bottom: 2px solid rgba(255,255,255,.12); color: var(--muted, #8892a4);
white-space: nowrap;
}
.idsnap-table td {
padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,.05);
white-space: nowrap;
}
.idsnap-table td.mono { font-family: monospace; }
.idsnap-table tr:hover td { background: rgba(255,255,255,.03); }
.idsnap-table .flag-on { color: #34d399; font-weight: 600; }
.idsnap-table .flag-off { color: #475569; }
.idsnap-data { font-family: monospace; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.fb-data-cell {
max-width: 200px; overflow: hidden; text-overflow: ellipsis;
font-size: 11px; word-break: break-all; line-height: 1.4;
}
/* === CAN message row expand / batch additions === */
.message-col-check,
.message-col-toggle {
text-align: center;
padding: 6px 2px;
/* 勿被全局单元格 overflow:hidden 裁切勾选/展开 */
overflow: visible !important;
text-overflow: clip;
}
/* 统一:报文行 / 全选 / 节点过滤 勾选框外观 */
.can-page input[type="checkbox"],
.message-check,
.checkbox-inline input[type="checkbox"],
.can-node-filter-item input[type="checkbox"] {
-webkit-appearance: none;
appearance: none;
width: 15px;
height: 15px;
margin: 0;
padding: 0;
flex-shrink: 0;
box-sizing: border-box;
border: 1.5px solid rgba(148, 163, 184, 0.55);
border-radius: 4px;
background: rgba(15, 23, 42, 0.9);
cursor: pointer;
vertical-align: middle;
position: relative;
display: inline-block;
transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.can-page input[type="checkbox"]:hover,
.message-check:hover,
.checkbox-inline input[type="checkbox"]:hover,
.can-node-filter-item input[type="checkbox"]:hover {
border-color: rgba(34, 211, 238, 0.65);
}
.can-page input[type="checkbox"]:checked,
.message-check:checked,
.checkbox-inline input[type="checkbox"]:checked,
.can-node-filter-item input[type="checkbox"]:checked {
background: var(--accent, #22d3ee);
border-color: var(--accent, #22d3ee);
box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.18);
}
.can-page input[type="checkbox"]:checked::after,
.message-check:checked::after,
.checkbox-inline input[type="checkbox"]:checked::after,
.can-node-filter-item input[type="checkbox"]:checked::after {
content: "";
position: absolute;
left: 4px;
top: 1px;
width: 4px;
height: 8px;
border: solid #0b1220;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
.can-page input[type="checkbox"]:focus-visible,
.message-check:focus-visible,
.checkbox-inline input[type="checkbox"]:focus-visible,
.can-node-filter-item input[type="checkbox"]:focus-visible {
outline: none;
box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.28);
}
.message-toggle {
width: 26px;
height: 26px;
min-width: 26px;
border-radius: 6px;
border: 1px solid rgba(255,255,255,.14);
background: rgba(255,255,255,.04);
color: #c8d6e7;
cursor: pointer;
font-size: 12px;
line-height: 1;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0;
box-sizing: border-box;
transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.message-toggle:hover {
background: rgba(34,211,238,.12);
border-color: rgba(34,211,238,.4);
color: #e6fbff;
}
.message-toggle.expanded {
background: rgba(34,211,238,.18);
border-color: rgba(34,211,238,.55);
color: #e6fbff;
}
.message-row-expand {
grid-column: 1 / -1;
background: rgba(255,255,255,.02);
border-top: 1px dashed rgba(255,255,255,.06);
border-bottom: 1px solid rgba(255,255,255,.04);
padding: 10px 12px 12px;
width: 100%;
max-width: 100%;
min-width: 0;
box-sizing: border-box;
/* 禁止展开区出现横向滑条;内容省略/折行 */
overflow-x: hidden;
}
.message-row-expand[hidden] {
display: none;
}
.message-row-expand .signal-table-host {
margin-top: 0;
min-width: 0;
max-width: 100%;
overflow-x: hidden;
}
.message-row-expand .signal-table {
border-radius: 10px;
min-width: 0 !important;
max-width: 100%;
}
.message-row-expand .signal-table-body {
max-height: 360px;
overflow-x: hidden;
overflow-y: auto;
}
.message-row-expand .signal-cell {
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}
.message-row-expand .signal-input,
.message-row-expand .signal-input-compact,
.message-row-expand select.input,
.message-row-expand input.input {
width: 100%;
min-width: 0 !important;
max-width: 100%;
box-sizing: border-box;
}
.can-batch-actions {
display: inline-flex;
align-items: center;
gap: 8px;
margin-left: auto;
flex-wrap: wrap;
}
.checkbox-inline {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: var(--text-dim, #93a4bf);
cursor: pointer;
user-select: none;
}
.checkbox-inline input {
cursor: pointer;
}
.card-head-actions {
display: inline-flex;
align-items: center;
gap: 8px;
}
.btn.btn-sm {
padding: 4px 10px;
font-size: 12px;
}
.btn[disabled] {
opacity: .55;
cursor: not-allowed;
}
/* === 2026-06-30c: 报文列表与右侧操作栏并列布局调整 === */
/* 左列:报文列表 + 最近发送;右列:帧预览等 */
.can-editor-layout > .can-main-col {
margin-top: 0;
display: flex;
flex-direction: column;
gap: 18px;
min-width: 0;
max-width: 100%;
}
.can-main-col > .can-table-card {
margin-top: 0;
min-width: 0;
max-width: 100%;
/* 保持 visible,避免裁切「发送节点」下拉;横向由内部 message-list 锁死 */
overflow: visible;
}
.can-main-col > .can-history-card {
margin-top: 0;
align-self: stretch;
min-width: 0;
max-width: 100%;
overflow-x: hidden;
}
.can-table-card-body,
.can-msg-list-head,
.can-msg-toolbar {
min-width: 0;
max-width: 100%;
}
.can-frame-actions {
display: flex;
gap: 8px;
margin-top: 10px;
flex-wrap: wrap;
}
.can-frame-actions .btn { flex: 1 1 auto; min-width: 120px; }
.can-frame-panel-compact .can-frame-hex {
word-break: break-all;
}
/* === 2026-06-30c: 报文列表压缩列宽 + 纵向滚动美化 === */
.message-list {
/* 提高可视高度,并改用美化的纵向滚动条 */
max-height: calc(100vh - 300px);
min-height: 420px;
overflow-x: hidden !important;
overflow-y: auto;
overscroll-behavior-x: none;
min-width: 0;
width: 100%;
max-width: 100%;
scrollbar-width: thin;
scrollbar-color: rgba(34,211,238,.35) transparent;
}
.message-list::-webkit-scrollbar { width: 8px; }
.message-list::-webkit-scrollbar-track {
background: transparent;
margin: 4px 0;
}
.message-list::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, rgba(34,211,238,.45), rgba(34,211,238,.18));
border-radius: 6px;
border: 2px solid transparent;
background-clip: padding-box;
}
.message-list::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, rgba(34,211,238,.65), rgba(34,211,238,.28));
background-clip: padding-box;
border: 2px solid transparent;
}
.msg-src {
display: inline-block;
max-width: 4.5em;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: bottom;
font-size: 10px;
font-weight: 600;
color: var(--accent);
opacity: .85;
margin-right: 2px;
}
/* 单元格统一省略号;切断 grid 项默认 min-content 最小宽 */
.message-row .message-col,
.message-table-head .message-col {
min-width: 0 !important;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
box-sizing: border-box;
}
.message-col {
padding: 8px 6px;
}
/* 紧凑列的内边距收一点,腾出空间给名称/注释 */
.message-col-index,
.message-col-channel,
.message-col-type,
.message-col-dlc,
.message-col-signal {
padding-left: 6px;
padding-right: 6px;
}
.message-col-check,
.message-col-toggle {
padding-left: 2px;
padding-right: 2px;
display: inline-flex;
align-items: center;
justify-content: center;
}
/* 注释列允许浅色降权显示 */
.message-row .message-col-comment {
color: var(--muted);
}
/* === 窄屏报文表降级(0fr 隐藏列,保持 track 数量) === */
/* 列序:check toggle # dbc name id channel type dlc signal node comment */
/* 隐藏列必须把 padding/border/内容贡献压到 0,否则仍会撑出横向滚动 */
.message-col-channel,
.message-col-type {
padding: 0 !important;
border: 0 !important;
margin: 0 !important;
overflow: hidden !important;
min-width: 0 !important;
max-width: 0 !important;
font-size: 0 !important;
line-height: 0 !important;
visibility: hidden;
pointer-events: none;
}
@media (max-width: 1200px) {
.message-table-head,
.message-row {
grid-template-columns:
34px 34px 28px
minmax(0, 0.5fr) /* dbc */
minmax(0, 1fr) /* name */
minmax(6.8em, 0.6fr)/* id */
0fr 0fr
2.6em /* dlc */
0fr /* signal */
minmax(5em, 0.7fr) /* node */
minmax(0, 0.55fr); /* comment */
}
.message-col-signal {
padding: 0 !important;
border: 0 !important;
overflow: hidden !important;
min-width: 0 !important;
max-width: 0 !important;
font-size: 0 !important;
visibility: hidden;
pointer-events: none;
}
}
@media (max-width: 1024px) {
.message-table-head,
.message-row {
grid-template-columns:
34px 34px 26px
minmax(0, 0.5fr)
minmax(0, 1fr)
minmax(6.5em, 0.55fr)
0fr 0fr
2.6em
0fr
0fr /* node */
minmax(0, 0.55fr);
}
.message-col-node {
padding: 0 !important;
border: 0 !important;
overflow: hidden !important;
min-width: 0 !important;
max-width: 0 !important;
font-size: 0 !important;
visibility: hidden;
pointer-events: none;
}
}
@media (max-width: 900px) {
.message-table-head,
.message-row {
grid-template-columns:
34px 34px 26px
0fr /* dbc */
minmax(0, 1fr)
minmax(6.2em, 0.55fr)
0fr 0fr
2.6em
0fr 0fr
minmax(0, 0.5fr);
}
.message-col-dbc {
padding: 0 !important;
border: 0 !important;
overflow: hidden !important;
min-width: 0 !important;
max-width: 0 !important;
font-size: 0 !important;
visibility: hidden;
pointer-events: none;
}
}
/* 工作台单独一行 */
.can-top-layout {
margin-top: 18px;
display: block;
}
.can-top-layout > .can-toolbar-card {
margin-top: 0;
}
/* 历史卡:报文列表下方,单行紧凑约 8~10 条可见 */
.can-history-card .card-body {
display: flex;
flex-direction: column;
padding-top: 10px;
padding-bottom: 10px;
}
.can-history-card .history-list {
max-height: min(42vh, 420px);
overflow-y: auto;
padding-right: 4px;
scrollbar-width: thin;
scrollbar-color: rgba(34,211,238,.35) transparent;
}
.can-history-card .history-list::-webkit-scrollbar { width: 8px; }
.can-history-card .history-list::-webkit-scrollbar-track { background: transparent; margin: 4px 0; }
.can-history-card .history-list::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, rgba(34,211,238,.45), rgba(34,211,238,.18));
border-radius: 6px;
border: 2px solid transparent;
background-clip: padding-box;
}
.can-history-card .history-list::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, rgba(34,211,238,.65), rgba(34,211,238,.28));
background-clip: padding-box;
}
/* === 2026-07-01a: 发送节点过滤下拉 === */
.can-node-filter {
position: relative;
display: inline-flex;
z-index: 1;
}
/* 面板打开时整块提到最前 */
.can-node-filter.is-open {
z-index: 50;
}
.can-node-filter-btn {
display: inline-flex;
align-items: center;
gap: 6px;
white-space: nowrap;
}
.can-node-filter-btn.active {
border-color: rgba(34,211,238,.65);
color: var(--accent);
background: rgba(34,211,238,.08);
}
.can-node-filter-caret {
font-size: 10px;
opacity: .75;
}
.can-node-filter-panel {
position: absolute;
top: calc(100% + 6px);
right: 0;
z-index: 60;
min-width: 260px;
max-width: 320px;
background: #182330;
border: 1px solid var(--border);
border-radius: 12px;
box-shadow: 0 18px 38px rgba(0,0,0,.45);
padding: 10px;
}
.can-node-filter-panel[hidden] { display: none; }
.can-node-filter-head {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 8px;
}
.can-node-filter-search {
width: 100%;
padding: 6px 8px;
font-size: 12px;
}
.can-node-filter-actions {
display: flex;
gap: 6px;
justify-content: flex-end;
}
.can-node-filter-list {
max-height: 260px;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 2px;
scrollbar-width: thin;
scrollbar-color: rgba(34,211,238,.35) transparent;
}
.can-node-filter-list::-webkit-scrollbar { width: 8px; }
.can-node-filter-list::-webkit-scrollbar-thumb {
background: rgba(34,211,238,.35);
border-radius: 6px;
}
.can-node-filter-item {
display: grid;
grid-template-columns: 18px 1fr auto;
align-items: center;
gap: 8px;
padding: 6px 8px;
border-radius: 8px;
cursor: pointer;
font-size: 12px;
color: var(--text);
transition: background .12s;
}
.can-node-filter-item:hover {
background: rgba(255,255,255,.04);
}
.can-node-filter-item input[type="checkbox"] {
margin: 0;
}
.can-node-filter-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: var(--font-mono);
}
.can-node-filter-count {
font-size: 11px;
color: var(--muted);
background: rgba(255,255,255,.05);
border-radius: 999px;
padding: 1px 8px;
min-width: 26px;
text-align: center;
}