File size: 3,436 Bytes
76fc93a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | /* ============================================================================ */
/* HTML Embed NodeView */
/* ============================================================================ */
.embed-view {
border: 1px solid var(--border-color);
border-radius: 8px;
overflow: hidden;
margin: 0.75em 0;
user-select: none;
background: var(--surface-bg);
}
/* --- Header --- */
.embed-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 12px;
border-bottom: 1px solid var(--border-color);
background: var(--surface-bg);
gap: 8px;
}
.embed-header-left {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
}
.embed-header-icon {
font-size: 14px;
line-height: 1;
flex-shrink: 0;
}
.embed-header-label {
font-size: 12px;
font-weight: 600;
color: var(--muted-color);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.embed-header-src {
font-size: 11px;
color: var(--muted-color);
opacity: 0.6;
font-family: var(--font-mono);
white-space: nowrap;
}
.embed-header-actions {
display: flex;
gap: 4px;
flex-shrink: 0;
}
/* --- Buttons --- */
.embed-btn {
background: none;
border: 1px solid var(--border-color);
border-radius: 4px;
padding: 2px 10px;
font-size: 11px;
color: var(--muted-color);
cursor: pointer;
white-space: nowrap;
transition: background 120ms ease, color 120ms ease;
}
.embed-btn:hover {
background: var(--border-color);
color: var(--text-color);
}
.embed-btn-primary {
background: var(--primary-color);
color: var(--on-primary);
border-color: var(--primary-color);
}
.embed-btn-primary:hover {
opacity: 0.9;
}
/* --- Settings panel --- */
.embed-settings {
padding: 8px 12px;
border-bottom: 1px solid var(--border-color);
display: flex;
flex-direction: column;
gap: 6px;
background: var(--surface-bg);
}
.embed-field-row {
display: flex;
align-items: center;
gap: 8px;
}
.embed-field-checkbox {
font-size: 12px;
color: var(--muted-color);
cursor: pointer;
gap: 6px;
}
.embed-field-checkbox input {
accent-color: var(--primary-color);
}
.embed-field-label {
font-size: 12px;
color: var(--muted-color);
min-width: 80px;
flex-shrink: 0;
}
.embed-field-input {
background: transparent;
border: 1px solid var(--border-color);
border-radius: 4px;
color: var(--text-color);
font-size: 13px;
padding: 3px 8px;
outline: none;
flex: 1;
min-width: 0;
}
.embed-field-input:focus {
border-color: var(--primary-color);
}
/* --- Preview area --- */
.embed-preview {
position: relative;
padding: 16px;
overflow: hidden;
}
.embed-iframe {
width: 100%;
border: none;
display: block;
border-radius: 4px;
background: transparent;
/* Isolate iframe layout changes so height updates from ResizeObserver
don't propagate reflows up to the scroll container. */
contain: layout style;
}
/* --- Empty state --- */
.embed-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
padding: 32px 24px;
color: var(--muted-color);
font-size: 13px;
text-align: center;
}
.embed-empty-icon {
font-size: 24px;
opacity: 0.5;
}
.embed-empty code {
font-family: var(--font-mono);
font-size: 12px;
background: var(--code-bg);
padding: 1px 5px;
border-radius: 3px;
}
|