Skip to content

Commit

Permalink
fix: color roles for linenumbers/highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Aug 26, 2024
1 parent a7a9879 commit e6a1bc8
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ pre[class*='language-'] {
--keyword: #add7ff;
--literal: #fffac2;
--falsy: #f087bd;
--ins: rgba(16, 185, 129, 0.2);
--del: rgba(239, 68, 68, 0.2);
--highlight: rgba(55, 65, 81, 0.5);
--highlight-linenumber: rgb(59, 130, 246);
--linenumber-border-width: theme('space.1');
--pad: theme('space.6');

Expand Down Expand Up @@ -187,16 +183,15 @@ pre[class*='language-'] {
}

.code-line.inserted {
background-color: var(--ins); /* Set inserted line (+) color */
@apply bg-tip-container-dark/30;
}
.code-line.deleted {
background-color: var(--del); /* Set deleted line (-) color */
@apply bg-error-container-dark/30;
}

.highlight-line {
background-color: var(--highlight); /* Set highlight bg color */
border-left: var(--linenumber-border-width) solid var(--highlight-linenumber); /* Set highlight accent border color */
@apply -mx-[--pad];
border-left: var(--linenumber-border-width) solid; /* Set highlight accent border color */
@apply -mx-[--pad] border-l-inverse-surface-dark/50 bg-inverse-surface-dark/10;
}

.line-number::before {
Expand All @@ -208,5 +203,4 @@ pre[class*='language-'] {
color: var(--comment); /* Line number color */

@apply mr-[calc(var(--pad)/2)];
/* @apply -ml-[calc(var(--w)/2)]; */
}

0 comments on commit e6a1bc8

Please sign in to comment.