mirror of
https://github.com/codex-team/editor.js
synced 2024-06-17 05:05:58 +02:00
6f36707f67
* Add tunes improvements * Allow to show Inline Toolbar at Block Tune Wrapper element * Add fake cursor on block selection * Fix lint * Update types * Fix bugs with selection * Remove selection observer * Update due to comments * Fix tests * Update docs/block-tunes.md Co-authored-by: Peter Savchenko <specc.dev@gmail.com> * Move fake cursor to selection utils * Fix missing range for Safari * Fix data attribute value * Add comment * Update z-index for inline-toolbar * Add changelog * Remove fake cursor visibility for the core Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
145 lines
2.3 KiB
CSS
145 lines
2.3 KiB
CSS
.ce-inline-toolbar {
|
|
@apply --overlay-pane;
|
|
transform: translateX(-50%) translateY(8px) scale(0.9);
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transition: transform 150ms ease, opacity 250ms ease;
|
|
will-change: transform, opacity;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 3;
|
|
|
|
&--showed {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
transform: translateX(-50%)
|
|
}
|
|
|
|
&--left-oriented {
|
|
transform: translateX(-23px) translateY(8px) scale(0.9);
|
|
}
|
|
|
|
&--left-oriented&--showed {
|
|
transform: translateX(-23px);
|
|
}
|
|
|
|
&--right-oriented {
|
|
transform: translateX(-100%) translateY(8px) scale(0.9);
|
|
margin-left: 23px;
|
|
}
|
|
|
|
&--right-oriented&--showed {
|
|
transform: translateX(-100%);
|
|
}
|
|
|
|
[hidden] {
|
|
display: none !important;
|
|
}
|
|
|
|
&__toggler-and-button-wrapper {
|
|
display: flex;
|
|
width: 100%;
|
|
padding: 0 6px;
|
|
}
|
|
|
|
&__buttons {
|
|
display: flex;
|
|
}
|
|
|
|
&__actions {
|
|
}
|
|
|
|
&__dropdown {
|
|
display: inline-flex;
|
|
height: var(--toolbar-buttons-size);
|
|
padding: 0 9px 0 10px;
|
|
margin: 0 6px 0 -6px;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
border-right: 1px solid var(--color-gray-border);
|
|
|
|
&:hover {
|
|
background: var(--bg-light);
|
|
}
|
|
|
|
&--hidden {
|
|
display: none;
|
|
}
|
|
|
|
&-content{
|
|
display: flex;
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
|
|
svg {
|
|
height: 12px;
|
|
}
|
|
}
|
|
|
|
.icon--toggler-down {
|
|
margin-left: 4px;
|
|
}
|
|
}
|
|
|
|
&__shortcut {
|
|
opacity: 0.6;
|
|
word-spacing: -3px;
|
|
margin-top: 3px;
|
|
}
|
|
}
|
|
|
|
.ce-inline-tool {
|
|
@apply --toolbar-button;
|
|
border-radius: 0;
|
|
line-height: normal;
|
|
width: auto;
|
|
padding: 0 5px !important;
|
|
min-width: 24px;
|
|
|
|
&:not(:last-of-type) {
|
|
margin-right: 2px;
|
|
}
|
|
|
|
.icon {
|
|
height: 12px;
|
|
}
|
|
|
|
&--link {
|
|
.icon--unlink {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
&--unlink {
|
|
.icon--link {
|
|
display: none;
|
|
}
|
|
.icon--unlink {
|
|
display: inline-block;
|
|
margin-bottom: -1px;
|
|
}
|
|
}
|
|
|
|
&-input {
|
|
outline: none;
|
|
border: 0;
|
|
border-radius: 0 0 4px 4px;
|
|
margin: 0;
|
|
font-size: 13px;
|
|
padding: 10px;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
display: none;
|
|
font-weight: 500;
|
|
border-top: 1px solid rgba(201,201,204,.48);
|
|
|
|
&::placeholder {
|
|
color: var(--grayText);
|
|
}
|
|
|
|
&--showed {
|
|
display: block;
|
|
}
|
|
}
|
|
}
|