Skip to content
New issue

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

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

Already on GitHub? # to your account

Long code lines expands text outside view on mobile Safari #17

Open
kinnoukabokudo opened this issue Jun 17, 2020 · 0 comments
Open

Long code lines expands text outside view on mobile Safari #17

kinnoukabokudo opened this issue Jun 17, 2020 · 0 comments

Comments

@kinnoukabokudo
Copy link

I am experiencing issues where long code lines in a code block can cause mobile browsers to overflow without scrollbars either in the view or the code block.

An example would be a code block like below:

import BackgroundTasks
...
    
BGTaskScheduler.shared.register(forTaskWithIdentifier: "com.demo.refresh", using: nil) { task in
    let refreshAppTask = task as! BGAppRefreshTask
    
    refreshAppTask.expirationHandler = {
        
    }
    
    ...
    
    task.setTaskCompleted(success: true)
}

...

I am attempted to fix the issue:

pre {
  overflow: auto;
  padding: double($base-spacing-unit);
  margin-bottom: $base-spacing-unit;
  font-size: $font-size-medium;
  line-height: $line-height-medium;
  white-space: pre-wrap;
  display: inline-block;
  overflow-wrap: break-word;
  word-wrap: break-word;
  -ms-word-break: break-all;
  word-break: break-all;
  word-break: break-word;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;
}

But unsuccessfully.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant