Skip to content

Commit 9a0ea03

Browse files
committed
Improve user selectors
1 parent 3bb0fda commit 9a0ea03

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

packages/app/src/app/overmind/effects/vscode/ModelsHandler.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ export class ModelsHandler {
245245
cursorPos.column
246246
),
247247
options: {
248-
className: this.userClassesGenerated[className],
248+
beforeContentClassName: this.userClassesGenerated[className],
249+
zIndex: 2,
249250
},
250251
});
251252
};
@@ -277,14 +278,14 @@ export class ModelsHandler {
277278
const nameStyles = {
278279
content: name,
279280
position: 'absolute',
280-
top: -17,
281+
bottom: '100%',
281282
backgroundColor: `rgb(${color[0]}, ${color[1]}, ${color[2]})`,
282-
zIndex: 20,
283+
zIndex: 200,
283284
color:
284285
color[0] + color[1] + color[2] > 500
285286
? 'rgba(0, 0, 0, 0.8)'
286287
: 'white',
287-
padding: '2px 4px',
288+
padding: '0 4px',
288289
borderRadius: 2,
289290
borderBottomLeftRadius: 0,
290291
fontSize: '.75rem',
@@ -293,11 +294,14 @@ export class ModelsHandler {
293294
pointerEvents: 'none',
294295
width: 'max-content',
295296
};
297+
296298
this.userClassesGenerated[cursorClassName] = `${css({
299+
position: 'absolute',
297300
backgroundColor: `rgba(${color[0]}, ${color[1]}, ${color[2]}, 0.8)`,
298301
width: '2px !important',
302+
height: '100%',
299303
cursor: 'text',
300-
zIndex: 30,
304+
zIndex: 200,
301305
':before': {
302306
animation: `${fadeOut} 0.3s`,
303307
animationDelay: '1s',

0 commit comments

Comments
 (0)