core icon indicating copy to clipboard operation
core copied to clipboard

[BUG] [class*=shj-lang-] color & background defined twice in github-* themes

Open dflock opened this issue 1 year ago • 1 comments

Information

  • Speed-highlight.js version 1.2.6
  • Browser version n/a

Description

If we look at github-dark.css, for example, we see this at the top:

[class*='shj-lang-'] {
    white-space: pre;
    margin: 10px 0;
    border-radius: 10px;
    padding: 30px 20px;
    background: #fff;
    color: #112;
...

and this further down:

[class*='shj-lang-'] {
    color: #24292f;
    background: #fff;
}

This a bit redundant and also makes it slightly harder to update these styles, which is how I bumped into this.

Expected behavior Just define the color & background once.

I just wanted to add that this project is awesome! Super lightweight and fast - the best lightweight highlighting library 0 thanks!

dflock avatar Mar 27 '24 14:03 dflock

It's because there is a base style in default.css that is imported in every other style sheets, and then only the colors are changed. I thought the minifier would merge rules. I will look into that

matubu avatar Mar 27 '24 16:03 matubu

:tada: This issue has been resolved in version 1.2.7 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Dec 10 '24 00:12 github-actions[bot]