Commit 62db7a82 by Brian Talbot Committed by cahrens

converting instructor dashboard message UI to use .is-hidden vs.is-shown stateful CSS classes

parent 8627fdef
...@@ -51,10 +51,6 @@ ...@@ -51,10 +51,6 @@
.copy { .copy {
font-weight: 600; font-weight: 600;
} }
&.is-shown {
display: block;
}
} }
// TYPE: warning // TYPE: warning
...@@ -63,10 +59,6 @@ ...@@ -63,10 +59,6 @@
background: tint($warning-color,95%); background: tint($warning-color,95%);
display: none; display: none;
color: $warning-color; color: $warning-color;
&.is-shown {
display: block;
}
} }
// TYPE: confirm // TYPE: confirm
...@@ -75,10 +67,6 @@ ...@@ -75,10 +67,6 @@
background: tint($confirm-color,95%); background: tint($confirm-color,95%);
display: none; display: none;
color: $confirm-color; color: $confirm-color;
&.is-shown {
display: block;
}
} }
// TYPE: confirm // TYPE: confirm
...@@ -89,10 +77,6 @@ ...@@ -89,10 +77,6 @@
.copy { .copy {
color: $error-color; color: $error-color;
} }
&.is-shown {
display: block;
}
} }
// inline copy // inline copy
...@@ -224,12 +208,13 @@ section.instructor-dashboard-content-2 { ...@@ -224,12 +208,13 @@ section.instructor-dashboard-content-2 {
// messages // messages
.message { .message {
margin-bottom: $baseline; margin-bottom: $baseline;
display: none; display: block;
border-radius: 1px; border-radius: 1px;
padding: ($baseline*0.75) $baseline; padding: ($baseline*0.75) $baseline;
&.is-shown { // CASE: is hidden
display: block; &.is-hidden {
display: none;
} }
} }
......
<div class="message message-<%= type %> is-shown"> <div class="message message-<%= type %>">
<h3 class="message-title"> <h3 class="message-title">
<%- title %> <%- title %>
</h3> </h3>
......
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
</div> </div>
<!-- message - error - bad configuration --> <!-- message - error - bad configuration -->
<div class="message message-error is-shown"> <div class="message message-error">
<h3 class="message-title">There's currently an error with your cohorts configuration within this course.</h3> <h3 class="message-title">There's currently an error with your cohorts configuration within this course.</h3>
<div class="message-copy"> <div class="message-copy">
...@@ -352,11 +352,11 @@ ...@@ -352,11 +352,11 @@
</div> </div>
<!-- create/edit cohort group messages --> <!-- create/edit cohort group messages -->
<div class="message message-confirmation is-shown"> <div class="message message-confirmation">
<h3 class="message-title">New Cohort Name has been created. You can manually add students to this group below.</h3> <h3 class="message-title">New Cohort Name has been created. You can manually add students to this group below.</h3>
</div> </div>
<div class="message message-error is-shown"> <div class="message message-error">
<h3 class="message-title">Special characters are not allowed in cohort group names</h3> <h3 class="message-title">Special characters are not allowed in cohort group names</h3>
</div> </div>
...@@ -406,7 +406,7 @@ ...@@ -406,7 +406,7 @@
</div> </div>
<!-- individual group - form message - confirmation --> <!-- individual group - form message - confirmation -->
<div class="message message-confirmation is-shown"> <div class="message message-confirmation">
<h3 class="message-title">2,546 students have been added to this cohort group</h3> <h3 class="message-title">2,546 students have been added to this cohort group</h3>
<div class="message-copy"> <div class="message-copy">
...@@ -419,7 +419,7 @@ ...@@ -419,7 +419,7 @@
</div> </div>
<!-- individual group - form message - error (collapsed) --> <!-- individual group - form message - error (collapsed) -->
<div class="message message-error is-shown"> <div class="message message-error">
<h3 class="message-title">There were 25 errors when trying to add students:</h3> <h3 class="message-title">There were 25 errors when trying to add students:</h3>
<div class="message-copy"> <div class="message-copy">
......
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