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

Add support for inline code highlighting #3180

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ node_modules
yarn.lock
extra/

# play stuff
quick*
test*
extra*

# editors
.idea/
.vscode/
Expand Down
17 changes: 15 additions & 2 deletions src/styles/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,28 @@
Touched: 2021
*/

.hljs {
/*
This is left on purpose making default.css the single file that can be lifted
as-is from the repository directly without the need for a build step

Typically this "required" baseline CSS is added by `makestuff.js` during build.
*/
pre code.hljs {
display: block;
overflow-x: auto;
padding: 1em;
JamesTheAwesomeDude marked this conversation as resolved.
Show resolved Hide resolved
}

code.hljs {
padding: 3px 5px;
JamesTheAwesomeDude marked this conversation as resolved.
Show resolved Hide resolved
}
/* end baseline CSS */

.hljs {
background: #F0F0F0;
color: #444;
}


/* Base color: saturation 0; */

.hljs-subst {
Expand Down
8 changes: 6 additions & 2 deletions tools/lib/makestuff.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ function install(file, dest = file) {
}

const DEFAULT_CSS = `
.hljs {
pre code.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
padding: 1em;
}
code.hljs {
padding: 3px 5px;
}
`.trim();

Expand Down