mirror of
https://github.com/codex-team/editor.js
synced 2024-05-06 16:36:47 +02:00
581289c03e
* Default tunes to popover * Add the rest of default tunes * Add popover * Cleanup * Rename custom content * Cleanup * Add ability to open block settings upwards * Fix tests * Cleanup default tunes * Rename and cleanup * Add ability to display rendered custom tunes * cleanup * Rename * Add flag to close tunes popover * Cleanup * i18n * Cleanup * Fix build and tests * Fix for iframe * Add comments * Display active item, move closeOnActivate to popover * Add confirmation support to popover * Handle boolean value in confirmation param * Clarify flippable logic in popover * Comments * Pass editor element as a param of popover constructor * Fix readability * Tests * Fix flipper for confirmation element * Update confirmation config structure * Rename onClick to onActivate * Fix tests and build * Make confirmation props optional * Simplify processing tunes * Renamings * Fix text block tunes * Docs * Update event type * Move enabling confirmation state to separate method * move popover types * Unhardcode color * Support toggling * Add support of disabled items * Fix tab in empty block leading to selecting second item in popover * Remove margins for styles api settings button class * Fix arrow navigation between blocks after opening block tunes * Cleaup in default tunes code * Fix chaining confirmations * Colors * Types * Change the way flippable elements of popover custom area are set * Remove borders around popover icons * Fix untabbable inline toolbar * Fix locked scroll after closing tunes popover on mobile * Cleanup * Set max popover width * Make popover icon's border outside * Fix tab issue * Fix focus/hover issue * Reformat * Cleanup * Fix opening block tunes via keyboard * Add disableSpecialHoverAndFocusBehavior * Add deprecated comment * Cleanup * Fix popover active state * Fix checklist deletion with confirmation * Fix checklist deletion 2 * Fix popover focus * Fix popover items being impossible to flip after searching * Fix popover item highlighting issue * Update flipper.spec.ts * Fixes after review * Add Tunes Api tests * Fix multiple popover entries configured by one tune * Add tool's renderSettings() tests * Add popover confirmation state test * Fix popover width on mobile * Add popover tests * Add changelog and update version * Update changelog * Fix block tunes being unable to open after tune activation Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
105 lines
1.9 KiB
CSS
105 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
|
|
* @deprecated - use tunes config instead of creating html element with controls
|
|
*/
|
|
.cdx-settings-button {
|
|
@apply --toolbar-button;
|
|
|
|
&--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;
|
|
}
|
|
}
|