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

Changing the highlighting style of code #69

Open
yo80106 opened this issue Sep 20, 2017 · 3 comments
Open

Changing the highlighting style of code #69

yo80106 opened this issue Sep 20, 2017 · 3 comments
Assignees

Comments

@yo80106
Copy link

yo80106 commented Sep 20, 2017

Hi, I am wondering if there is a way to change the highlighting style of code. For example, changing the background color from black to white.

@Pilskalns
Copy link

Yes and really easy. Just tiny prepare:

  1. Copy one of existing color themes from
    <hugo root>/themes/docdock/static/css/hybrid.css to
    <hugo root>/static/css/hybrid.css
  2. Change your highlighting theme

There's doc on overall site theming, which is quite a minimal. http://docdock.netlify.com/content-organisation/customize-style/theme-variants/
Maybe this will inspire write better tutorial on custom styles.

@yo80106
Copy link
Author

yo80106 commented Sep 22, 2017

Thanks for your helping. After I changed some styles, I found there was a black frame surrounding the block of codes. I think this is caused by the copy function of snippet, so can I change the color?

@Pilskalns
Copy link

I used this additional CSS, to override background for code snippets:

.hljs, pre{
    background-color: %%your_color%%;
}

@vjeantet vjeantet self-assigned this Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants