Container box of inline code blocks are set to inline-block and vertical alignment is set to middle.
Background and border pseudo selectors of the inline code blocks are realigned depending on the default line height.
While the top:50% property moves the box to the middle of the parent container, instead of using negative margin with a calculated value (px, rem, em etc.) we're using transform: translateY(-50%). Because the percentage values inside transform uses the target container's sizes, for this, it means that it will move the background and the border if the inline code half to top.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Problem
Inline code blocks are not properly aligned with the texts in latest VSCode and JetBrains IDEs.
https://github.com/aws/mynah-ui/issues/101
Solution
inline-block
and vertical alignment is set tomiddle
.top:50%
property moves the box to the middle of the parent container, instead of using negativemargin
with a calculated value (px, rem, em etc.) we're usingtransform: translateY(-50%)
. Because the percentage values inside transform uses the target container's sizes, for this, it means that it will move the background and the border if the inline code half to top.License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.