summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-06-23 10:33:47 +0000
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-06-23 10:33:47 +0000
commit0b7d7df7a52a7f049ed6be3bba52a06bc051e83b (patch)
tree1eb5112b60ca2612efca5059570510a236046de6
parent6ff571aa9a30b798a58eb1b02b9360466f231c01 (diff)
downloadgitlab-ce-0b7d7df7a52a7f049ed6be3bba52a06bc051e83b.tar.gz
Limit the width of project READMEs
-rw-r--r--app/assets/stylesheets/framework/files.scss6
-rw-r--r--app/assets/stylesheets/framework/layout.scss2
-rw-r--r--app/assets/stylesheets/framework/variables.scss1
-rw-r--r--app/views/projects/tree/_readme.html.haml2
-rw-r--r--changelogs/unreleased/project-readme-limited-width.yml4
5 files changed, 13 insertions, 2 deletions
diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss
index da03e4f5b5e..31220ab438e 100644
--- a/app/assets/stylesheets/framework/files.scss
+++ b/app/assets/stylesheets/framework/files.scss
@@ -12,6 +12,12 @@
&.readme-holder {
margin: $gl-padding 0;
+
+ &.limited-width-container .file-content {
+ max-width: $limited-layout-width-sm;
+ margin-left: auto;
+ margin-right: auto;
+ }
}
table {
diff --git a/app/assets/stylesheets/framework/layout.scss b/app/assets/stylesheets/framework/layout.scss
index 49bff23452d..4a9d41b4fda 100644
--- a/app/assets/stylesheets/framework/layout.scss
+++ b/app/assets/stylesheets/framework/layout.scss
@@ -53,7 +53,7 @@ body {
}
&.limit-container-width-sm {
- max-width: 790px;
+ max-width: $limited-layout-width-sm;
}
}
diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss
index 13c9c6c9fb3..476427c1593 100644
--- a/app/assets/stylesheets/framework/variables.scss
+++ b/app/assets/stylesheets/framework/variables.scss
@@ -161,6 +161,7 @@ $progress-color: #c0392b;
$header-height: 50px;
$fixed-layout-width: 1280px;
$limited-layout-width: 990px;
+$limited-layout-width-sm: 790px;
$gl-avatar-size: 40px;
$error-exclamation-point: $red-500;
$border-radius-default: 3px;
diff --git a/app/views/projects/tree/_readme.html.haml b/app/views/projects/tree/_readme.html.haml
index de57cd4ba00..f9147815427 100644
--- a/app/views/projects/tree/_readme.html.haml
+++ b/app/views/projects/tree/_readme.html.haml
@@ -1,5 +1,5 @@
- if readme.rich_viewer
- %article.file-holder.readme-holder
+ %article.file-holder.readme-holder{ class: ("limited-width-container" unless fluid_layout) }
.js-file-title.file-title
= blob_icon readme.mode, readme.name
= link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@ref, readme.path)) do
diff --git a/changelogs/unreleased/project-readme-limited-width.yml b/changelogs/unreleased/project-readme-limited-width.yml
new file mode 100644
index 00000000000..17d87a5691e
--- /dev/null
+++ b/changelogs/unreleased/project-readme-limited-width.yml
@@ -0,0 +1,4 @@
+---
+title: Limit the width of the projects README text
+merge_request:
+author: