Commit 5dd91446 authored by Mark Florian's avatar Mark Florian

Merge branch '344390-cablett-migrate-nav-badge' into 'master'

Migrate nav badge to be pajamas compliant

See merge request gitlab-org/gitlab!77836
parents 91244b0f 8a0b2184
...@@ -357,7 +357,9 @@ ...@@ -357,7 +357,9 @@
} }
> li { > li {
.badge.badge-pill { // TODO: Remove this block once all sidebar badges use gl_badge_tag
// https://gitlab.com/gitlab-org/gitlab/-/issues/350061
.badge.badge-pill:not(.gl-badge) {
@include gl-rounded-lg; @include gl-rounded-lg;
@include gl-py-1; @include gl-py-1;
@include gl-px-3; @include gl-px-3;
...@@ -370,7 +372,9 @@ ...@@ -370,7 +372,9 @@
display: block; display: block;
} }
.badge.badge-pill { // TODO: Remove this block once all sidebar badges use gl_badge_tag
// https://gitlab.com/gitlab-org/gitlab/-/issues/350061
.badge.badge-pill:not(.gl-badge) {
@include gl-font-weight-normal; @include gl-font-weight-normal;
color: $blue-700; color: $blue-700;
} }
......
...@@ -314,6 +314,10 @@ h1 { ...@@ -314,6 +314,10 @@ h1 {
padding-left: 0.6em; padding-left: 0.6em;
border-radius: 10rem; border-radius: 10rem;
} }
.badge-info {
color: #fff;
background-color: #428fdc;
}
.bg-transparent { .bg-transparent {
background-color: transparent !important; background-color: transparent !important;
} }
...@@ -372,6 +376,24 @@ h1 { ...@@ -372,6 +376,24 @@ h1 {
padding-left: 0.5rem; padding-left: 0.5rem;
padding-right: 0.5rem; padding-right: 0.5rem;
} }
.gl-badge.sm {
padding-top: 0;
padding-bottom: 0;
}
.gl-badge.badge-info {
background-color: #064787;
color: #9dc7f1;
}
a.gl-badge.badge-info.active,
a.gl-badge.badge-info:active {
color: #e9f3fc;
background-color: #0b5cad;
}
a.gl-badge.badge-info:active {
box-shadow: inset 0 0 0 1px rgba(51, 51, 51, 0.8),
0 0 0 1px rgba(51, 51, 51, 0.4), 0 0 0 4px rgba(66, 143, 220, 0.48);
outline: none;
}
.gl-button .gl-badge { .gl-button .gl-badge {
top: 0; top: 0;
} }
...@@ -1367,7 +1389,7 @@ input { ...@@ -1367,7 +1389,7 @@ input {
border-radius: 4px; border-radius: 4px;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
} }
.sidebar-top-level-items > li .badge.badge-pill { .sidebar-top-level-items > li .badge.badge-pill:not(.gl-badge) {
border-radius: 0.5rem; border-radius: 0.5rem;
padding-top: 0.125rem; padding-top: 0.125rem;
padding-bottom: 0.125rem; padding-bottom: 0.125rem;
...@@ -1381,7 +1403,7 @@ input { ...@@ -1381,7 +1403,7 @@ input {
.sidebar-sub-level-items:not(.is-fly-out-only) { .sidebar-sub-level-items:not(.is-fly-out-only) {
display: block; display: block;
} }
.sidebar-top-level-items > li.active .badge.badge-pill { .sidebar-top-level-items > li.active .badge.badge-pill:not(.gl-badge) {
font-weight: 400; font-weight: 400;
color: #9dc7f1; color: #9dc7f1;
} }
......
...@@ -295,6 +295,10 @@ h1 { ...@@ -295,6 +295,10 @@ h1 {
padding-left: 0.6em; padding-left: 0.6em;
border-radius: 10rem; border-radius: 10rem;
} }
.badge-info {
color: #fff;
background-color: #1f75cb;
}
.bg-transparent { .bg-transparent {
background-color: transparent !important; background-color: transparent !important;
} }
...@@ -353,6 +357,24 @@ h1 { ...@@ -353,6 +357,24 @@ h1 {
padding-left: 0.5rem; padding-left: 0.5rem;
padding-right: 0.5rem; padding-right: 0.5rem;
} }
.gl-badge.sm {
padding-top: 0;
padding-bottom: 0;
}
.gl-badge.badge-info {
background-color: #cbe2f9;
color: #0b5cad;
}
a.gl-badge.badge-info.active,
a.gl-badge.badge-info:active {
color: #033464;
background-color: #9dc7f1;
}
a.gl-badge.badge-info:active {
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8),
0 0 0 1px rgba(255, 255, 255, 0.4), 0 0 0 4px rgba(31, 117, 203, 0.48);
outline: none;
}
.gl-button .gl-badge { .gl-button .gl-badge {
top: 0; top: 0;
} }
...@@ -1348,7 +1370,7 @@ input { ...@@ -1348,7 +1370,7 @@ input {
border-radius: 4px; border-radius: 4px;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
} }
.sidebar-top-level-items > li .badge.badge-pill { .sidebar-top-level-items > li .badge.badge-pill:not(.gl-badge) {
border-radius: 0.5rem; border-radius: 0.5rem;
padding-top: 0.125rem; padding-top: 0.125rem;
padding-bottom: 0.125rem; padding-bottom: 0.125rem;
...@@ -1362,7 +1384,7 @@ input { ...@@ -1362,7 +1384,7 @@ input {
.sidebar-sub-level-items:not(.is-fly-out-only) { .sidebar-sub-level-items:not(.is-fly-out-only) {
display: block; display: block;
} }
.sidebar-top-level-items > li.active .badge.badge-pill { .sidebar-top-level-items > li.active .badge.badge-pill:not(.gl-badge) {
font-weight: 400; font-weight: 400;
color: #0b5cad; color: #0b5cad;
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
%span.nav-item-name{ **sidebar_menu.title_html_options } %span.nav-item-name{ **sidebar_menu.title_html_options }
= sidebar_menu.title = sidebar_menu.title
- if sidebar_menu.has_pill? - if sidebar_menu.has_pill?
%span.badge.badge-pill.count{ **sidebar_menu.pill_html_options } = gl_badge_tag({ variant: :info, size: :sm }, { class: "count #{sidebar_menu.pill_html_options[:class]}" }) do
= number_with_delimiter(sidebar_menu.pill_count) = number_with_delimiter(sidebar_menu.pill_count)
= render partial: 'shared/nav/sidebar_submenu', locals: { sidebar_menu: sidebar_menu } = render partial: 'shared/nav/sidebar_submenu', locals: { sidebar_menu: sidebar_menu }
...@@ -314,6 +314,10 @@ h1 { ...@@ -314,6 +314,10 @@ h1 {
padding-left: 0.6em; padding-left: 0.6em;
border-radius: 10rem; border-radius: 10rem;
} }
.badge-info {
color: #fff;
background-color: #428fdc;
}
.bg-transparent { .bg-transparent {
background-color: transparent !important; background-color: transparent !important;
} }
...@@ -372,6 +376,24 @@ h1 { ...@@ -372,6 +376,24 @@ h1 {
padding-left: 0.5rem; padding-left: 0.5rem;
padding-right: 0.5rem; padding-right: 0.5rem;
} }
.gl-badge.sm {
padding-top: 0;
padding-bottom: 0;
}
.gl-badge.badge-info {
background-color: #064787;
color: #9dc7f1;
}
a.gl-badge.badge-info.active,
a.gl-badge.badge-info:active {
color: #e9f3fc;
background-color: #0b5cad;
}
a.gl-badge.badge-info:active {
box-shadow: inset 0 0 0 1px rgba(51, 51, 51, 0.8),
0 0 0 1px rgba(51, 51, 51, 0.4), 0 0 0 4px rgba(66, 143, 220, 0.48);
outline: none;
}
.gl-button .gl-badge { .gl-button .gl-badge {
top: 0; top: 0;
} }
...@@ -1367,7 +1389,7 @@ input { ...@@ -1367,7 +1389,7 @@ input {
border-radius: 4px; border-radius: 4px;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
} }
.sidebar-top-level-items > li .badge.badge-pill { .sidebar-top-level-items > li .badge.badge-pill:not(.gl-badge) {
border-radius: 0.5rem; border-radius: 0.5rem;
padding-top: 0.125rem; padding-top: 0.125rem;
padding-bottom: 0.125rem; padding-bottom: 0.125rem;
...@@ -1381,7 +1403,7 @@ input { ...@@ -1381,7 +1403,7 @@ input {
.sidebar-sub-level-items:not(.is-fly-out-only) { .sidebar-sub-level-items:not(.is-fly-out-only) {
display: block; display: block;
} }
.sidebar-top-level-items > li.active .badge.badge-pill { .sidebar-top-level-items > li.active .badge.badge-pill:not(.gl-badge) {
font-weight: 400; font-weight: 400;
color: #9dc7f1; color: #9dc7f1;
} }
......
...@@ -295,6 +295,10 @@ h1 { ...@@ -295,6 +295,10 @@ h1 {
padding-left: 0.6em; padding-left: 0.6em;
border-radius: 10rem; border-radius: 10rem;
} }
.badge-info {
color: #fff;
background-color: #1f75cb;
}
.bg-transparent { .bg-transparent {
background-color: transparent !important; background-color: transparent !important;
} }
...@@ -353,6 +357,24 @@ h1 { ...@@ -353,6 +357,24 @@ h1 {
padding-left: 0.5rem; padding-left: 0.5rem;
padding-right: 0.5rem; padding-right: 0.5rem;
} }
.gl-badge.sm {
padding-top: 0;
padding-bottom: 0;
}
.gl-badge.badge-info {
background-color: #cbe2f9;
color: #0b5cad;
}
a.gl-badge.badge-info.active,
a.gl-badge.badge-info:active {
color: #033464;
background-color: #9dc7f1;
}
a.gl-badge.badge-info:active {
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8),
0 0 0 1px rgba(255, 255, 255, 0.4), 0 0 0 4px rgba(31, 117, 203, 0.48);
outline: none;
}
.gl-button .gl-badge { .gl-button .gl-badge {
top: 0; top: 0;
} }
...@@ -1348,7 +1370,7 @@ input { ...@@ -1348,7 +1370,7 @@ input {
border-radius: 4px; border-radius: 4px;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
} }
.sidebar-top-level-items > li .badge.badge-pill { .sidebar-top-level-items > li .badge.badge-pill:not(.gl-badge) {
border-radius: 0.5rem; border-radius: 0.5rem;
padding-top: 0.125rem; padding-top: 0.125rem;
padding-bottom: 0.125rem; padding-bottom: 0.125rem;
...@@ -1362,7 +1384,7 @@ input { ...@@ -1362,7 +1384,7 @@ input {
.sidebar-sub-level-items:not(.is-fly-out-only) { .sidebar-sub-level-items:not(.is-fly-out-only) {
display: block; display: block;
} }
.sidebar-top-level-items > li.active .badge.badge-pill { .sidebar-top-level-items > li.active .badge.badge-pill:not(.gl-badge) {
font-weight: 400; font-weight: 400;
color: #0b5cad; color: #0b5cad;
} }
......
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