mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 17:17:28 +02:00
Correct Prism CSS class for code blocks (#870)
* Correct Prism CSS class for code blocks * remove prism css theme that conflicts hljs theme
This commit is contained in:
parent
afec4bd47c
commit
0c09cc01cb
2 changed files with 2 additions and 22 deletions
|
@ -24,7 +24,7 @@ class MarkdownRenderer {
|
||||||
const md = new Markdown({
|
const md = new Markdown({
|
||||||
// Highlight.js expects hljs css classes on the code element.
|
// Highlight.js expects hljs css classes on the code element.
|
||||||
// This results in <pre><code class="hljs css languages-jsx">
|
// This results in <pre><code class="hljs css languages-jsx">
|
||||||
langPrefix: 'hljs css languages-',
|
langPrefix: 'hljs css language-',
|
||||||
highlight(str, lang) {
|
highlight(str, lang) {
|
||||||
lang =
|
lang =
|
||||||
lang || (siteConfig.highlight && siteConfig.highlight.defaultLang);
|
lang || (siteConfig.highlight && siteConfig.highlight.defaultLang);
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
/**
|
/**
|
||||||
* prism.js default theme for JavaScript, CSS and HTML
|
* Modified prism.js default theme for JavaScript, CSS and HTML
|
||||||
* Based on dabblet (http://dabblet.com)
|
* Based on dabblet (http://dabblet.com)
|
||||||
* @author Lea Verou
|
* @author Lea Verou
|
||||||
*/
|
*/
|
||||||
|
|
||||||
code[class*="language-"],
|
code[class*="language-"],
|
||||||
pre[class*="language-"] {
|
pre[class*="language-"] {
|
||||||
color: black;
|
|
||||||
background: none;
|
|
||||||
text-shadow: 0 1px white;
|
|
||||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
|
@ -27,23 +24,6 @@ pre[class*="language-"] {
|
||||||
hyphens: none;
|
hyphens: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
|
||||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
|
||||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media print {
|
|
||||||
code[class*="language-"],
|
|
||||||
pre[class*="language-"] {
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Code blocks */
|
/* Code blocks */
|
||||||
pre[class*="language-"] {
|
pre[class*="language-"] {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue