Skip to content

Commit 0151bd1

Browse files
committed
style: Create selectionLeft and selectionRight styles
Create these to avoid shiki intersect error for zero width decorations
1 parent dfcae0c commit 0151bd1

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

packages/test-case-component/src/styles.css

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,28 @@ pre.shiki {
102102
/* margin-left: -3px; */
103103
}
104104

105-
.selection:not(:empty) {
106-
background: #55f2;
107-
padding-left: 0.5px;
105+
.selectionLeft::before {
106+
content: "";
107+
position: absolute;
108+
width: 2px;
109+
height: var(--line-height);
110+
background: #0b0;
111+
animation: blink 1000ms infinite;
112+
left: -2px;
113+
border-radius: 2px 0 0 2px;
108114
}
115+
116+
.selectionRight::before {
117+
content: "";
118+
position: absolute;
119+
width: 2px;
120+
height: var(--line-height);
121+
background: #b00;
122+
animation: blink 1000ms infinite;
123+
right: -2px;
124+
border-radius: 0 2px 2px 0;
125+
}
126+
109127
.decoration {
110128
display: inline-block;
111129
line-height: 0;

0 commit comments

Comments
 (0)