-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
Overriding all base16 colors possible still leaves grey lines I can't get rid of #2770
Comments
Eventual goal is to get a Stack Overflow or GitHub-looking light syntax highlighting for code. #2278 (comment) I've attempted a handful of times, each time unsuccessfully, over the last few months. |
@mmistakes, Ok, I found the problem, but I need help resolving it please. I added this to code {
/* force background code highlighting inside headings & all other elements too */
background: $code-background-color;
} My intent was to make headings with code in them to have the code show up, like this: Example heading with code:
|
Try using your browser's web developer tools to inspect the elements. That transparent "grey" is darkening when stacked on the code block background. code {
background: rgba(27,31,35,0.05);
} You'll probably need to change that background color to match the background-color set on As mentioned before you'll need to change the base16 variables to a GitHub base16 scheme, changing all the values to the same hexcode isn't going to give you the correct colors. If you use these values you'll get the GitHub styling. $code-background-color: #fafafa;
$base00: #fafafa;
$base01: #f5f5f5;
$base02: #c8c8fa;
$base03: #969896;
$base04: #e8e8e8;
$base05: #333333;
$base06: #ffffff;
$base07: #ffffff;
$base08: #ed6a43;
$base09: #0086b3;
$base0a: #795da3;
$base0b: #183691;
$base0c: #183691;
$base0d: #795da3;
$base0e: #a71d5d;
$base0f: #333333; Which will turn something like this:
into this: If that still doesn't meet your needs then you'll need to replace the entire .highlight table td { padding: 5px; }
.highlight table pre { margin: 0; }
.highlight .cm {
color: #999988;
font-style: italic;
}
.highlight .cp {
color: #999999;
font-weight: bold;
}
.highlight .c1 {
color: #999988;
font-style: italic;
}
.highlight .cs {
color: #999999;
font-weight: bold;
font-style: italic;
}
.highlight .c, .highlight .ch, .highlight .cd, .highlight .cpf {
color: #999988;
font-style: italic;
}
.highlight .err {
color: #a61717;
background-color: #e3d2d2;
}
.highlight .gd {
color: #000000;
background-color: #ffdddd;
}
.highlight .ge {
color: #000000;
font-style: italic;
}
.highlight .gr {
color: #aa0000;
}
.highlight .gh {
color: #999999;
}
.highlight .gi {
color: #000000;
background-color: #ddffdd;
}
.highlight .go {
color: #888888;
}
.highlight .gp {
color: #555555;
}
.highlight .gs {
font-weight: bold;
}
.highlight .gu {
color: #aaaaaa;
}
.highlight .gt {
color: #aa0000;
}
.highlight .kc {
color: #000000;
font-weight: bold;
}
.highlight .kd {
color: #000000;
font-weight: bold;
}
.highlight .kn {
color: #000000;
font-weight: bold;
}
.highlight .kp {
color: #000000;
font-weight: bold;
}
.highlight .kr {
color: #000000;
font-weight: bold;
}
.highlight .kt {
color: #445588;
font-weight: bold;
}
.highlight .k, .highlight .kv {
color: #000000;
font-weight: bold;
}
.highlight .mf {
color: #009999;
}
.highlight .mh {
color: #009999;
}
.highlight .il {
color: #009999;
}
.highlight .mi {
color: #009999;
}
.highlight .mo {
color: #009999;
}
.highlight .m, .highlight .mb, .highlight .mx {
color: #009999;
}
.highlight .sb {
color: #d14;
}
.highlight .sc {
color: #d14;
}
.highlight .sd {
color: #d14;
}
.highlight .s2 {
color: #d14;
}
.highlight .se {
color: #d14;
}
.highlight .sh {
color: #d14;
}
.highlight .si {
color: #d14;
}
.highlight .sx {
color: #d14;
}
.highlight .sr {
color: #009926;
}
.highlight .s1 {
color: #d14;
}
.highlight .ss {
color: #990073;
}
.highlight .s, .highlight .sa, .highlight .dl {
color: #d14;
}
.highlight .na {
color: #008080;
}
.highlight .bp {
color: #999999;
}
.highlight .nb {
color: #0086B3;
}
.highlight .nc {
color: #445588;
font-weight: bold;
}
.highlight .no {
color: #008080;
}
.highlight .nd {
color: #3c5d5d;
font-weight: bold;
}
.highlight .ni {
color: #800080;
}
.highlight .ne {
color: #990000;
font-weight: bold;
}
.highlight .nf, .highlight .fm {
color: #990000;
font-weight: bold;
}
.highlight .nl {
color: #990000;
font-weight: bold;
}
.highlight .nn {
color: #555555;
}
.highlight .nt {
color: #000080;
}
.highlight .vc {
color: #008080;
}
.highlight .vg {
color: #008080;
}
.highlight .vi {
color: #008080;
}
.highlight .nv, .highlight .vm {
color: #008080;
}
.highlight .ow {
color: #000000;
font-weight: bold;
}
.highlight .o {
color: #000000;
font-weight: bold;
}
.highlight .w {
color: #bbbbbb;
}
.highlight {
background-color: #f8f8f8;
} |
Closing as GH issues are for bug reports and there is already an open discussion covering how to modify the syntax highlighting base16 variables. |
Thank you. That was a big help. After some investigating and guessing I determined you generated that block of CSS using UPDATE: Correction, these are the
I found this by running
|
…thub > out.scss` See my comment here: mmistakes/minimal-mistakes#2770 (comment) modified: _sass/minimal-mistakes/_syntax.scss
Use GitHub styling, from the bottom of this comment here: mmistakes/minimal-mistakes#2770 (comment) See also my comment here about how I think that CSS was generated!: mmistakes/minimal-mistakes#2770 (comment) Fixes issue #16 modified: _sass/minimal-mistakes/_syntax.scss new file: _sass/minimal-mistakes/_syntax.scss.old
Environment
This repo: https://github.com/ElectricRCAircraftGuy/ElectricRCAircraftGuy.github.io
This file: https://github.com/ElectricRCAircraftGuy/ElectricRCAircraftGuy.github.io
At line 57, before the SAS
@import
s, add this:I still see these grey lines I can't seem to get rid of no matter what I do:
Expected behavior
I expect that when I set all base16 colors to the exact same grey color, all I see is a big section all this color, with no distinguishable text or code in it whatsoever until I highlight something.
Steps to reproduce the behavior
See above.
The text was updated successfully, but these errors were encountered: