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

Correct Prism CSS class for code blocks #870

Merged
merged 2 commits into from
Jul 25, 2018
Merged

Conversation

dballance
Copy link
Contributor

Motivation

CSS class for Prism.js still look to be incorrect - this prevents using existing Prism.js themes out of the box.

See: https://github.com/PrismJS/prism/blob/master/themes/prism-coy.css

image

Have you read the Contributing Guidelines on pull requests?

Yes - and signed CLA.

Test Plan

No tests required.

Related PRs

#735 #842

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 24, 2018
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Jul 24, 2018

Deploy preview for docusaurus-preview ready!

Built with commit 4974d8c

https://deploy-preview-870--docusaurus-preview.netlify.com

@dballance
Copy link
Contributor Author

dballance commented Jul 24, 2018

By the way, this does change the appearance of the deploy preview. I'm unsure if it's because the prism theme is now correctly being applied and theming the style blocks, or if there was previous compensation in the lib for this styling change.

Previous:
image

Current, in deploy preview:

image

@endiliey
Copy link
Contributor

endiliey commented Jul 25, 2018

This is caused by conflicting theme in highlight.js and prism.js

Currently all the syntax in Docusaurus (example: jsx) is working because it uses hljs theme but use prism.js on the syntax highlighting.

One solution is to remove the theming on prism.css but correct the prism css class (e.g:language-js)

correct

@facebook facebook deleted a comment from docusaurus-bot Jul 25, 2018
@endiliey endiliey merged commit 0c09cc0 into facebook:master Jul 25, 2018
@dballance
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants