160 lines
2.8 KiB
CSS
160 lines
2.8 KiB
CSS
.config-field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: 4px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.field-wide {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
.field-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
color: var(--pm-text-primary);
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.field-required,
|
|
.field-error {
|
|
color: var(--el-color-danger);
|
|
}
|
|
|
|
.field-locked {
|
|
color: var(--pm-text-secondary);
|
|
font-size: 11px;
|
|
font-weight: 400;
|
|
}
|
|
|
|
.field-help {
|
|
display: inline-grid;
|
|
place-items: center;
|
|
flex: none;
|
|
width: 16px;
|
|
height: 16px;
|
|
padding: 0;
|
|
border: 1px solid var(--pm-border-color);
|
|
border-radius: 50%;
|
|
background: var(--pm-bg-primary);
|
|
color: var(--pm-text-secondary);
|
|
font: inherit;
|
|
font-size: 11px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.field-help:hover,
|
|
.field-help:focus-visible {
|
|
color: var(--pm-primary-color);
|
|
border-color: currentColor;
|
|
outline: 2px solid color-mix(in srgb, var(--pm-primary-color) 15%, transparent);
|
|
}
|
|
|
|
/* 说明由可聚焦的帮助按钮展开,同时保留表单控件的无障碍描述。 */
|
|
.field-description {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
clip-path: inset(50%);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.config-field > .el-input-number,
|
|
.config-field > .el-select {
|
|
width: 100%;
|
|
}
|
|
|
|
/* 留白属于原生输入框,点击文字两侧时才能定位光标,而不是只聚焦外层容器。 */
|
|
.field-text-input :deep(.el-input__wrapper) {
|
|
padding-inline: 0;
|
|
}
|
|
|
|
.field-text-input :deep(.el-input__inner) {
|
|
padding-inline: 11px;
|
|
}
|
|
|
|
.config-field :deep(.el-input-number .el-input__inner) {
|
|
text-align: left;
|
|
}
|
|
|
|
.config-field > .el-switch {
|
|
align-self: flex-start;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.field-list {
|
|
display: grid;
|
|
gap: 8px;
|
|
}
|
|
|
|
.field-list-row {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
gap: 8px;
|
|
}
|
|
|
|
.network-row {
|
|
display: grid;
|
|
grid-template-columns: 100px minmax(0, 1fr) 90px auto;
|
|
gap: 8px;
|
|
}
|
|
|
|
.network-row > * {
|
|
min-width: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
.field-add {
|
|
justify-self: start;
|
|
margin-left: 0;
|
|
}
|
|
|
|
.field-port-guide {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 6px 12px;
|
|
min-height: 22px;
|
|
color: var(--el-color-success);
|
|
font-size: 12px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.field-port-guide .port-custom {
|
|
color: var(--pm-text-secondary);
|
|
}
|
|
|
|
.field-port-guide :deep(.el-button) {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.field-hint,
|
|
.field-error {
|
|
margin: 0;
|
|
font-size: 12px;
|
|
line-height: 1.6;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.field-hint {
|
|
color: var(--pm-text-secondary);
|
|
}
|
|
|
|
@container config-main (max-width: 440px) {
|
|
.network-row {
|
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
padding: 10px;
|
|
border: 1px solid var(--pm-border-color);
|
|
border-radius: 8px;
|
|
}
|
|
}
|