metonym / svelte-highlight

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

How to override overflow-x style of the main Highlight div #280

Open isaacwein opened 1 year ago

isaacwein commented 1 year ago

already talked about this in issue #274

I can't make it work even if I define a global class because the overflow-x is on the div itself, why make it so hard?

<div class="line-numbers svelte-1vh31p0" style="overflow-x: auto;"> 
    <table class="svelte-1vh31p0">
          ....
    </table>
</div>

the only way i was able to overwrite it was with a !important like this

.line-numbers {
  overflow-x: unset !important;
  overflow-y: unset !important;
}

I don't think it is the right way

the whole idea that I need to define as a global class and use it in my components is wrong in the first place