diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-01-15 00:42:55 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-01-15 00:42:55 +0000 |
commit | 18b7acc399e05c2a1aeb42ee5f738778b0289dcf (patch) | |
tree | ec4aa7ce5db35798c8e6e94ab2d2ae5747bcfab3 | |
parent | ff7f4a134e4d62a22a38409b7f71c582d86f53d8 (diff) | |
parent | 1e45ba7f169781d7c1d79fdfcee14760558db253 (diff) | |
download | gitlab-ce-18b7acc399e05c2a1aeb42ee5f738778b0289dcf.tar.gz |
Merge branch 'fix-anchor-bug' into 'master'
Fix anchor bug
Fixes #1886
See merge request !1395
-rw-r--r-- | app/assets/stylesheets/generic/timeline.scss | 11 | ||||
-rw-r--r-- | app/assets/stylesheets/generic/typography.scss | 15 | ||||
-rw-r--r-- | app/assets/stylesheets/main/layout.scss | 1 | ||||
-rw-r--r-- | app/assets/stylesheets/main/mixins.scss | 6 | ||||
-rw-r--r-- | app/assets/stylesheets/sections/header.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/sections/notes.scss | 1 | ||||
-rw-r--r-- | app/views/layouts/_head_panel.html.haml | 2 | ||||
-rw-r--r-- | features/steps/shared/issuable.rb | 2 |
8 files changed, 31 insertions, 9 deletions
diff --git a/app/assets/stylesheets/generic/timeline.scss b/app/assets/stylesheets/generic/timeline.scss index 82ee41b71bd..cdd044290da 100644 --- a/app/assets/stylesheets/generic/timeline.scss +++ b/app/assets/stylesheets/generic/timeline.scss @@ -20,6 +20,17 @@ margin-bottom: 10px; clear: both; + /* Hack for anchors and fixed navbar */ + &[id] { + &:before { + content: ''; + display: block; + position: relative; + width: 0; + height: 3em; + margin-top: -3em; + } + } &:target { .timeline-entry-inner .timeline-content { diff --git a/app/assets/stylesheets/generic/typography.scss b/app/assets/stylesheets/generic/typography.scss index 385a627b4be..3f63a0b92b1 100644 --- a/app/assets/stylesheets/generic/typography.scss +++ b/app/assets/stylesheets/generic/typography.scss @@ -98,8 +98,7 @@ a:focus { $size: 16px; position: absolute; right: 100%; - top: 50%; - margin-top: -$size/2; + bottom: 7px; margin-right: 0px; padding-right: 20px; display: inline-block; @@ -109,6 +108,18 @@ a:focus { background-size: contain; background-repeat: no-repeat; } + + /* Hack for anchors and fixed navbar */ + &[id] { + &:before { + content: ''; + display: block; + position: relative; + width: 0; + height: 3em; + margin-top: -3em; + } + } } ul { diff --git a/app/assets/stylesheets/main/layout.scss b/app/assets/stylesheets/main/layout.scss index 71522443f10..e44bccb0183 100644 --- a/app/assets/stylesheets/main/layout.scss +++ b/app/assets/stylesheets/main/layout.scss @@ -12,4 +12,3 @@ html { .container .content { margin: 0 0; } - diff --git a/app/assets/stylesheets/main/mixins.scss b/app/assets/stylesheets/main/mixins.scss index 5f83913b73b..c86f9be52d0 100644 --- a/app/assets/stylesheets/main/mixins.scss +++ b/app/assets/stylesheets/main/mixins.scss @@ -65,8 +65,10 @@ max-width: 100%; } - *:first-child { - margin-top: 0; + h1, h2, h3 { + &:first-child { + margin-top: 0; + } } code { padding: 0 4px; } diff --git a/app/assets/stylesheets/sections/header.scss b/app/assets/stylesheets/sections/header.scss index 32b0b10c649..a5098b6da5b 100644 --- a/app/assets/stylesheets/sections/header.scss +++ b/app/assets/stylesheets/sections/header.scss @@ -8,8 +8,6 @@ header { margin-bottom: 0; min-height: 40px; border: none; - position: fixed; - top: 0; width: 100%; .navbar-inner { diff --git a/app/assets/stylesheets/sections/notes.scss b/app/assets/stylesheets/sections/notes.scss index 1550e30fe53..74945717a02 100644 --- a/app/assets/stylesheets/sections/notes.scss +++ b/app/assets/stylesheets/sections/notes.scss @@ -57,6 +57,7 @@ ul.notes { .note { display: block; position:relative; + .attachment { font-size: 14px; } diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml index e98b8ec631d..bdf27562c26 100644 --- a/app/views/layouts/_head_panel.html.haml +++ b/app/views/layouts/_head_panel.html.haml @@ -1,4 +1,4 @@ -%header.navbar.navbar-static-top.navbar-gitlab +%header.navbar.navbar-fixed-top.navbar-gitlab .navbar-inner .container %div.app_logo diff --git a/features/steps/shared/issuable.rb b/features/steps/shared/issuable.rb index 41db2612f26..66206cac430 100644 --- a/features/steps/shared/issuable.rb +++ b/features/steps/shared/issuable.rb @@ -2,7 +2,7 @@ module SharedIssuable include Spinach::DSL def edit_issuable - find(:css, '.issuable-edit').click + find(:css, '.issuable-edit').trigger('click') end step 'I click link "Edit" for the merge request' do |