You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bootstrap 5 (5.1.3) would suggest color:#000 for .btn-primary/.btn-primary:hover by default when $primary: #12AEE2; as it violates "WCAG 2.1 text color contrast ratio of 4.5:1" if it is color: #fff.
Specifying $min-contrast-ratio: 2.55 (far from 4.5 in default) in #681 can work around at this moment.
Why
With Bootstrap 5.1's suggestion according to specifying $primary: #12AEE2 (introduced in 8bdc09e as part of #218 and unchanged to date), if we do not have this tweak, we will get:
[...] An alternative option would be be darkening the button background color. Possibly something like e.g. changing #12AEE2 to #0D7FA5 and #0F94C0 to #0A6A8A. (I find this a lot easier to read than if #fff is changed to #000 on .btn-primary, personally.)
Bootstrap 5 (5.1.3) would suggest
color:#000
for.btn-primary
/.btn-primary:hover
by default when$primary: #12AEE2;
as it violates "WCAG 2.1 text color contrast ratio of 4.5:1" if it iscolor: #fff
..btn-primary
).btn-primary:hover
)Workaround
Specifying
$min-contrast-ratio: 2.55
(far from4.5
in default) in #681 can work around at this moment.Why
With Bootstrap 5.1's suggestion according to specifying
$primary: #12AEE2
(introduced in 8bdc09e as part of #218 and unchanged to date), if we do not have this tweak, we will get:Below is Bootstrap 4.6's calculation (currently in production):
Suggestions
Resources
Original discussion
[...] An alternative option would be be darkening the button background color. Possibly something like e.g. changing
#12AEE2
to#0D7FA5
and#0F94C0
to#0A6A8A
. (I find this a lot easier to read than if#fff
is changed to#000
on.btn-primary
, personally.)Originally posted by @duckinator in #681 (comment)
The text was updated successfully, but these errors were encountered: