Minimal-mistakes: Changing syntax highlighting theme

Created on 9 Jan 2018  路  3Comments  路  Source: mmistakes/minimal-mistakes

  • [x] This is a question about using the theme.
  • [ ] This is a feature request.
  • [ ] I believe this to be a bug with the theme.

    • [ ] I have updated all gems with bundle update.

    • [ ] I have tested locally with bundle exec jekyll build.


Environment informations

  • Minimal Mistakes version:
  • Jekyll version: 3.6.2
  • GitHub Pages hosted: no
  • Operating system: ubuntu server 14.04 LTS

Expected behavior

Steps to reproduce the behavior


Hi, Michael
I want the style of code block like this:
finaly

Not like this:
after

This's my markdown file:
md_file

Also, I tried to read all the posts in this site -"https://mmistakes.github.io/minimal-mistakes/ " ,but did not find a way, what should I do ?

Stale Support

Most helpful comment

Quick note for anybody wanting to go the "override" route, add your replacement base variables after the @import of the skin but before the @import of the main partials in main.scss and add !important to override the skin variables.

--- 
# front-matter
--- 

@charset "utf-8";

@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin

// syntax highlighting from the "contrast" skin
// https://mmistakes.github.io/minimal-mistakes/docs/stylesheets/#colors
$base00: #000000 !important;
$base01: #242422 !important;
$base02: #484844 !important;
$base03: #6c6c66 !important;
$base04: #918f88 !important;
$base05: #b5b3aa !important;
$base06: #d9d7cc !important;
$base07: #fdfbee !important;
$base08: #ff6c60 !important;
$base09: #e9c062 !important;
$base0a: #ffffb6 !important;
$base0b: #a8ff60 !important;
$base0c: #c6c5fe !important;
$base0d: #96cbfe !important;
$base0e: #ff73fd !important;
$base0f: #b18a3d !important;

@import "minimal-mistakes"; // main partials

All 3 comments

You have 3 options:

  1. Override the 16 color variables used for syntax highlighting to one of the other included code block themes.
  2. Come up with your own set of base16 colors and replace them. There are numerous base16 themes out there if you Google around.
  3. Downgrade the theme to 4.8.1

Quick note for anybody wanting to go the "override" route, add your replacement base variables after the @import of the skin but before the @import of the main partials in main.scss and add !important to override the skin variables.

--- 
# front-matter
--- 

@charset "utf-8";

@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin

// syntax highlighting from the "contrast" skin
// https://mmistakes.github.io/minimal-mistakes/docs/stylesheets/#colors
$base00: #000000 !important;
$base01: #242422 !important;
$base02: #484844 !important;
$base03: #6c6c66 !important;
$base04: #918f88 !important;
$base05: #b5b3aa !important;
$base06: #d9d7cc !important;
$base07: #fdfbee !important;
$base08: #ff6c60 !important;
$base09: #e9c062 !important;
$base0a: #ffffb6 !important;
$base0b: #a8ff60 !important;
$base0c: #c6c5fe !important;
$base0d: #96cbfe !important;
$base0e: #ff73fd !important;
$base0f: #b18a3d !important;

@import "minimal-mistakes"; // main partials

This issue has been automatically marked as stale because it has not had recent activity.

If this is a bug and you can still reproduce this error on the master branch, please reply with any additional information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in 7 days if no further activity occurs. Thank you for all your contributions.

Was this page helpful?
0 / 5 - 0 ratings