Skip to content

Commit 1c0005d

Browse files
authored
fix(FoldingHeading): some blocks remained visible when heading was collapsed (#845)
1 parent cf44225 commit 1c0005d

File tree

1 file changed

+49
-45
lines changed
  • src/extensions/additional/FoldingHeading/plugins

1 file changed

+49
-45
lines changed
Lines changed: 49 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,73 @@
11
@use '~@gravity-ui/uikit/styles/mixins' as uikit;
22

3-
.pm-h-folding-hidden {
4-
display: none;
5-
}
3+
.ProseMirror,
4+
.yfm.ProseMirror {
5+
.pm-h-folding-hidden {
6+
display: none;
7+
}
68

7-
.pm-h-folding-content {
8-
padding-left: 28px;
9-
}
9+
.pm-h-folding-content {
10+
padding-left: 28px;
11+
}
1012

11-
.pm-h-folding-separator {
12-
position: relative;
13+
.pm-h-folding-separator {
14+
position: relative;
1315

14-
&::before {
15-
position: absolute;
16-
z-index: 1;
17-
bottom: -4px;
18-
left: 0;
16+
&::before {
17+
position: absolute;
18+
z-index: 1;
19+
bottom: -4px;
20+
left: 0;
1921

20-
width: 12px;
21-
height: 12px;
22+
width: 12px;
23+
height: 12px;
2224

23-
content: '';
25+
content: '';
2426

25-
background-color: var(--g-color-text-secondary);
26-
mask-image: url('data:image/svg+xml;svg,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M2 7.25a.75.75 0 0 0 0 1.5h5.69l-2.72 2.72a.75.75 0 1 0 1.06 1.06l4-4a.75.75 0 0 0 0-1.06l-4-4a.75.75 0 0 0-1.06 1.06l2.72 2.72zm7.47 4.22a.75.75 0 1 0 1.06 1.06l4-4a.75.75 0 0 0 0-1.06l-4-4a.75.75 0 1 0-1.06 1.06L12.94 8z" clip-rule="evenodd"/></svg>');
27-
mask-size: 12px;
27+
background-color: var(--g-color-text-secondary);
28+
mask-image: url('data:image/svg+xml;svg,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M2 7.25a.75.75 0 0 0 0 1.5h5.69l-2.72 2.72a.75.75 0 1 0 1.06 1.06l4-4a.75.75 0 0 0 0-1.06l-4-4a.75.75 0 0 0-1.06 1.06l2.72 2.72zm7.47 4.22a.75.75 0 1 0 1.06 1.06l4-4a.75.75 0 0 0 0-1.06l-4-4a.75.75 0 1 0-1.06 1.06L12.94 8z" clip-rule="evenodd"/></svg>');
29+
mask-size: 12px;
2830

29-
transform: translateY(80%);
30-
}
31+
transform: translateY(80%);
32+
}
3133

32-
&::after {
33-
position: absolute;
34-
z-index: 1;
35-
bottom: -8px;
36-
left: 16px;
34+
&::after {
35+
position: absolute;
36+
z-index: 1;
37+
bottom: -8px;
38+
left: 16px;
3739

38-
display: block;
40+
display: block;
3941

40-
width: calc(100% - 16px - 56px - 6px); // left icon + right label + right offset of label
42+
// left icon + right label + right offset of label
43+
width: calc(100% - 16px - 56px - 6px);
4144

42-
content: '';
45+
content: '';
4346

44-
border-top: 1px dashed var(--g-color-line-generic);
47+
border-top: 1px dashed var(--g-color-line-generic);
48+
}
4549
}
46-
}
4750

48-
.pm-h-folding-label {
49-
&::after {
50-
position: absolute;
51-
z-index: 1;
52-
right: 2px;
53-
bottom: -6px;
51+
.pm-h-folding-label {
52+
&::after {
53+
position: absolute;
54+
z-index: 1;
55+
right: 2px;
56+
bottom: -6px;
5457

55-
display: block;
58+
display: block;
5659

57-
padding: 0 8px;
60+
padding: 0 8px;
5861

59-
content: attr(data-value);
62+
content: attr(data-value);
6063

61-
color: var(--g-color-text-misc);
62-
border-radius: 4px;
63-
background-color: var(--g-color-base-misc-medium-hover);
64+
color: var(--g-color-text-misc);
65+
border-radius: 4px;
66+
background-color: var(--g-color-base-misc-medium-hover);
6467

65-
transform: translate(0, 50%);
68+
transform: translate(0, 50%);
6669

67-
@include uikit.text-body-1();
70+
@include uikit.text-body-1();
71+
}
6872
}
6973
}

0 commit comments

Comments
 (0)