metonym / svelte-highlight

Syntax Highlighting for Svelte using highlight.js
https://svhe.onrender.com
MIT License
253 stars 13 forks source link

Overriding default styles for Line Number #270

Closed yehiaabdelm closed 1 year ago

yehiaabdelm commented 1 year ago

I'm trying to edit the default colors for the td in LineNumbers that contains the numbers, but I can't seem to override the default styles.

I have this:

image

I want this:

image

What I tried doing:

  1. Added background-color: var(--line-number-background-color, #fff); to the td class in LineNumbers.svelte and added ` * @default "#fff"
    • @example "pink" */ "--line-number-background-color"?: string; ` in LineNumbers.d.ts

I guess I'm doing this wrong since it doesn't override anything and it seems to be taking the default styles in the theme I'm importing which is atom one dark.

yehiaabdelm commented 1 year ago

Nvm, I needed to run npx patch-package svelte-highlight after making changes