Commit 8a0acaf8 authored by Annabel Gray's avatar Annabel Gray Committed by Clement Ho

Fix active tab styling

parent afac3f02
...@@ -148,8 +148,14 @@ table { ...@@ -148,8 +148,14 @@ table {
} }
} }
.nav-tabs .nav-link { .nav-tabs {
.nav-link {
border: 0; border: 0;
}
.nav-item {
margin-bottom: 0;
}
} }
pre code { pre code {
......
...@@ -169,13 +169,16 @@ ...@@ -169,13 +169,16 @@
color: $color-800; color: $color-800;
} }
.nav-links li a.active { .nav-links li {
&.active a,
a.active {
border-bottom: 2px solid $color-500; border-bottom: 2px solid $color-500;
.badge.badge-pill { .badge.badge-pill {
font-weight: $gl-font-weight-bold; font-weight: $gl-font-weight-bold;
} }
} }
}
.branch-header-title { .branch-header-title {
color: $color-700; color: $color-700;
......
...@@ -31,8 +31,10 @@ ...@@ -31,8 +31,10 @@
color: $black; color: $black;
} }
} }
}
&.active { &.active a,
a.active {
color: $black; color: $black;
font-weight: $gl-font-weight-bold; font-weight: $gl-font-weight-bold;
...@@ -41,7 +43,6 @@ ...@@ -41,7 +43,6 @@
} }
} }
} }
}
} }
.top-area { .top-area {
......
...@@ -5,25 +5,25 @@ ...@@ -5,25 +5,25 @@
.fade-right= icon('angle-right') .fade-right= icon('angle-right')
%ul.nav-links.scrolling-tabs.js-milestone-tabs.nav.nav-tabs %ul.nav-links.scrolling-tabs.js-milestone-tabs.nav.nav-tabs
- if issues_accessible - if issues_accessible
%li.active %li.nav-item
= link_to '#tab-issues', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do = link_to '#tab-issues', class: 'nav-link active', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do
Issues Issues
%span.badge.badge-pill= milestone.issues_visible_to_user(current_user).size %span.badge.badge-pill= milestone.issues_visible_to_user(current_user).size
%li %li.nav-item
= link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do = link_to '#tab-merge-requests', class: 'nav-link', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do
Merge Requests Merge Requests
%span.badge.badge-pill= milestone.merge_requests.size %span.badge.badge-pill= milestone.merge_requests.size
- else - else
%li.active %li.nav-item
= link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do = link_to '#tab-merge-requests', class: 'nav-link active', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do
Merge Requests Merge Requests
%span.badge.badge-pill= milestone.merge_requests.size %span.badge.badge-pill= milestone.merge_requests.size
%li %li.nav-item
= link_to '#tab-participants', 'data-toggle' => 'tab', 'data-endpoint': milestone_participants_tab_path(milestone) do = link_to '#tab-participants', class: 'nav-link', 'data-toggle' => 'tab', 'data-endpoint': milestone_participants_tab_path(milestone) do
Participants Participants
%span.badge.badge-pill= milestone.participants.count %span.badge.badge-pill= milestone.participants.count
%li %li.nav-item
= link_to '#tab-labels', 'data-toggle' => 'tab', 'data-endpoint': milestone_labels_tab_path(milestone) do = link_to '#tab-labels', class: 'nav-link', 'data-toggle' => 'tab', 'data-endpoint': milestone_labels_tab_path(milestone) do
Labels Labels
%span.badge.badge-pill= milestone.labels.count %span.badge.badge-pill= milestone.labels.count
......
...@@ -17,8 +17,8 @@ feature 'Project milestone' do ...@@ -17,8 +17,8 @@ feature 'Project milestone' do
it 'shows issues tab' do it 'shows issues tab' do
within('#content-body') do within('#content-body') do
expect(page).to have_link 'Issues', href: '#tab-issues' expect(page).to have_link 'Issues', href: '#tab-issues'
expect(page).to have_selector '.nav-links li.active', count: 1 expect(page).to have_selector '.nav-links li a.active', count: 1
expect(find('.nav-links li.active')).to have_content 'Issues' expect(find('.nav-links li a.active')).to have_content 'Issues'
end end
end end
...@@ -44,8 +44,8 @@ feature 'Project milestone' do ...@@ -44,8 +44,8 @@ feature 'Project milestone' do
it 'hides issues tab' do it 'hides issues tab' do
within('#content-body') do within('#content-body') do
expect(page).not_to have_link 'Issues', href: '#tab-issues' expect(page).not_to have_link 'Issues', href: '#tab-issues'
expect(page).to have_selector '.nav-links li.active', count: 1 expect(page).to have_selector '.nav-links li a.active', count: 1
expect(find('.nav-links li.active')).to have_content 'Merge Requests' expect(find('.nav-links li a.active')).to have_content 'Merge Requests'
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment