From e9a336ae73393acaae88ef5d5c9c42fd6e382c54 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Tue, 22 May 2018 11:11:02 -0700 Subject: [PATCH] Fix panel/card styling --- app/assets/stylesheets/framework/panels.scss | 2 ++ app/assets/stylesheets/framework/variables.scss | 5 +++++ app/views/admin/users/_user.html.haml | 4 ++-- app/views/admin/users/show.html.haml | 4 ++-- app/views/groups/edit.html.haml | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/framework/panels.scss b/app/assets/stylesheets/framework/panels.scss index 5ca4d944d73..89f63a643f9 100644 --- a/app/assets/stylesheets/framework/panels.scss +++ b/app/assets/stylesheets/framework/panels.scss @@ -11,6 +11,7 @@ .card-header { padding: $gl-vert-padding $gl-padding; line-height: 36px; + color: $white-light; .controls { margin-top: -2px; @@ -47,6 +48,7 @@ .card-body { padding: $gl-padding; + background-color: $white-light; .form-actions { margin: -$gl-padding; diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index c149b8de5be..bea2268d82c 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -306,6 +306,11 @@ $gl-warning: $orange-500; $gl-danger: $red-500; $gl-btn-active-background: rgba(0, 0, 0, 0.16); $gl-btn-active-gradient: inset 0 2px 3px $gl-btn-active-background; +// Bootstrap override states +$success: $gl-success; +$info: $gl-info; +$warning: $gl-warning; +$danger: $gl-danger; /* * Commit Diff Colors diff --git a/app/views/admin/users/_user.html.haml b/app/views/admin/users/_user.html.haml index b2163ee85fa..5e176b61d68 100644 --- a/app/views/admin/users/_user.html.haml +++ b/app/views/admin/users/_user.html.haml @@ -38,7 +38,7 @@ %li.divider - if user.can_be_removed? %li - %button.delete-user-button.btn.text-danger{ data: { toggle: 'modal', + %button.delete-user-button.btn.btn-danger{ data: { toggle: 'modal', target: '#delete-user-modal', delete_user_url: admin_user_path(user), block_user_url: block_admin_user_path(user), @@ -47,7 +47,7 @@ = s_('AdminUsers|Delete user') %li - %button.delete-user-button.btn.text-danger{ data: { toggle: 'modal', + %button.delete-user-button.btn.btn-danger{ data: { toggle: 'modal', target: '#delete-user-modal', delete_user_url: admin_user_path(user, hard_delete: true), block_user_url: block_admin_user_path(user), diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 3aec23ed7eb..a74fcea65d8 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -178,7 +178,7 @@ %p Deleting a user has the following effects: = render 'users/deletion_guidance', user: @user %br - %button.delete-user-button.btn.text-danger{ data: { toggle: 'modal', + %button.delete-user-button.btn.btn-danger{ data: { toggle: 'modal', target: '#delete-user-modal', delete_user_url: admin_user_path(@user), block_user_url: block_admin_user_path(@user), @@ -210,7 +210,7 @@ the user, and projects in them, will also be removed. Commits to other projects are unaffected. %br - %button.delete-user-button.btn.text-danger{ data: { toggle: 'modal', + %button.delete-user-button.btn.btn-danger{ data: { toggle: 'modal', target: '#delete-user-modal', delete_user_url: admin_user_path(@user, hard_delete: true), block_user_url: block_admin_user_path(@user), diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index 5b12082b80b..f2f5f0377af 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -64,7 +64,7 @@ .card-header Transfer group .card-body = form_for @group, url: transfer_group_path(@group), method: :put do |f| - .form-group.row + .form-group = dropdown_tag('Select parent group', options: { toggle_class: 'js-groups-dropdown', title: 'Parent Group', filter: true, dropdown_class: 'dropdown-open-top dropdown-group-transfer', placeholder: "Search groups", data: { data: parent_group_options(@group) } }) = hidden_field_tag 'new_parent_group_id'