Skip to content

Commit

Permalink
Align warning icon outside main text flow
Browse files Browse the repository at this point in the history
Some other minor adjustments to CSS for legibility and BEM conformance
also included in this changeset.
  • Loading branch information
chigby committed Sep 18, 2018
1 parent 2d953cd commit f540dba
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
18 changes: 13 additions & 5 deletions client/common/sass/directory/_instance-alert.sass
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ $color: #9292A5

.instance-alert
padding: $alert-padding-y $alert-padding-x
padding-left: $icon-width + $icon-gutter + $alert-padding-x
border-radius: 4px

.instance-alert-moderate
color: #BAA400
.instance-alert
+media-breakpoint-down(extra-small)
padding-left: ($icon-width/2) + $icon-gutter

.instance-alert--moderate
color: darken(#BAA400, 10%)
a
color: #BAA400
color: darken(#BAA400, 10%)
font-weight: bold

.instance-alert-severe
.instance-alert--severe
color: $red
a
color: $red
Expand All @@ -28,6 +31,11 @@ $color: #9292A5
width: $icon-width
height: auto

.instance-alert__icon
+media-breakpoint-down(extra-small)
margin-left: - ($icon-width/2) - $icon-gutter
width: $icon-width / 2

.instance-alert__title
color: darken($color, 30%)
font-size: inherit
Expand Down
2 changes: 1 addition & 1 deletion client/common/sass/directory/_instance-instructions.sass
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
fill: $red2

&-text--warning, &-url--warning
color: #BAA400
color: darken(#BAA400, 10%)
&--warning
+button-small
border: 1px solid #BAA400
Expand Down
2 changes: 1 addition & 1 deletion directory/templates/directory/_instance_instructions.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1 class="instance-instructions__title">{% trans "Planning to submit informatio
</p>

{% if show_warnings %}
<div class="instance-alert instance-alert-{{ warning_level }}">
<div class="instance-alert instance-alert--{{ warning_level }}">
{% if warning_level == "moderate" %}
{% include "common/_svg.html" with class="instance-alert__icon" svg="images/instance-status/Warning.svg" img="images/instance-status/Warning.png" alt="Moderate Warning Icon" %}
{% elif warning_level == 'severe' %}
Expand Down

0 comments on commit f540dba

Please sign in to comment.