Commit 24477045 authored by Jacob Schatz's avatar Jacob Schatz Committed by Ruben Davila

Merge branch 'scroll-code-blocks' into 'master'

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

## What does this MR do?
Original problem: code blocks were wrapping in issue body

* Multi-line code blocks (```) should scroll horizontally
* Single lines of code (`) should wrap

## Why was this MR needed?
Inconsistent scrolling vs wrapping behavior

## What are the relevant issue numbers?
Closes #19619 

## Screenshots (if relevant)
![Screen_Shot_2016-08-04_at_2.32.30_PM](/uploads/a4abcc81b57ffaa8dc8ce2b70a24bc21/Screen_Shot_2016-08-04_at_2.32.30_PM.png)


See merge request !5675
parent f81dd64f
......@@ -129,6 +129,7 @@ v 8.11.0 (unreleased)
- 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 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
- 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)
......
......@@ -14,12 +14,20 @@
margin-top: 0;
}
// Single code lines should wrap
code {
font-family: $monospace_font;
white-space: pre;
white-space: pre-wrap;
word-wrap: normal;
}
// Multi-line code blocks should scroll horizontally
pre {
code {
white-space: pre;
}
}
kbd {
display: inline-block;
padding: 3px 5px;
......
......@@ -34,11 +34,4 @@
}
}
}
.wiki {
code {
white-space: pre-wrap;
word-break: keep-all;
}
}
}
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