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

Commit

Permalink
Other: Allowed list item's buttons to have an outer, visible box-shad…
Browse files Browse the repository at this point in the history
…ow. Ensured the balloon panel's arrow does not cover panel's children. Closes #394.
  • Loading branch information
oleq committed Jul 4, 2018
1 parent e3bbccf commit a93e25d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
7 changes: 4 additions & 3 deletions theme/components/list/list.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
.ck.ck-list {
@mixin ck-unselectable;

/* Crop the the items when the list has huge border-radius. */
overflow: hidden;
display: flex;
flex-direction: column;

Expand All @@ -18,7 +16,10 @@
display: block;
}

& .ck-list__item:focus {
/* Make sure that whatever child of the list item gets focus, it remains on the
top. Thanks to that, styles like box-shadow, outline, etc. are not masked by
adjacent list items. */
& .ck-list__item > *:focus {
position: relative;
z-index: var(--ck-z-default);
}
Expand Down
17 changes: 11 additions & 6 deletions theme/components/panel/balloonpanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
* For licensing, see LICENSE.md.
*/

:root {
/* Make sure the balloon arrow does not float over its children. */
--ck-balloon-panel-arrow-z-index: calc(var(--ck-z-default) - 3);
}

.ck.ck-balloon-panel {
display: none;
position: absolute;
Expand All @@ -17,31 +22,31 @@
}

&::before {
z-index: var(--ck-z-default);
z-index: var(--ck-balloon-panel-arrow-z-index);
}

&::after {
z-index: calc(var(--ck-z-default) + 1 );
z-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);
}
}

&[class*="arrow_n"] {
&::before {
z-index: var(--ck-z-default);
z-index: var(--ck-balloon-panel-arrow-z-index);
}

&::after {
z-index: calc(var(--ck-z-default) + 1);
z-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);
}
}

&[class*="arrow_s"] {
&::before {
z-index: var(--ck-z-default);
z-index: var(--ck-balloon-panel-arrow-z-index);
}

&::after {
z-index: calc(var(--ck-z-default) + 1);
z-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);
}
}

Expand Down

0 comments on commit a93e25d

Please sign in to comment.