Open ketozhang opened 6 years ago
@ketozhang Can you inspect and check if there is an element that is duplicated or that gets extra padding?
I've forgotten about this since I put the website on hold sorry about that. It's quite obvious something is wrong. The kramdown and github flavor fences are being treated with the same structure as inline code:
<div class="language-html highlighter-rouge">
<div class="highlight">
<pre class="highlight">
<code>
<!-- spans -->
</code>
</pre>
</div>
</div>
<figure class="highlight">
<pre>
<code class="language-html" data-lang="html">
<!-- spans -->
</code>
</pre>
</figure>
@nielsenramon highlight class is introducing the extra margin and padding in Github fenced code blocks too. using {% highlight bash %}: and using github fenced: CSS: _highlights-datk.scss#L8
While Jekyll do recommend liquid code blocks
{% highlight language %} ... {% endhighlight %}
, I find it these uncommon and inconvenient. I often use Github fenced code blocks with``` code ```
instead. On chalk, the liquid code block renders differently than both Github and Kramdown's flavor.The margins in these code blocks are too big
This is perfect
Is there a simple CSS fix to this?