Flips the contrast on badges to make them less intense and comply with
color contrast requirements. In keeping with the less intense alert
styles, the badges have more subtle background colors. I have also
adjusted the spacing and font weight to make the characters larger
without greatly increasing the overall size of the badge.
All of these styles pass WCAG AAA contrast checks. In anticipation of
Bootstrap 5, I have included the new .text-bg-* classes alongside the
current ones.
The access key modal (Control-H) is a good place to observe the overall
effect.
Signed-off-by: Stephanie Leary <stephanie.leary@equinoxOLI.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
background-color: #f9dede;
color: #212121;
}
+
+/* Less intense, WCAG AAA-compliant badges */
+.badge {
+ font-weight: 400;
+ font-size: .9em;
+ line-height: .9em;
+ padding-top: .15em;
+}
+
+.badge-primary,
+.badge.text-bg-primary {
+ background: #cfe2ff;
+ color: #062C65;
+}
+
+.badge-secondary,
+.badge.text-bg-secondary {
+ background: #dee2e6;
+ color: #212529;
+}
+
+.badge-success,
+.badge.text-bg-success {
+ background: #dff0d8;
+ color: #003B35;
+}
+
+.badge-danger,
+.badge.text-bg-danger {
+ background: #f8d7da;
+ color: #58151c;
+}
+
+.badge-warning,
+.badge.text-bg-warning {
+ background: #ffe69c;
+ color: #723809;
+}
+
+.badge-info,
+.badge.text-bg-info {
+ background: #cff4fc;
+ color: #032830;
+}
+
+.badge-light,
+.badge.text-bg-light {
+ background: #e9ecef;
+ color: #212529;
+}
+
+.badge-dark,
+badge.text-bg-dark {
+ color: #000;
+ background: #adb5bd;
+}
\ No newline at end of file