122 lines
2.4 KiB
CSS
122 lines
2.4 KiB
CSS
.component-template-preview-shell {
|
|
height: 100%;
|
|
}
|
|
|
|
.component-template-preview__tools {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid #e8e8e8;
|
|
background: #fff;
|
|
}
|
|
|
|
.component-template-preview__tools button {
|
|
padding: 4px 12px;
|
|
border: 1px solid #d9d9d9;
|
|
border-radius: 6px;
|
|
background: #fff;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.component-template-preview__tools button[aria-pressed="true"] {
|
|
border-color: #1677ff;
|
|
color: #1677ff;
|
|
}
|
|
|
|
.component-template-preview {
|
|
position: relative;
|
|
width: 100%;
|
|
height: calc(100% - 49px);
|
|
min-height: 510px;
|
|
padding: 24px 16px;
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
background: #f3f4f6;
|
|
}
|
|
|
|
.component-template-preview__canvas {
|
|
position: relative;
|
|
container-type: inline-size;
|
|
width: min(100%, 390px);
|
|
min-height: calc(100% - 48px);
|
|
margin: 0 auto;
|
|
overflow: visible;
|
|
border-radius: 14px;
|
|
background: #fff;
|
|
box-shadow:
|
|
0 0 0 1px rgba(0, 0, 0, 0.04),
|
|
0 10px 30px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.component-template-preview__canvas,
|
|
.component-template-preview__canvas * {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.component-template-preview__canvas > * {
|
|
width: 100%;
|
|
max-width: 100%;
|
|
}
|
|
|
|
:where(.component-template-preview__canvas) button {
|
|
display: block;
|
|
width: -webkit-fill-available;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: 0;
|
|
background: transparent;
|
|
color: inherit;
|
|
font: inherit;
|
|
font-size: 4.8cqw;
|
|
line-height: 2.55555556;
|
|
text-align: center;
|
|
}
|
|
|
|
:where(.component-template-preview__canvas) input {
|
|
display: block;
|
|
width: 100%;
|
|
min-width: 0;
|
|
}
|
|
|
|
.component-template-preview__canvas img {
|
|
flex-shrink: 0;
|
|
display: block;
|
|
max-width: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.component-template-preview[data-editor-mode="edit"] [data-editor-target] {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.component-template-preview__outline {
|
|
position: absolute;
|
|
z-index: 5;
|
|
pointer-events: none;
|
|
border: 2px solid #91caff;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.component-template-preview__outline.is-selected {
|
|
z-index: 6;
|
|
border-color: #1677ff;
|
|
box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.16);
|
|
}
|
|
|
|
.component-template-preview__outline span {
|
|
position: absolute;
|
|
bottom: 100%;
|
|
left: 0;
|
|
max-width: 100%;
|
|
padding: 2px 7px;
|
|
overflow: hidden;
|
|
border-radius: 4px 4px 0 0;
|
|
background: #1677ff;
|
|
color: #fff;
|
|
font-size: 12px;
|
|
line-height: 18px;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|