You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a code block (using <pre><code>) contains multiple lines, the padding applies to the first line only causing a small offset.
cc @deniak who noticed this issue too.
Suggestion
When used in a <pre> there should be no padding applied to <code> or <samp> or <kbd> (as those will likely contains multiple lines).
Adding the following markup is enough to reproduce this issue:
<p>Example 1: pre alone</p><pre>line 1
line 2
</pre><p>Example 2.1: pre+code - which shows the issue</p><pre><code>line 1
line 2
</code></pre><p>Example 2.2: pre+samp - which also shows the issue</p><pre><samp>line 1
line 2
</samp></pre><p>Example 2.3: pre+kbd - which does not have the issue as <kbd> does not currently have any specific padding applied</p><pre><kbd>line 1
line 2
</kbd></pre>
Screenshot of this example markup:
The text was updated successfully, but these errors were encountered:
Describe the issue
When a code block (using
<pre><code>
) contains multiple lines, the padding applies to the first line only causing a small offset.cc @deniak who noticed this issue too.
Suggestion
When used in a
<pre>
there should be no padding applied to<code>
or<samp>
or<kbd>
(as those will likely contains multiple lines).URL
Example of page where this issue was spotted:
https://www.w3.org/guide/editor/editors-draft.html#guidelines
How to reproduce the issue
Adding the following markup is enough to reproduce this issue:
Screenshot of this example markup:
The text was updated successfully, but these errors were encountered: