summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-10-14 21:19:28 +0000
committerFatih Acet <acetfatih@gmail.com>2016-10-14 21:19:28 +0000
commit9a7ceafee693b48917df9d008d6ad62ef6e2b853 (patch)
tree059f7dcce3128225e907e78e38390abf18d7b33b
parent2334c7f520bbe852061f2aa78f5e57895120b4e5 (diff)
parent9ec3c32f98f9548b4aa756c8fba74159b12492a7 (diff)
downloadgitlab-ce-9a7ceafee693b48917df9d008d6ad62ef6e2b853.tar.gz
Merge branch '23147-file-viewer-header-has-hover-style' into 'master'
Improved specificity of toggleable file headers ## What does this MR do? Improves the specificity of the diff file title toggle styling. ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? Currently, any `.file-title` will have a pointer cursor and background colour change on hover. This should be only for diff files, except discussion diff files. ## Screenshots (if relevant) ![2016-10-14_13.57.12](/uploads/e8561bed378487b8d14d579ce31417d0/2016-10-14_13.57.12.gif)![2016-10-14_14.01.15](/uploads/e88858874377fa83aa5e632ec9e1a601/2016-10-14_14.01.15.gif)![2016-10-14_14.01.46](/uploads/8a773ee6bb29386f2dc022bb2ffaf474/2016-10-14_14.01.46.gif) ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if it does - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #23147 See merge request !6887
-rw-r--r--app/assets/stylesheets/framework/files.scss9
-rw-r--r--app/assets/stylesheets/pages/diff.scss13
-rw-r--r--app/assets/stylesheets/pages/notes.scss8
3 files changed, 21 insertions, 9 deletions
diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss
index 81520500594..76a3c083697 100644
--- a/app/assets/stylesheets/framework/files.scss
+++ b/app/assets/stylesheets/framework/files.scss
@@ -26,15 +26,6 @@
padding: 10px $gl-padding;
word-wrap: break-word;
border-radius: 3px 3px 0 0;
- cursor: pointer;
-
- &:hover {
- background-color: $dark-background-color;
- }
-
- .diff-toggle-caret {
- padding-right: 6px;
- }
&.file-title-clear {
padding-left: 0;
diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss
index b8ef76cc74e..84094b0cb1b 100644
--- a/app/assets/stylesheets/pages/diff.scss
+++ b/app/assets/stylesheets/pages/diff.scss
@@ -33,6 +33,19 @@
font-size: smaller;
}
}
+
+ .file-title {
+ cursor: pointer;
+
+ &:hover {
+ background-color: $dark-background-color;
+ }
+
+ .diff-toggle-caret {
+ padding-right: 6px;
+ }
+ }
+
.diff-content {
overflow: auto;
overflow-y: hidden;
diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss
index d399f84a2ff..efeea96373f 100644
--- a/app/assets/stylesheets/pages/notes.scss
+++ b/app/assets/stylesheets/pages/notes.scss
@@ -147,6 +147,14 @@ ul.notes {
// Diff code in discussion view
.discussion-body .diff-file {
+ .file-title {
+ cursor: default;
+
+ &:hover {
+ background-color: $gray-light;
+ }
+ }
+
.diff-header > span {
margin-right: 10px;
}