Files
sovereign_browser/www/css/post-composer.css
T

322 lines
6.4 KiB
CSS

.post-composer-wrapper {
width: 60%;
min-width: 300px;
max-width: 800px;
margin-bottom: 20px;
}
.post-composer-wrapper--inline {
width: 100%;
min-width: 0;
max-width: none;
margin-bottom: 0;
display: flex;
flex-direction: column;
gap: 0;
}
/* Popup mode — wrapper fills its container, body scrolls, footer sticks */
.post-composer-wrapper--popup {
width: 100%;
min-width: 0;
max-width: none;
margin-bottom: 0;
display: flex;
flex-direction: column;
flex: 1 1 0;
min-height: 0;
}
.post-composer-popup-body {
flex: 1 1 0;
min-height: 0;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 8px;
}
.post-composer-popup-footer {
flex: 0 0 auto;
display: flex;
justify-content: flex-end;
padding-top: 10px;
border-top: 1px solid var(--muted-color, #ccc);
margin-top: 8px;
}
.post-composer-popup-footer .post-composer-send-btn {
display: block !important;
width: 100%;
margin-top: 0;
}
.post-composer-inline-row {
display: flex;
align-items: flex-end;
gap: 8px;
padding: 4px 0;
margin: 0;
}
.post-composer-wrapper--inline .post-composer-editor-shell {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
}
.post-composer-wrapper--inline .post-composer-editor-shell [contenteditable='true'] {
width: 100%;
flex: 1;
min-height: 40px;
height: auto;
overflow-y: visible;
display: block;
padding: 8px 10px;
line-height: 1.3;
border: 1px solid var(--primary-color);
border-radius: 8px;
background: var(--secondary-color);
box-sizing: border-box;
}
.post-composer-wrapper--inline .post-composer-send-btn {
width: auto;
min-width: 78px;
height: 40px;
padding: 0 16px;
line-height: 1;
margin-top: 0;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.post-composer-editor-shell {
position: relative;
}
.inlinePostComposerInput {
min-height: 0;
padding: 0;
line-height: 1.4;
}
.post-composer-wrapper [contenteditable='true'] {
width: 100%;
margin-bottom: 0;
border: 1px solid var(--primary-color);
border-radius: 8px;
background: var(--secondary-color);
}
.post-composer-upload-icon {
position: absolute;
right: 10px;
bottom: 10px;
width: 32px;
height: 32px;
border: 1px solid var(--muted-color);
border-radius: 50%;
background: transparent;
color: var(--muted-color);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 2;
transition: color 0.2s, border-color 0.2s, background-color 0.2s;
padding: 0;
line-height: 0;
}
.post-composer-wrapper--inline .post-composer-upload-icon {
top: 50%;
bottom: auto;
transform: translateY(-50%);
}
.post-composer-upload-icon:hover,
.post-composer-upload-icon:focus,
.post-composer-upload-icon:focus-visible {
color: var(--accent-color);
border-color: var(--accent-color);
background: transparent;
outline: none;
}
.post-composer-upload-icon svg {
width: 16px;
height: 16px;
stroke: currentColor;
fill: none;
stroke-width: 2;
display: block;
}
.post-composer-upload-icon.is-image-icon svg {
transform: translateY(0.5px);
}
.post-composer-drag-overlay {
position: absolute;
inset: 0;
border: 2px dashed var(--accent-color);
border-radius: 10px;
background: color-mix(in srgb, var(--secondary-color) 78%, transparent);
pointer-events: none;
display: none;
align-items: center;
justify-content: center;
text-align: center;
color: var(--accent-color);
font-size: 90%;
z-index: 3;
}
.post-composer-editor-shell.is-dragover .post-composer-drag-overlay {
display: flex;
}
.post-composer-uploading {
position: absolute;
right: 52px;
bottom: 15px;
font-size: 75%;
color: var(--muted-color);
z-index: 2;
}
.post-composer-preview {
margin-top: 10px;
border: 1px solid var(--muted-color);
border-radius: 10px;
padding: 10px 12px;
background: var(--secondary-color);
display: none;
}
.post-composer-wrapper--inline .post-composer-preview {
margin-top: 0;
}
.post-composer-preview.is-visible {
display: block;
}
.post-composer-preview-label {
font-size: 75%;
color: var(--muted-color);
margin-bottom: 6px;
text-transform: uppercase;
letter-spacing: 0.06em;
}
.post-composer-preview-content {
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.post-composer-preview-content img,
.post-composer-preview-content video,
.post-composer-preview-content canvas,
.post-composer-preview-content iframe {
max-width: 100%;
height: auto;
}
.post-composer-send-btn {
width: 100%;
padding: 10px 20px;
border: 2px solid var(--primary-color);
border-radius: 10px;
font-family: var(--font-family);
font-size: 100%;
color: var(--muted-color);
background-color: var(--secondary-color);
cursor: pointer;
text-align: center;
margin-top: 10px;
transition: color 0.2s, border-color 0.2s;
display: none;
}
.post-composer-send-btn.is-visible,
.post-composer-send-btn.is-persistent-visible {
display: block;
}
.post-composer-send-btn:hover,
.post-composer-send-btn:focus,
.post-composer-send-btn:focus-visible {
color: var(--primary-color);
border-color: var(--primary-color);
outline: none;
}
.post-composer-mention-dropdown {
position: fixed;
min-width: 240px;
max-width: 320px;
max-height: 260px;
overflow-y: auto;
border: 1px solid var(--muted-color);
border-radius: 8px;
background: var(--secondary-color);
z-index: 50;
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
display: none;
}
.post-composer-mention-dropdown.is-visible {
display: block;
}
.post-composer-mention-item {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 10px;
cursor: pointer;
border-bottom: 1px solid color-mix(in srgb, var(--muted-color) 35%, transparent);
}
.post-composer-mention-item:last-child {
border-bottom: none;
}
.post-composer-mention-item:hover,
.post-composer-mention-item.is-active {
background: color-mix(in srgb, var(--secondary-color) 70%, var(--accent-color));
}
.post-composer-mention-avatar {
width: 24px;
height: 24px;
border-radius: 4px;
object-fit: cover;
flex-shrink: 0;
}
.post-composer-mention-meta {
min-width: 0;
}
.post-composer-mention-name {
color: var(--primary-color);
font-size: 85%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.post-composer-mention-handle {
color: var(--muted-color);
font-size: 75%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}