Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated notification badge #934

Merged
merged 3 commits into from
Apr 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Updated
- Updated notification badge CSS, code and examples [#934](https://github.com/hmrc/assets-frontend/pull/934)
- Fixed a typo in open links in a new window or tab page [#935](https://github.com/hmrc/assets-frontend/pull/935)
- Fixed a typo in technical problem page [#933](https://github.com/hmrc/assets-frontend/pull/933)
- Added documentation for page title [#928](https://github.com/hmrc/assets-frontend/pull/928)
Expand Down
4 changes: 2 additions & 2 deletions assets/components/notification-badge/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Notification Badge
# Notification badge

{{ wip(142) }}

Expand Down Expand Up @@ -38,4 +38,4 @@ Notification badges are common on many sites and services. It has been tested as
- people understand what it is for
- it does not distract people from their task

More work is needed to make it accessible – [add your research on GitHub](https://github.com/hmrc/design-patterns/issues/142).
{{ research(142) }}
10 changes: 3 additions & 7 deletions assets/components/notification-badge/_notification_badge.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
.badge {
position: relative;
display: inline-block;
top: -10px;
left: -6px;
min-width: 19px;
padding: 3px 6px 2px 6px;
min-width: 10px;
padding: 5px 8px 1px 8px;
font-size: 14px;
font-weight: 600;
line-height: 1;
background: #B10E1E;
color: #FFF;
text-align: center;
white-space: nowrap;
border-radius: 10px;
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<a href="#">Messages<span class="badge" aria-label="Number of x">36</span></a>
<a href="#">Messages<span class="badge">36</span></a>