editor.js/src/styles/export.css
Peter Savchenko ff91466b14
feat(toolbar): toolbar refactored and ui improved (#1815)
* 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
2021-11-24 21:14:24 +03:00

112 lines
1.9 KiB
CSS

/**
* Block Tool wrapper
*/
.cdx-block {
padding: var(--block-padding-vertical) 0;
&::-webkit-input-placeholder {
line-height:normal!important;
}
}
/**
* Input
*/
.cdx-input {
border: 1px solid var(--color-gray-border);
box-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, 0.06);
border-radius: 3px;
padding: 10px 12px;
outline: none;
width: 100%;
box-sizing: border-box;
/**
* Workaround Firefox bug with cursor position on empty content editable elements with ::before pseudo
* https://bugzilla.mozilla.org/show_bug.cgi?id=904846
*/
&[data-placeholder]::before {
position: static !important;
display: inline-block;
width: 0;
white-space: nowrap;
pointer-events: none;
}
}
/**
* Settings
*/
.cdx-settings-button {
@apply --toolbar-button;
&:not(:nth-child(3n+3)) {
margin-right: 3px;
}
&:nth-child(n+4) {
margin-top: 3px;
}
&--active {
color: var(--color-active-icon);
}
}
/**
* Loader
*/
.cdx-loader {
position: relative;
border: 1px solid var(--color-gray-border);
&::before {
content: '';
position: absolute;
left: 50%;
top: 50%;
width: 18px;
height: 18px;
margin: -11px 0 0 -11px;
border: 2px solid var(--color-gray-border);
border-left-color: var(--color-active-icon);
border-radius: 50%;
animation: cdxRotation 1.2s infinite linear;
}
}
@keyframes cdxRotation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/**
* Button
*/
.cdx-button {
padding: 13px;
border-radius: 3px;
border: 1px solid var(--color-gray-border);
font-size: 14.9px;
background: #fff;
box-shadow: 0 2px 2px 0 rgba(18,30,57,0.04);
color: var(--grayText);
text-align: center;
cursor: pointer;
&:hover {
background: #FBFCFE;
box-shadow: 0 1px 3px 0 rgba(18,30,57,0.08);
}
svg {
height: 20px;
margin-right: 0.2em;
margin-top: -2px;
}
}