Skip to content

Correct Prism CSS class for code blocks#870

Merged
endiliey merged 2 commits intofacebook:masterfrom
dballance:master
Jul 25, 2018
Merged

Correct Prism CSS class for code blocks#870
endiliey merged 2 commits intofacebook:masterfrom
dballance:master

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