waveterm/frontend/app/block/block.less
Mike Sawka 15681ffa1a
create blockframes to replace blockheader (#59)
created two frames -- frameless and tech. frameless is used when there
is 0 or 1 blocks, otherwise tech is used.
2024-06-18 23:44:53 -07:00

144 lines
3.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;
.block-content {
display: flex;
flex-grow: 1;
width: 100%;
overflow: hidden;
min-height: 0;
padding: 5px;
}
.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-tech {
border: 2px solid var(--border-color);
border-radius: 4px;
margin: 10px 2px 2px 2px;
padding: 10px 2px 2px 2px;
height: calc(100% - 12px);
width: calc(100% - 4px);
overflow: visible;
&.block-preview {
background-color: var(--main-bg-color);
}
&.block-focused {
border: 2px solid var(--accent-color);
.block-frame-tech-header {
color: var(--main-text-color);
}
.block-frame-tech-close {
display: none;
}
}
.block-frame-tech-header {
position: absolute;
max-width: 85%;
left: 50%;
transform: translate(-50%, 0);
overflow: hidden;
text-overflow: ellipsis;
top: -11px;
padding: 4px 6px 4px 6px;
border-radius: 4px;
background-color: var(--main-bg-color);
font: var(--fixed-font);
color: var(--secondary-text-color);
white-space: nowrap;
}
.block-frame-tech-close {
position: absolute;
top: 0;
right: -2px;
padding: 0 0 1px 1px;
border-radius: 4px;
background-color: var(--panel-bg-color);
cursor: pointer;
color: var(--grey-text-color);
opacity: 0;
&:hover {
color: var(--secondary-text-color);
opacity: 1;
}
}
}
.block-frame-preview {
background-color: var(--main-bg-color);
width: 100%;
flex-grow: 1;
}
}
.block-header {
display: flex;
flex-direction: row;
flex-shrink: 0;
height: 30px;
width: 100%;
align-items: center;
justify-content: center;
background-color: var(--panel-bg-color);
user-select: none;
-webkit-user-select: none;
cursor: default;
border-radius: 0 0 4px 4px;
.block-header-icon {
font-size: 20px;
padding: 0 5px;
}
.block-header-text {
padding: 0 5px;
flex-grow: 1;
white-space: nowrap;
}
.close-button {
font-size: 12px;
padding: 5px 5px 5px 5px;
margin-right: 5px;
border-radius: 4px;
&:hover {
cursor: pointer;
background-color: var(--highlight-bg-color);
}
}
}