Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into t/ckeditor5-image/310
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Oct 14, 2019
2 parents f7de63d + 046cbb5 commit 49b0a25
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 61 deletions.
2 changes: 2 additions & 0 deletions src/widgetresize.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';
import mix from '@ckeditor/ckeditor5-utils/src/mix';
import { throttle } from 'lodash-es';

import '../theme/widgetresize.css';

/**
* The widget resize feature plugin.
*
Expand Down
61 changes: 0 additions & 61 deletions theme/widget.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,67 +17,6 @@
--ck-color-resizer-tooltip-text: hsl(0, 0%, 95%);
}

.ck .ck-widget_with-resizer {
/* Make the widget wrapper a relative positioning container for the drag handle. */
position: relative;
}

.ck .ck-widget__resizer {
display: none;
position: absolute;

/* The wrapper itself should not interfere with the pointer device, only the handles should. */
pointer-events: none;

left: 0;
top: 0;

outline: 1px solid var(--ck-color-resizer);
}

.ck-focused .ck-widget_with-resizer.ck-widget_selected {
& > .ck-widget__resizer {
display: block;
}
}

.ck .ck-widget__resizer__handle {
position: absolute;

/* Resizers are the only UI elements that should interfere with a pointer device. */
pointer-events: all;

width: var(--ck-resizer-size);
height: var(--ck-resizer-size);
background: var(--ck-color-focus-border);
border: var(--ck-resizer-border-width) solid #fff;
border-radius: var(--ck-resizer-border-radius);

&.ck-widget__resizer__handle-top-left {
top: var( --ck-resizer-offset );
left: var( --ck-resizer-offset );
cursor: nwse-resize;
}

&.ck-widget__resizer__handle-top-right {
top: var( --ck-resizer-offset );
right: var( --ck-resizer-offset );
cursor: nesw-resize;
}

&.ck-widget__resizer__handle-bottom-right {
bottom: var( --ck-resizer-offset );
right: var( --ck-resizer-offset );
cursor: nwse-resize;
}

&.ck-widget__resizer__handle-bottom-left {
bottom: var( --ck-resizer-offset );
left: var( --ck-resizer-offset );
cursor: nesw-resize;
}
}

.ck .ck-widget.ck-widget_with-selection-handle {
/* Make the widget wrapper a relative positioning container for the drag handle. */
position: relative;
Expand Down
65 changes: 65 additions & 0 deletions theme/widgetresize.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

.ck .ck-widget_with-resizer {
/* Make the widget wrapper a relative positioning container for the drag handle. */
position: relative;
}

.ck .ck-widget__resizer {
display: none;
position: absolute;

/* The wrapper itself should not interfere with the pointer device, only the handles should. */
pointer-events: none;

left: 0;
top: 0;

outline: 1px solid var(--ck-color-resizer);
}

.ck-focused .ck-widget_with-resizer.ck-widget_selected {
& > .ck-widget__resizer {
display: block;
}
}

.ck .ck-widget__resizer__handle {
position: absolute;

/* Resizers are the only UI elements that should interfere with a pointer device. */
pointer-events: all;

width: var(--ck-resizer-size);
height: var(--ck-resizer-size);
background: var(--ck-color-focus-border);
border: var(--ck-resizer-border-width) solid #fff;
border-radius: var(--ck-resizer-border-radius);

&.ck-widget__resizer__handle-top-left {
top: var( --ck-resizer-offset );
left: var( --ck-resizer-offset );
cursor: nwse-resize;
}

&.ck-widget__resizer__handle-top-right {
top: var( --ck-resizer-offset );
right: var( --ck-resizer-offset );
cursor: nesw-resize;
}

&.ck-widget__resizer__handle-bottom-right {
bottom: var( --ck-resizer-offset );
right: var( --ck-resizer-offset );
cursor: nwse-resize;
}

&.ck-widget__resizer__handle-bottom-left {
bottom: var( --ck-resizer-offset );
left: var( --ck-resizer-offset );
cursor: nesw-resize;
}
}

0 comments on commit 49b0a25

Please sign in to comment.