Commit 3eba2e4f authored by Annabel Dunstone's avatar Annabel Dunstone

Wrap single lines of code; horizontally scroll multi-line code blocks

parent 11eefba8
...@@ -95,6 +95,7 @@ v 8.11.0 (unreleased) ...@@ -95,6 +95,7 @@ v 8.11.0 (unreleased)
- Sensible state specific default sort order for issues and merge requests !5453 (tomb0y) - Sensible state specific default sort order for issues and merge requests !5453 (tomb0y)
- Fix bug where destroying a namespace would not always destroy projects - Fix bug where destroying a namespace would not always destroy projects
- Fix RequestProfiler::Middleware error when code is reloaded in development - Fix RequestProfiler::Middleware error when code is reloaded in development
- Allow horizontal scrolling of code blocks in issue body
- Catch what warden might throw when profiling requests to re-throw it - Catch what warden might throw when profiling requests to re-throw it
- Avoid commit lookup on diff_helper passing existing local variable to the helper method - Avoid commit lookup on diff_helper passing existing local variable to the helper method
- Add description to new_issue email and new_merge_request_email in text/plain content type. !5663 (dixpac) - Add description to new_issue email and new_merge_request_email in text/plain content type. !5663 (dixpac)
......
...@@ -14,12 +14,20 @@ ...@@ -14,12 +14,20 @@
margin-top: 0; margin-top: 0;
} }
// Single code lines should wrap
code { code {
font-family: $monospace_font; font-family: $monospace_font;
white-space: pre; white-space: pre-wrap;
word-wrap: normal; word-wrap: normal;
} }
// Multi-line code blocks should scroll horizontally
pre {
code {
white-space: pre;
}
}
kbd { kbd {
display: inline-block; display: inline-block;
padding: 3px 5px; padding: 3px 5px;
......
...@@ -36,9 +36,17 @@ ...@@ -36,9 +36,17 @@
} }
.wiki { .wiki {
// Single lines of code should wrap
code { code {
white-space: pre-wrap; white-space: pre-wrap;
word-break: keep-all; word-break: keep-all;
} }
// Code blocks should scroll horizontally
pre {
code {
white-space: pre;
}
}
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment