Skip to content

Commit

Permalink
Code refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Jan 12, 2021
1 parent 47be46e commit 3a65937
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

:root {
--ck-resizer-size: 10px;

/* Set the resizer with a 50% offset. */
--ck-resizer-offset: calc( ( var(--ck-resizer-size) / -2 ) - 2px);
--ck-resizer-border-width: 1px;
}

.ck .ck-widget__resizer {
outline: 1px solid var(--ck-color-resizer);
}
Expand Down
27 changes: 11 additions & 16 deletions packages/ckeditor5-widget/theme/widget.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@

:root {
--ck-color-resizer: var(--ck-color-focus-border);
--ck-resizer-size: 10px;
--ck-resizer-border-width: 1px;
--ck-resizer-border-radius: 2px;

/* Set the resizer with a 50% offset. */
--ck-resizer-offset: calc( ( var(--ck-resizer-size) / -2 ) - 2px);

--ck-resizer-tooltip-offset: 10px;
--ck-color-resizer-tooltip-background: hsl(0, 0%, 15%);
--ck-color-resizer-tooltip-text: hsl(0, 0%, 95%);

--ck-resizer-border-radius: var(--ck-border-radius);
--ck-resizer-tooltip-offset: 10px;
}

.ck .ck-widget {
Expand Down Expand Up @@ -66,22 +61,22 @@
}

&.ck-orientation-top-left {
top: var( --ck-resizer-tooltip-offset );
left: var( --ck-resizer-tooltip-offset );
top: var(--ck-resizer-tooltip-offset);
left: var(--ck-resizer-tooltip-offset);
}

&.ck-orientation-top-right {
top: var( --ck-resizer-tooltip-offset );
right: var( --ck-resizer-tooltip-offset );
top: var(--ck-resizer-tooltip-offset);
right: var(--ck-resizer-tooltip-offset);
}

&.ck-orientation-bottom-right {
bottom: var( --ck-resizer-tooltip-offset );
right: var( --ck-resizer-tooltip-offset );
bottom: var(--ck-resizer-tooltip-offset);
right: var(--ck-resizer-tooltip-offset);
}

&.ck-orientation-bottom-left {
bottom: var( --ck-resizer-tooltip-offset );
left: var( --ck-resizer-tooltip-offset );
bottom: var(--ck-resizer-tooltip-offset);
left: var(--ck-resizer-tooltip-offset);
}
}

0 comments on commit 3a65937

Please sign in to comment.