diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-08-19 14:00:47 +0000 |
---|---|---|
committer | Ruben Davila <rdavila84@gmail.com> | 2016-08-19 15:37:30 -0500 |
commit | 24477045f0ade0f758d180b6ed15818eb2cbfaa2 (patch) | |
tree | 0e7a8b5ca9127db254b1904c022f0d4570d46418 /app | |
parent | f81dd64f13e5e36c075a42a5411640127b94727b (diff) | |
download | gitlab-ce-24477045f0ade0f758d180b6ed15818eb2cbfaa2.tar.gz |
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
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/framework/typography.scss | 10 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/detail_page.scss | 7 |
2 files changed, 9 insertions, 8 deletions
diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss index 8659604cb8b..06874a993fa 100644 --- a/app/assets/stylesheets/framework/typography.scss +++ b/app/assets/stylesheets/framework/typography.scss @@ -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; diff --git a/app/assets/stylesheets/pages/detail_page.scss b/app/assets/stylesheets/pages/detail_page.scss index 1b389d83525..4d9c73c6840 100644 --- a/app/assets/stylesheets/pages/detail_page.scss +++ b/app/assets/stylesheets/pages/detail_page.scss @@ -34,11 +34,4 @@ } } } - - .wiki { - code { - white-space: pre-wrap; - word-break: keep-all; - } - } } |