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

Update Alert banner message-body to match design system #9463

Merged
merged 2 commits into from
Jul 14, 2020
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 ui/app/styles/core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@import 'bulma/switch';

// Override Bulma details where appropriate
@import './core/alert-banner';
@import './core/generic';
@import './core/box';
@import './core/breadcrumb';
Expand Down
6 changes: 6 additions & 0 deletions ui/app/styles/core/alert-banner.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.alert-banner-message-body {
border: 0;
margin-top: $spacing-xxs;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like the border and margin-top here have the same values as the original message-body class. in that case, what do you think about extending message-body so these styles aren't duplicated? this way if we make any other styling changes to all messages (perhaps a new font or font weight, etc), they'll apply here too. i.e.:

.alert-banner-message-body {
@extend .message-body
color: $black;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's a great idea. I didn't know you could do that. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noelledaley ... um. 🤔 this doesn't seem to work because message-body color is overriding the black here. I would have to use !important after black to make it work, and that doesn't seem like an optimal solution.


color: $black;
}
2 changes: 1 addition & 1 deletion ui/lib/core/addon/templates/components/alert-banner.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{{/if}}
</div>
{{#if @message}}
<p class="message-body">
<p class="alert-banner-message-body">
{{@message}}
</p>
{{/if}}
Expand Down