I’m implementing CodeMirror on a project and need to use it to syntax highlight both code blocks and inline code.
Here’s a sample I’ve put together to demonstrate what I’m trying to do: http://students.susanbuck.net/storage/code/code-mirror/
The syntax is working in both instances, but where I’m stuck is finding a way to kill the padding only on the .inline code elements so they don’t add excess space between the lines in the paragraph.
You want to target the
.CodeMirror-linesdivs that followtextarea.code.inlineelements. This can be achieved using the following CSS selector:There is also a height value set in a child of
div.CodeMirror-scrollthat you might want to avoid. You can make this height redundent by using the following CSS: