Responsiveness Issue with small screen width
See original GitHub issueResponsiveness Issue The line number and code string overlap when a small width is active.
To Reproduce Simply drag the browser window to minimize the screen width to a minimum
Code Sample
const codeString = `// initialize fizz
IFizzClient fizzClient = IFizzClient::instance();
fizzClient.init("YOUR-APP-ID", "YOUR-APP-Secret",
"writablePath to keep session logs required by fizz c++ client");
// add listener
fizzClient.chat()->listener()->addOnMessagePublishedListener([=](FizzChannelMessagePtr message) {
// messages received will be notified here
}, "Your Custom Key for Listener");
// open connection and send message
fizzClient.open("userId", FizzLanguageCodes.English, FizzServices.All, [=](IFizzErrorPtr openError) {
std::map<std::string, std::string> dataMap;
bool translate = true, persist = true, filter = true;
fizzClient.chat()->publishMessage("channelId", "userNick", "msgText",
dataMap, translate, persist, filter, [=](IFizzErrorPtr publishError) {
});
});`
<SyntaxHighlighter
style={xcode}
language={'cpp'}
showLineNumbers={true}
customStyle={{
margin: 0,
wordBreak: 'break-all',
whiteSpace: 'pre-wrap',
boxShadow: '0px 2px 4px rgba(50,50,93,.1)'
}}
lineNumberStyle={{
color: '#5dc79e',
textAlign: 'right',
marginLeft: '-0.5em',
background: '#f2feef',
padding: '0 10px 0 10px'
}}
>
{codeString}
</SyntaxHighlighter>
Current behavior
Expected behavior
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Screen sizes and breakpoints - Windows apps - Microsoft Learn
Small (smaller than 640px ); Medium (641px to 1007px); Large (1008px and larger). Tip. When designing for specific breakpoints, design for the ...
Read more >What is the Ideal Screen Size for Responsive Design
How to find the ideal screen size for Responsive Design? · Small (smaller than 640px) · Medium (641px to 1007px) · Large (1008px...
Read more >What are the best screen sizes for responsive web design in ...
What are the best screen sizes for responsive web design in 2022? ; 1920×1080 – 22.97%; 1366×768 – 17.88%; 1536×864 – 11.34% ;...
Read more >Responsive web design basics
To attempt to provide the best experience, mobile browsers render the page at a desktop screen width (usually about 980px , though this...
Read more >Responsive Design Tutorial: Media Query Examples & More
Maybe it's time to update the post a little. Nowadays, The most used mobile's CSS width is 360px, followed by 320px for cheap...
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 Free
Top 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
See the following solution, may lend to what could to be updated in the internals.
It ignores the
showLineNumbers
prop and sets them via CSS instead of rendering elements in the DOM.If I find some time this week, will try to see if I can implement.
This is fixed by adding the
showInlineLineNumbers
prop, available as ofreact-syntax-highlighter
13.0.0+.