Skip to content

Would you mind add a light(white) code background? #1401

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

Open
chenweigao opened this issue Mar 5, 2019 · 7 comments
Open

Would you mind add a light(white) code background? #1401

chenweigao opened this issue Mar 5, 2019 · 7 comments
Labels
type: feature request Request to add a new feature

Comments

@chenweigao
Copy link

Feature request

What problem does this feature solve?

image
Like this picture, when I change the codeBgColor into white, some words become invisible.

What does the proposed API look like?

How should this be implemented in your opinion?

I have used Prism.js but failed.

Are you willing to work on this yourself?**

Yes, would you mind give me some suggestions?

@shigma shigma added the type: feature request Request to add a new feature label Mar 5, 2019
@shigma
Copy link
Collaborator

shigma commented Mar 5, 2019

You can import theme stylesheet in index.styl or Layout.vue:

@import "prismjs/themes/prism-tomorrow.css"
// currently used, but you can specify another

Also, we have planned to enhance code snippet in the next two months.

@kidonng
Copy link
Contributor

kidonng commented Jul 10, 2019

Like #736, currently, when we import another Prism theme, the default theme (Tomorrow) hard-coded in layout.vue will override the one imported.

@chenweigao
Copy link
Author

@kidonng thank you for your working, is there some docs to be written in the future?

@kidonng
Copy link
Contributor

kidonng commented Jul 14, 2019

@kidonng thank you for your working, is there some docs to be written in the future?

About what? If you are looking for a minimal workaround, check out Theme Inheritance feature introduced in 1.x.
Here's an example used in my project, it is basically a copy of layouts/Layout.vue (with Prism theme removed) and utils/index.js (which can't be inherited). Add these files and you should be able to customize code background as you wish 😃

@chenweigao
Copy link
Author

@kidonng
thank you very much, I think we could write some documentation to help people who need help about this, it is a good job, isn't it?

@kidonng
Copy link
Contributor

kidonng commented Jul 17, 2019

thank you very much, I think we could write some documentation to help people who need help about this, it is a good job, isn't it?

It is better to fix the problem instead 😁 I have created a pull request.

@kidonng
Copy link
Contributor

kidonng commented Aug 1, 2019

As v1.0.3 has released, you should be able to customize the code theme now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Request to add a new feature
Projects
None yet
Development

No branches or pull requests

3 participants