webapp/src/components/Editor/MiniEditor.module.scss
Untone ffe0ede835
Some checks failed
deploy / testbuild (push) Failing after 43s
deploy / Update templates on Mailgun (push) Has been skipped
bubble-conditions-wip
2024-10-11 21:34:57 +03:00

146 lines
2.4 KiB
SCSS

.MiniEditor {
width: 100%;
display: flex;
flex-direction: column;
background: var(--black-50);
border-radius: 16px;
padding: 16px 16px 8px;
position: relative;
.compactEditor {
font-size:1.4rem;
min-height: 100px;
.emptyNode:first-child::before {
font-size:1.4rem;
position: absolute;
top: 4px;
height: 0;
pointer-events: none;
margin-top: -4px;
color: var(--black-400);
content: attr(data-placeholder);
}
}
&.smallHeight .compactEditor {
min-height: 34px;
}
& * :focus {
outline: none;
}
.blockquote {
font-weight: 500;
color: var(--black-300);
border-left: 2px solid var(--black-100);
padding: 0 0 0 8px;
margin: 0;
p {
margin: 0;
}
}
.bubbleMenu {
display: flex;
background-color: var(--background-color);
padding: 5px;
border-radius: 5px;
box-shadow: 0 0 0 1px var(--shadow-color-light), 0 10px 20px var(--shadow-color-medium);
}
.controls {
margin-top: auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width: 100%;
position: relative;
opacity: 0;
bottom: -1rem;
transition: 0.3s ease-in-out;
&.alwaysVisible {
opacity: unset;
bottom: unset;
}
.actions {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 4px;
}
.buttons {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
margin-left: auto;
}
.linkInput {
opacity: 0;
transition: opacity ease-in-out 0.3s;
&.linkInputactive {
opacity: 1;
}
}
}
&.isFocused {
// background: red;
.controls {
opacity: 1;
bottom: 0;
}
}
&.minimal {
background: unset;
padding: 0;
& div[contenteditable] {
font-size: 1.6rem;
font-weight: 500;
}
}
&.bordered {
box-sizing: border-box;
padding: 16px 12px 6px;
border-radius: 2px;
border: 2px solid var(--black-100);
background: var(--white-500);
& div[contenteditable] {
font-size: 1.6rem;
font-weight: 500;
}
}
&.labelVisible {
padding-top: 22px;
}
.limit {
position: absolute;
right: 1rem;
bottom: 0.5rem;
font-weight: 500;
font-size: 1.2rem;
}
.label {
font-size:1.2rem;
position: absolute;
top: 6px;
left: 12px;
color: var(--black-400);
}
}