Specifying language for in-text code blocks does not display correctly on mobile/small screens.
See original GitHub issue- I’ve read the contribution guidelines and agree with them
I’ve found a bug and checked that …
- … the problem doesn’t occur with the default MkDocs template
- … the problem is not in any of my customizations (CSS, JS, template)
- … the documentation does not mention anything about my problem
- … there are no open or closed issues that are related to my problem
Description
When I specify the language for code inside normal text (not in code blocks) it does not display correctly on mobile/small screens. Image below:
I am using the following markdown to specify code: (#!language)
inside (`s) #!js console.log(“help me!”);
Expected behavior
I expect the code to not wrap over other text, like when you use simple code highlighting (code here
).
Actual behavior
Code in text, when language is specified, wraps over other text (see image above)
Steps to reproduce the bug
- Insert code into documentation using the following:
#!language code here
. - Either build docs or serve and open in mobile/shrink browser screen.
Package versions
- Python: 3.85
- MkDocs: 1.12
- Material: 7.1.3
Project configuration
site_name: Nick's Docs
theme:
name: material
logo: //removed
favicon: //removed
features:
- navigation.instant
- navigation.tabs
- navigation.tabs.sticky
- navigation.top
static_templates:
- 404.html
font:
text: Roboto
code: Source Code Pro
extra_css:
- stylesheets/extra.css
plugins:
- search
- minify:
minify_html: true
extra_javascript:
- javascripts/extra.js
- https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML
markdown_extensions:
- pymdownx.arithmatex
- attr_list
- codehilite:
guess_lang: false
linenums: true
- pymdownx.inlinehilite
- pymdownx.superfences:
- admonition
- lightgallery
- pymdownx.details
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.magiclink
- pymdownx.mark
- pymdownx.inlinehilite
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tabbed
- pymdownx.tilde
- toc:
permalink: false
extra:
social:
- icon: fontawesome/solid/images
link: //removed
- icon: fontawesome/solid/blog
link: //removed
- icon: fontawesome/brands/linkedin
link: //removed
- icon: fontawesome/brands/github
link: https://github.com/tpbnick
- icon: fontawesome/brands/instagram
link: //removed
- icon: fontawesome/regular/envelope
link: //removed
extra_css:
- stylesheets/extra.css
System information
-
OS: Windows 10
-
Browser: Edge/Chrome
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
1 Code::Blocks Project Management
Code::Blocks settings are saved as application data in a file called <user>.conf in the codeblocks directory. This configuration file contains information such ...
Read more >window too small for int variables with short names
It seems that the value window is not displaying short names with small values at all, and truncating larger values when the variable...
Read more >Configuring Code::Blocks to follow older standards of C.
Anyways, I was wondering if there was some setting in Code::Blocks I could change that would allow for programs written with an older...
Read more >No cursor in debugger - Code::Blocks Forums
When I debug, there is no little yellow triangular cursor inside the source ... correctly displays the source file and line number in...
Read more >Creating a new project - Code::Blocks
This page is a guide to many of the beginning (and some intermediate) features of the creation and modification of a Code::Blocks project....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I tried to set the font to reproduce with the same font “Source Code Pro”, but still, everything works. Honestly, this seems to be a problem with your system setup. If you can manage to provide a reproducible case, we can reopen this issue, but until then it’s nothing we can help you investigate, as we’ve never seen something like this before. Also, there have been no changes that could be related to this lately.
I see no issues. If I were you, I’d start by removing custom CSS (as it appears you have some) and remove all extensions except those critical to showing the inline code in question.
If it works after that, I would begin adding in other plugins and the “extra” CSS to try and determine what is altering the output to break like this.
I say this I am the author of
pymdownx.inlinehilite
and I use it heavily along with MkDocs Material, and I am not seeing issues on any of my sites or seeing in locally when I update to the very latest Material.