Collapsed code block in list causes additional padding in inline-code elements in parent block

Steps to reproduce

  1. Ensure ‘Fold heading’ is turned on
  2. Paste the following block into an Obsidian note with the default theme.
- `some code block`
	- Child element
		My magic code block.
  1. Collapse the top level list block. The inline code block now has additional padding.

Expected result

The inline code block does not have additional padding

Actual result

Before collapse:

After collapse:


  • Operating system: Windows 10
  • Obsidian version: 0.9.6

Additional information

The culprit seems to be the padding: inherit style which will inherit the padding from the parent span element:

1 Like