webapp/src/components/Editor/Prosemirror.scss

187 lines
3.0 KiB
SCSS
Raw Normal View History

.ProseMirror {
outline: none;
min-height: 300px;
}
.ProseMirror p.is-editor-empty:first-child::before {
content: attr(data-placeholder);
float: left;
height: 0;
pointer-events: none;
font-weight: 500;
font-size: 20px;
line-height: 30px;
opacity: 0.3;
}
/* Give a remote user a caret */
.collaboration-cursor__caret {
border-left: 1px solid #0d0d0d;
border-right: 1px solid #0d0d0d;
margin-left: -1px;
margin-right: -1px;
pointer-events: none;
position: relative;
word-break: normal;
}
/* Render the username above the caret */
.collaboration-cursor__label {
border-radius: 3px 3px 3px 0;
color: #0d0d0d;
font-size: 12px;
font-style: normal;
font-weight: 600;
left: -1px;
line-height: normal;
padding: 0.1rem 0.3rem;
position: absolute;
top: -1.4em;
user-select: none;
white-space: nowrap;
}
.embed-wrapper {
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
background: #f1f1f1;
margin: 4rem 0;
iframe {
border: none;
overflow: hidden;
}
}
.uploadedImage {
max-height: 80vh;
margin: auto;
display: block;
width: unset !important;
}
2023-05-04 15:55:38 +00:00
.horizontalRule {
border-top: 2px solid #000;
}
2023-05-09 17:31:28 +00:00
mark.highlight {
box-decoration-break: clone;
padding: 0.125em 0;
}
// custom atibutes fro TipTap Nodes
[data-float] {
max-width: 50%;
}
[data-float='left'] {
max-width: 30%;
float: left;
margin: 1rem 1rem 0 0;
}
[data-float='right'] {
max-width: 30%;
float: right;
margin: 1rem 0 1rem 1rem;
}
[data-float='half-left'] {
max-width: 50%;
min-width: 30%;
float: left;
margin: 1rem 1rem 0;
}
[data-float='half-right'] {
max-width: 50%;
min-width: 30%;
float: right;
margin: 1rem 0;
}
.ProseMirror blockquote {
p:last-child {
margin-bottom: 0;
}
&[data-type='quote'] {
@include font-size(1.6rem);
border: solid #000;
border-width: 0 0 0 2px;
margin: 1.6rem 0;
padding: 1rem;
&[data-float='left'] {
padding-left: 0;
padding-right: 0;
margin-right: 1.6rem;
border-width: 0 2px 0 0;
}
&[data-float='right'] {
margin-left: 1.6rem;
border-width: 0 0 0 2px;
}
}
&[data-type='punchline'] {
padding: 1.6rem 0 0;
border: solid #000;
border-width: 2px 0;
font-size: 3.2rem;
font-weight: 700;
margin: 0;
&[data-float='left'],
&[data-float='right'] {
font-size: 2.2rem;
}
}
}
.ProseMirror article[data-type='incut'] {
background: #f1f2f3;
padding: 1.6rem;
font-size: 1.4rem;
transition: background 0.3s ease-in-out;
&[data-float] img {
float: none;
max-width: unset;
width: 100% !important;
margin: 0;
}
*:last-child {
margin-bottom: 0;
}
&[data-bg='black'] {
background: #000;
color: #fff;
}
&[data-bg='yellow'] {
background: #f6e3a1;
}
&[data-bg='pink'] {
background: #f1b5bc;
}
&[data-bg='green'] {
background: #bfe9cb;
box-shadow: 0 0 0 1px #000;
}
&[data-bg='white'] {
background: #fff;
box-shadow: 0 0 0 1px #000;
}
}