webapp/src/components/Editor/MiniEditor/MiniEditor.module.scss

164 lines
2.7 KiB
SCSS
Raw Normal View History

2024-09-27 18:09:50 +00:00
.MiniEditor {
width: 100%;
display: flex;
flex-direction: column;
background: var(--black-50);
border-radius: 16px;
padding: 16px 16px 8px;
position: relative;
.simplifiedEditorField {
@include font-size(1.4rem);
2023-11-13 14:43:08 +00:00
min-height: 100px;
.emptyNode:first-child::before {
@include 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 .simplifiedEditorField {
min-height: 34px;
}
& * :focus {
outline: none;
}
.blockQuote {
font-weight: 500;
color: var(--black-500);
border-left: 2px solid #696969;
padding: 0 0 0 8px;
margin: 0;
p {
margin: 0;
}
}
2024-10-01 17:18:27 +00:00
.bubbleMenu {
display: flex;
background-color: white;
padding: 5px;
border-radius: 5px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0px 10px 20px rgba(0, 0, 0, 0.1);
}
.controls {
margin-top: auto;
display: flex;
2023-08-12 10:40:14 +00:00
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;
}
.actionButton {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
opacity: 0.5;
transition: opacity ease-in-out 0.3s;
&.active,
&:hover {
opacity: 1;
}
2024-10-01 17:18:27 +00:00
}
.linkInput {
opacity: 0;
transition: opacity ease-in-out 0.3s;
&.linkInputactive {
opacity: 1;
}
}
}
&.isFocused {
2023-11-13 14:43:08 +00:00
// 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;
2023-11-13 14:43:08 +00:00
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 {
@include font-size(1.2rem);
position: absolute;
top: 6px;
left: 12px;
color: var(--black-400);
}
}