Make docblock <code> elements inline so they behave better - #163623
Open
GuillaumeGomez wants to merge 1 commit into
Open
GuillaumeGomez wants to merge 1 commit into
GuillaumeGomez wants to merge 1 commit into
Conversation
Collaborator
|
Some changes occurred in HTML/CSS/JS. |
GuillaumeGomez
commented
Oct 1, 2026
| @@ -499,6 +499,9 @@ code, pre, .code-header, .type-signature { | |||
| border-radius: 3px; | |||
| padding: 0 0.125em; | |||
| } | |||
| .docblock code { | |||
| padding: 2px 0.125em; | |||
Member
Author
There was a problem hiding this comment.
Difference between inline-block and inline is that the box-sizing: border-box; isn't taken into account anymore, so we lose ~4px in height (a GUI test failed because of that, yeay person who wrote it!). So to compensate, I added the 2px padding on top and bottom.
GuillaumeGomez
commented
Oct 1, 2026
| @@ -0,0 +1,93 @@ | |||
| // This test ensures that `<code>` in docblocks are `display: inline` so comma are | |||
Member
Author
There was a problem hiding this comment.
Hopefully the comments in this file makes sense as I tried to explain how I tested this behaviour.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #133075.
Whole problem description is in #133075 with nice screenshots so not going to duplicate its content here (although I'll add review comments on my PR to help the review 😉 ).
r? @lolbinarycat