waveterm/frontend/app/block/block.less
2024-07-08 22:31:38 -07:00

200 lines
5.2 KiB
Plaintext

// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0
.block {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
overflow: hidden;
min-height: 0;
position: relative;
border-radius: 8px;
.block-frame-icon {
margin-right: 0.5em;
}
.block-content {
display: flex;
flex-grow: 1;
width: 100%;
overflow: hidden;
min-height: 0;
padding: 5px;
}
.block-focuselem {
height: 0;
width: 0;
input {
width: 0;
height: 0;
opacity: 0;
pointer-events: none;
}
}
.block-header-animation-wrap {
max-height: 0;
transition:
max-height 0.3s ease-out,
opacity 0.3s ease-out;
overflow: hidden;
position: absolute;
top: 0;
width: 100%;
height: 30px;
z-index: var(--zindex-header-hover);
&.is-showing {
max-height: 30px;
}
}
&.block-frame-default {
position: relative;
padding: 2px;
.block-frame-default-inner {
background-color: rgba(255, 255, 255, 0.05);
width: 100%;
height: 100%;
border-radius: 8px;
display: flex;
flex-direction: column;
.block-frame-default-header {
display: flex;
height: 34px;
padding: 4px 0 4px 10px;
align-items: center;
gap: 8px;
align-self: stretch;
font: var(--header-font);
background-color: rgba(255, 255, 255, 0.1);
border-radius: 8px 8px 0 0;
.block-frame-default-header-iconview {
display: flex;
align-items: center;
gap: 8px;
color: var(--main-text-color);
.block-frame-preicon-button {
opacity: 0.7;
cursor: pointer;
&:hover {
opacity: 1;
}
}
.block-frame-view-icon {
font-size: var(--header-icon-size);
opacity: 0.5;
width: var(--header-icon-width);
i {
margin-right: 0;
}
}
.block-frame-view-type {
line-height: 12px;
font-weight: 700;
}
.block-frame-blockid {
opacity: 0.5;
}
}
.block-frame-text {
font: var(--fixed-font);
font-size: 11px;
opacity: 0.7;
}
.block-frame-end-icons {
display: flex;
align-items: center;
.block-frame-endicon-button {
opacity: 0.7;
cursor: pointer;
padding: 4px 6px;
&:hover {
opacity: 1;
}
}
.block-frame-settings {
display: flex;
width: 24px;
padding: 6px;
justify-content: center;
align-items: center;
opacity: 0.5;
cursor: pointer;
&:hover {
opacity: 1;
}
}
.block-frame-default-close {
display: flex;
justify-content: center;
align-items: center;
opacity: 0.5;
font-size: 11px;
width: 24px;
padding: 4px 6px;
cursor: pointer;
&:hover {
opacity: 1;
}
}
}
}
.block-frame-preview {
background-color: rgba(0, 0, 0, 0.7);
width: 100%;
flex-grow: 1;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}
}
.block-mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border: 2px solid transparent;
pointer-events: none;
padding: 2px;
border-radius: 8px;
}
&.block-focused {
.block-mask {
border: 2px solid var(--accent-color);
}
&.block-no-highlight,
&.block-preview {
.block-mask {
border: 2px solid rgba(255, 255, 255, 0.1);
}
}
}
}
}