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

Commit 8a64ee2

Browse files
authored
Merge pull request #422 from ckeditor/t/394
Other: Allowed list item's buttons to have an outer, visible box-shadow. Ensured the balloon panel's arrow does not cover panel's children. Closes #394.
2 parents ae9fa09 + a93e25d commit 8a64ee2

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

theme/components/list/list.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
.ck.ck-list {
99
@mixin ck-unselectable;
1010

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

@@ -18,7 +16,10 @@
1816
display: block;
1917
}
2018

21-
& .ck-list__item:focus {
19+
/* Make sure that whatever child of the list item gets focus, it remains on the
20+
top. Thanks to that, styles like box-shadow, outline, etc. are not masked by
21+
adjacent list items. */
22+
& .ck-list__item > *:focus {
2223
position: relative;
2324
z-index: var(--ck-z-default);
2425
}

theme/components/panel/balloonpanel.css

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
* For licensing, see LICENSE.md.
44
*/
55

6+
:root {
7+
/* Make sure the balloon arrow does not float over its children. */
8+
--ck-balloon-panel-arrow-z-index: calc(var(--ck-z-default) - 3);
9+
}
10+
611
.ck.ck-balloon-panel {
712
display: none;
813
position: absolute;
@@ -17,31 +22,31 @@
1722
}
1823

1924
&::before {
20-
z-index: var(--ck-z-default);
25+
z-index: var(--ck-balloon-panel-arrow-z-index);
2126
}
2227

2328
&::after {
24-
z-index: calc(var(--ck-z-default) + 1 );
29+
z-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);
2530
}
2631
}
2732

2833
&[class*="arrow_n"] {
2934
&::before {
30-
z-index: var(--ck-z-default);
35+
z-index: var(--ck-balloon-panel-arrow-z-index);
3136
}
3237

3338
&::after {
34-
z-index: calc(var(--ck-z-default) + 1);
39+
z-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);
3540
}
3641
}
3742

3843
&[class*="arrow_s"] {
3944
&::before {
40-
z-index: var(--ck-z-default);
45+
z-index: var(--ck-balloon-panel-arrow-z-index);
4146
}
4247

4348
&::after {
44-
z-index: calc(var(--ck-z-default) + 1);
49+
z-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);
4550
}
4651
}
4752

0 commit comments

Comments
 (0)