editor.js/src/styles/ui.css
Peter Savchenko b39996616c
chore(perf): initialisation and rendering performance optimisations (#2430)
* renderer batching

* initialization and rendering performance optimized

* insertMany api method added

* Update index.html

* rm old method

* upd changelog

* upd paragraph

* paste tests fixed

* api blocks tests fixed

* backspace event tests fixed

* async issues in tests fixed

* eslint

* stub block added, tests added

* eslint

* eslint

* add test for insertMany()

* Update package.json
2023-08-08 22:17:09 +03:00

109 lines
1.8 KiB
CSS

/**
* Editor wrapper
*/
.codex-editor {
position: relative;
box-sizing: border-box;
z-index: 1;
.hide {
display: none;
}
&__redactor {
/**
* Workaround firefox bug: empty content editable elements has collapsed height
* https://bugzilla.mozilla.org/show_bug.cgi?id=1098151#c18
*/
[contenteditable]:empty::after {
content: "\feff ";
}
}
/**
* Styles for narrow holder
*/
&--narrow &__redactor {
@media (--not-mobile) {
margin-right: var(--narrow-mode-right-padding);
}
}
&--narrow&--rtl &__redactor {
@media (--not-mobile) {
margin-left: var(--narrow-mode-right-padding);
margin-right: 0;
}
}
&--narrow .ce-toolbar__actions {
@media (--not-mobile) {
right: -5px;
}
}
&-copyable {
position: absolute;
height: 1px;
width: 1px;
top: -400%;
opacity: 0.001;
}
&-overlay {
position: fixed;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
z-index: 999;
pointer-events: none;
overflow: hidden;
&__container {
position: relative;
pointer-events: auto;
z-index: 0;
}
&__rectangle {
position: absolute;
pointer-events: none;
background-color: rgba(46, 170, 220, 0.2);
border: 1px solid transparent;
}
}
svg {
max-height: 100%;
}
path {
stroke: currentColor;
}
/**
* Set color for native selection
*/
::selection{
background-color: var(--inlineSelectionColor);
}
}
.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus::before {
opacity: 0 !important;
}
.ce-scroll-locked {
overflow: hidden;
}
.ce-scroll-locked--hard {
overflow: hidden;
top: calc(-1 * var(--window-scroll-offset));
position: fixed;
width: 100%;
}