Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dflock opened this issue Mar 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dflock
Copy link

dflock commented Mar 27, 2024

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 dflock added the bug Something isn't working label Mar 27, 2024
@matubu
Copy link
Member

matubu commented Mar 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants