summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2016-04-20 21:12:38 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2016-04-21 10:07:55 +0000
commitd793dc8b000a055d103585fb5b0a826fa7c5154f (patch)
tree402d8ce1020e4ca03addf3b553f6baaf83106905
parent82d8c74f76b9e1e06869af46c1865fa28e095779 (diff)
downloadgitlab-ce-d793dc8b000a055d103585fb5b0a826fa7c5154f.tar.gz
Merge branch 'revert-diff-scroll' into 'master'
Wrap all code in diffs Closes #15382 Closes #15422 All diff code wraps to next line instead of scrolling <img src="/uploads/ec5754919bac0b027fcb122bb88435b3/Screen_Shot_2016-04-20_at_12.22.27_PM.png" width="500px"> See merge request !3838
-rw-r--r--app/assets/stylesheets/framework/markdown_area.scss9
-rw-r--r--app/assets/stylesheets/pages/detail_page.scss6
-rw-r--r--app/assets/stylesheets/pages/diff.scss4
-rw-r--r--app/assets/stylesheets/pages/note_form.scss12
-rw-r--r--app/assets/stylesheets/pages/notes.scss19
5 files changed, 20 insertions, 30 deletions
diff --git a/app/assets/stylesheets/framework/markdown_area.scss b/app/assets/stylesheets/framework/markdown_area.scss
index 0f32d36d59c..704fa1ff800 100644
--- a/app/assets/stylesheets/framework/markdown_area.scss
+++ b/app/assets/stylesheets/framework/markdown_area.scss
@@ -90,3 +90,12 @@
box-shadow: none;
width: 100%;
}
+
+.md {
+ &.md-preview-holder {
+ code {
+ white-space: pre-wrap;
+ word-break: break-all;
+ }
+ }
+}
diff --git a/app/assets/stylesheets/pages/detail_page.scss b/app/assets/stylesheets/pages/detail_page.scss
index 2c2ac903f29..751a5ab4d92 100644
--- a/app/assets/stylesheets/pages/detail_page.scss
+++ b/app/assets/stylesheets/pages/detail_page.scss
@@ -36,4 +36,10 @@
}
}
}
+
+ .wiki {
+ code {
+ white-space: pre-wrap;
+ }
+ }
}
diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss
index 183f22a1b24..b84e2aac836 100644
--- a/app/assets/stylesheets/pages/diff.scss
+++ b/app/assets/stylesheets/pages/diff.scss
@@ -86,7 +86,7 @@
}
span {
- white-space: pre;
+ white-space: pre-wrap;
}
}
}
@@ -335,7 +335,7 @@
}
.diff-file .line_content {
- white-space: pre;
+ white-space: pre-wrap;
}
.diff-wrap-lines .line_content {
diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss
index c2371d79989..a2442e02d65 100644
--- a/app/assets/stylesheets/pages/note_form.scss
+++ b/app/assets/stylesheets/pages/note_form.scss
@@ -83,18 +83,6 @@
border-color: $gl-success;
}
}
-
- p {
- code {
- white-space: normal;
- }
-
- pre {
- code {
- white-space: pre;
- }
- }
- }
}
}
diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss
index ffcd89a3c9f..74437aa207c 100644
--- a/app/assets/stylesheets/pages/notes.scss
+++ b/app/assets/stylesheets/pages/notes.scss
@@ -81,16 +81,8 @@ ul.notes {
@include md-typography;
// On diffs code should wrap nicely and not overflow
- p {
- code {
- white-space: normal;
- }
-
- pre {
- code {
- white-space: pre;
- }
- }
+ code {
+ white-space: pre-wrap;
}
// Reset ul style types since we're nested inside a ul already
@@ -137,7 +129,7 @@ ul.notes {
margin-right: 10px;
}
.line_content {
- white-space: pre;
+ white-space: pre-wrap;
}
}
@@ -171,11 +163,6 @@ ul.notes {
&.parallel {
border-width: 1px;
-
- .code,
- code {
- white-space: pre-wrap;
- }
}
.notes {