diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss index da03e4f5b5e4b6e835fa1f22b4d5673b969b447c..31220ab438ebfee3911769d59756906be65eac60 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 49bff23452df7a8da26195248a8c71db0f93c810..4a9d41b4fda1576fbb3ab1cdc073df2d548af97e 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 13c9c6c9fb3d01b4704b5797cce3aad0a262e9a7..476427c1593b39832ec790e5f28ae4896c129495 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 de57cd4ba0017f4e953098a6370bc33a795f6a54..f914781542754ba7972610363deab958e8d00b8e 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 0000000000000000000000000000000000000000..17d87a5691e8ebcb6854ca09b15fa46336098b57 --- /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: