Skip to content

Commit

Permalink
Fix style of notification
Browse files Browse the repository at this point in the history
* normal line-height
* no gray background on hover
* underline on hover to detect that it is clickable
* pull primary buttons to right
* white color for primary button instead of grey (looked disabled)
* for nextcloud/server#735
  • Loading branch information
MorrisJobke authored and schiessle committed Aug 10, 2016
1 parent 4d9a66a commit 1e4f520
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions css/styles.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.notification {
display: block;
padding: 7px 15px 50px 15px;
line-height: normal;
}
.notification:not(:last-child) {
border-bottom: 1px solid rgb(238, 238, 238);
Expand Down Expand Up @@ -49,10 +50,6 @@
opacity: 0.3;
}

.notification:hover {
background-color: #f8f8f8;
}

.notification-delete:hover {
opacity: 0.8 !important;
cursor: pointer;
Expand Down Expand Up @@ -95,6 +92,10 @@
padding: 0;
}

.notification .notification-actions .action-button.primary{
color: #fff;
}

.notification .notification-actions:first-child {
margin-left: auto;
}
Expand All @@ -103,6 +104,9 @@
display: inline-block;
margin-right: 10px;
}
.notification .notification-subject:hover {
background-color: #f8f8f8;
}

.notification .notification-message {
line-height: 20px;
Expand Down
2 changes: 1 addition & 1 deletion js/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
_.each(actionsData, function(actionData) {
// FIXME: use handlebars template
actions.append(
'<button class="action-button' + (actionData.primary ? ' primary': '') + '" data-type="' + escapeHTML(actionData.type) + '" ' +
'<button class="action-button' + (actionData.primary ? ' primary pull-right': '') + '" data-type="' + escapeHTML(actionData.type) + '" ' +
'data-href="'+escapeHTML(actionData.link)+'">'+escapeHTML(actionData.label)+'</button>'
);
// TODO create event handler on click for given action type
Expand Down

0 comments on commit 1e4f520

Please sign in to comment.