From e97078806f59081be9586a019ab84dab812750c7 Mon Sep 17 00:00:00 2001 From: Jose Vargas Date: Tue, 9 Apr 2019 12:14:39 -0500 Subject: Create svg-w-100 utility class for svg containers The class makes a svg tag 100% width --- app/assets/stylesheets/framework/common.scss | 6 ++++++ app/assets/stylesheets/pages/stat_graph.scss | 8 -------- app/views/projects/graphs/show.html.haml | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss index db6c107210e..c3031c3375e 100644 --- a/app/assets/stylesheets/framework/common.scss +++ b/app/assets/stylesheets/framework/common.scss @@ -436,6 +436,12 @@ img.emoji { .h-3 { width: #{3 * $grid-size}; } +.svg-w-100 { + svg { + width: 100%; + } +} + /** COMMON SPACING CLASSES **/ .gl-pl-0 { padding-left: 0; } .gl-pl-1 { padding-left: #{0.5 * $grid-size}; } diff --git a/app/assets/stylesheets/pages/stat_graph.scss b/app/assets/stylesheets/pages/stat_graph.scss index 79186480605..31ccdacbc02 100644 --- a/app/assets/stylesheets/pages/stat_graph.scss +++ b/app/assets/stylesheets/pages/stat_graph.scss @@ -18,10 +18,6 @@ @include make-col-ready(); @include make-col(12); } - - svg { - width: 100%; - } } #contributors { @@ -31,10 +27,6 @@ margin: 0 0 10px; list-style: none; padding: 0; - - svg { - width: 100%; - } } .person { diff --git a/app/views/projects/graphs/show.html.haml b/app/views/projects/graphs/show.html.haml index f1b14d4c4d1..4b2417ff43b 100644 --- a/app/views/projects/graphs/show.html.haml +++ b/app/views/projects/graphs/show.html.haml @@ -22,6 +22,6 @@ = s_('ContributorsPage|Commits to %{branch_name}, excluding merge commits. Limited to 6,000 commits.') % { branch_name: @ref } %input#brush_change{ :type => "hidden" } .graphs.row - #contributors-master + #contributors-master.svg-w-100 #contributors.clearfix - %ol.contributors-list.row + %ol.contributors-list.svg-w-100.row -- cgit v1.2.1