Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions themes/base/syntax.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
--syntax-base-hue: 270;
--syntax-base-saturation: 60%;
--syntax-base-lightness: 50%;
--syntax-link-hover-brightness: 1.25;
}

@media (prefers-color-scheme: dark) {
Expand All @@ -29,6 +30,16 @@ code.syntax {
tab-size: 2;
}

code.syntax a {
color: inherit;
text-decoration: none;
}

code.syntax a:hover,
code.syntax a:focus-visible {
filter: brightness(var(--syntax-link-hover-brightness));
}

:host([wrap]) code.syntax .indent {
flex-grow: 0;
flex-shrink: 0;
Expand Down
11 changes: 11 additions & 0 deletions themes/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ Override dark mode values for specific themes:
}
```

### Link Interaction

Links preserve the surrounding syntax colors and become brighter when hovered
or focused. You can adjust the brightness multiplier from the host page:

```css
syntax-code {
--syntax-link-hover-brightness: 1.4;
}
```

## Token Types

All token types automatically get colors derived from the base. You can override individual ones if needed:
Expand Down