When one customizes the WikiEditor toolbar, adding a button according to the docs, the added buttons behave differently than the native buttons.
They have different DOM structures:
And in some cases (e.g. changed default browser font size) it results in them having different sizes and misaligned highlighting:
The reason for the last is that the custom buttons use fixed sizes (32px) while the native OOUI buttons use sizes relative to the current font size (2.14285714em).
I currently fix this in Convenient-Discussions with this rule:
.cd-commentForm .tool-button { width: 2.14285714em; height: 2.14285714em; border: 1px solid transparent; }