Better Codemirror search match styles

This commit is contained in:
Gregory Schier
2025-03-19 06:48:07 -07:00
parent 80ea5e6b91
commit 0db9ebe67d

View File

@@ -37,6 +37,9 @@
@apply w-full;
/* Important! Ensure it spans the entire width */
@apply w-full text-text px-0;
/* So the search highlight border is not cut off by editor view */
@apply pl-[1px];
}
.cm-placeholder {
@@ -127,6 +130,29 @@
}
}
/* Style search matches */
.cm-searchMatch {
@apply bg-transparent !important;
@apply rounded-[2px] outline outline-1;
&.cm-searchMatch-selected {
@apply outline-text;
@apply bg-text !important;
&, * {
@apply text-surface font-semibold !important;
}
}
}
/*.cm-searchMatch {*/
/* @apply bg-transparent !important;*/
/* @apply outline outline-[1.5px] outline-text-subtlest rounded-sm;*/
/* &.cm-searchMatch-selected {*/
/* @apply outline-text;*/
/* & * {*/
/* @apply text-text font-semibold;*/
/* }*/
/* }*/
/*}*/
/* Obscure text for password fields */
.cm-wrapper.cm-obscure-text .cm-line {
-webkit-text-security: disc;