Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest VSCode and MynahUI, inline codes are not aligned with normal texts #104

Merged

Conversation

dogusata
Copy link
Collaborator

@dogusata dogusata commented Sep 4, 2024

Problem

Inline code blocks are not properly aligned with the texts in latest VSCode and JetBrains IDEs.

#101

Solution

  • 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.
Screenshot 2024-09-04 at 11 45 00

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dogusata dogusata requested a review from a team as a code owner September 4, 2024 08:53
@dogusata dogusata linked an issue Sep 4, 2024 that may be closed by this pull request
1 task
@dogusata dogusata changed the title Latest VSCode and MynahUI, inline codes are not aligned with normal tests Latest VSCode and MynahUI, inline codes are not aligned with normal texts Sep 4, 2024
@dogusata dogusata merged commit 3777a39 into main Sep 4, 2024
1 check passed
@dogusata dogusata deleted the dogusata/latest-vscode-and-mynahui-inline-code-are-not-aligned branch September 4, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Latest VSCode and MynahUI inline code are not aligned
2 participants