mirror of
https://github.com/codex-team/editor.js
synced 2024-06-18 13:45:20 +02:00
* chore(block-tune-toggler): toggler moved to the left (draft) * toolbox ui updated * fixd caret jumpling, improved some styles * toolbar moving by block-hover - UI module triggers 'block-hovered' event - Toolbar uses 'block-hovered' for appearing - `currentBlock` setter added to the BlockManager - (reactangle-selection): the throttling added to the mousemove and scroll handlers - `getBlockIndex` method added to the Api - (api-blocks): toolbar moving logic removed from `blocks.move()` and `blocks.swap()` methods. Instead, MoveUp and MoveDown tunes uses Toolbar API * the dark-theme to the example-dev.html * positioning improved * fix(rectangle-selection): first click after RS does not clears selection state * toolbox position fixed * the toolbox module became a standalone class - Toolbox became a standalone class from the editor module. It can be accessed only via the owner (the Toolbar module) - (api.blocks) the insert() method now has the `replace` param. Also, it returns inserted Block API now. * new(api.listeners): `on()` now returns the listener id. The new `offById()` method added * fix bug with Tab pressing on hovered but not focused block * mobile version improved * upd example dev * small updaets * add nested-list * linting * (api.toolbar): `toggleBlockSettings` now fires toggling event with the same state * EventDispatcher used instead of callbacks for the Toolbox * UIApi added * fix ci * git submodules removed from the ci flow * add paragraph submodule to the ci flow * Update CHANGELOG.md * Update package.json * use ubuntu-latest for chrome ci
108 lines
1.6 KiB
CSS
108 lines
1.6 KiB
CSS
.ce-toolbar {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
transition: opacity 100ms ease;
|
|
will-change: opacity, transform;
|
|
display: none;
|
|
|
|
@media (--mobile) {
|
|
@apply --overlay-pane;
|
|
padding: 3px;
|
|
margin-top: 5px;
|
|
}
|
|
|
|
&--opened {
|
|
display: block;
|
|
|
|
@media (--mobile){
|
|
display: flex;
|
|
}
|
|
}
|
|
|
|
&__content {
|
|
max-width: var(--content-width);
|
|
margin: 0 auto;
|
|
position: relative;
|
|
|
|
@media (--mobile){
|
|
display: flex;
|
|
align-content: center;
|
|
margin: 0;
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
|
|
&__plus {
|
|
@apply --toolbox-button;
|
|
flex-shrink: 0;
|
|
|
|
&-shortcut {
|
|
opacity: 0.6;
|
|
word-spacing: -2px;
|
|
margin-top: 5px;
|
|
}
|
|
|
|
&--hidden {
|
|
display: none;
|
|
}
|
|
|
|
@media (--mobile){
|
|
display: inline-flex !important;
|
|
position: static;
|
|
transform: none !important;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Block actions Zone
|
|
* -------------------------
|
|
*/
|
|
&__actions {
|
|
position: absolute;
|
|
right: 100%;
|
|
opacity: 0;
|
|
display: flex;
|
|
|
|
@media (--mobile){
|
|
position: absolute;
|
|
right: auto;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
&--opened {
|
|
opacity: 1;
|
|
}
|
|
|
|
&-buttons {
|
|
text-align: right;
|
|
}
|
|
}
|
|
|
|
&__settings-btn {
|
|
@apply --toolbox-button;
|
|
width: 18px;
|
|
margin: 0 5px;
|
|
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
}
|
|
|
|
.codex-editor--toolbox-opened .ce-toolbar__actions {
|
|
display: none;
|
|
}
|
|
|
|
/**
|
|
* Styles for Narrow mode
|
|
*/
|
|
.codex-editor--narrow .ce-toolbar__plus {
|
|
@media (--not-mobile) {
|
|
left: 5px;
|
|
}
|
|
}
|