diff --git a/docs/_includes/nav-components.html b/docs/_includes/nav-components.html index 8c7728bc8f..4f49d68b26 100644 --- a/docs/_includes/nav-components.html +++ b/docs/_includes/nav-components.html @@ -84,6 +84,7 @@
  • Default alert
  • Block alerts
  • Contextual alternatives
  • +
  • Links in alerts
  • diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 4542376d8b..04b72bd431 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -4410,8 +4410,7 @@ button.close { border-top-color: #f8e5be; } -.alert > a, -.alert > p > a { +.alert .alert-link { font-weight: 500; color: #a47e3c; } @@ -4433,8 +4432,7 @@ button.close { border-top-color: #c9e2b3; } -.alert-success > a, -.alert-success > p > a { +.alert-success .alert-link { color: #356635; } @@ -4448,8 +4446,7 @@ button.close { border-top-color: #e6c1c7; } -.alert-danger > a, -.alert-danger > p > a { +.alert-danger .alert-link { color: #953b39; } @@ -4463,8 +4460,7 @@ button.close { border-top-color: #a6e1ec; } -.alert-info > a, -.alert-info > p > a { +.alert-info .alert-link { color: #2d6987; } diff --git a/docs/components.html b/docs/components.html index ea87a7e22d..20fdd70ddc 100644 --- a/docs/components.html +++ b/docs/components.html @@ -1905,6 +1905,34 @@ body { padding-bottom: 70px; }
    ...
    ...
    ...
    +{% endhighlight %} + + +

    Use the .alert-link utility class to quickly provide matching colored links within any alert.

    +
    +
    + + Oh snap! Change a few things up and try submitting again. +
    +
    + + Well done! You successfully read this important alert message. +
    +
    + + Heads up! This alert needs your attention, but it's not super important. +
    +
    +{% highlight html %} +
    + ... +
    +
    + ... +
    +
    + ... +
    {% endhighlight %} diff --git a/docs/javascript.html b/docs/javascript.html index 25ea6a9532..160c897efe 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -1053,7 +1053,7 @@ $('#example').tooltip(options)

    Oh snap! You got an error!

    Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

    - Take this action Or do this + Take this action Or do this

    diff --git a/less/alerts.less b/less/alerts.less index bb78462493..24b7911437 100644 --- a/less/alerts.less +++ b/less/alerts.less @@ -24,9 +24,8 @@ hr { border-top-color: darken(@alert-border, 5%); } - // Inherit color for immediate links and bolden them some - > a, - > p > a { + // Provide class for links that match alerts + .alert-link { font-weight: 500; color: darken(@alert-text, 10%); } @@ -50,8 +49,7 @@ hr { border-top-color: darken(@alert-success-border, 5%); } - > a, - > p > a { + .alert-link { color: darken(@alert-success-text, 10%); } } @@ -62,8 +60,7 @@ hr { border-top-color: darken(@alert-danger-border, 5%); } - > a, - > p > a { + .alert-link { color: darken(@alert-danger-text, 10%); } } @@ -74,8 +71,7 @@ hr { border-top-color: darken(@alert-info-border, 5%); } - > a, - > p > a { + .alert-link { color: darken(@alert-info-text, 10%); } }