From 9d129a43d6c24d9e60cc8fc7cfbddaaa4c586fdf Mon Sep 17 00:00:00 2001 From: Johann-S Date: Mon, 24 Oct 2016 10:57:32 +0200 Subject: [PATCH] Use a single class name for opened/expanded/shown state of widgets --- docs/components/alerts.md | 4 ++-- docs/components/collapse.md | 8 +++---- docs/components/dropdowns.md | 8 +++---- js/src/alert.js | 8 +++---- js/src/collapse.js | 16 +++++++------- js/src/dropdown.js | 12 +++++------ js/src/modal.js | 10 ++++----- js/src/popover.js | 6 +++--- js/src/tooltip.js | 28 ++++++++++++------------ js/tests/unit/alert.js | 6 +++--- js/tests/unit/collapse.js | 32 ++++++++++++++-------------- js/tests/unit/dropdown.js | 34 ++++++++++++++--------------- js/tests/unit/popover.js | 2 +- js/tests/unit/tooltip.js | 40 +++++++++++++++++------------------ js/tests/visual/alert.html | 4 ++-- js/tests/visual/collapse.html | 2 +- js/tests/visual/modal.html | 2 +- scss/_dropdown.scss | 2 +- scss/_tooltip.scss | 2 +- 19 files changed, 113 insertions(+), 113 deletions(-) diff --git a/docs/components/alerts.md b/docs/components/alerts.md index 7ab6df8f4af3..b1ac0d84526d 100644 --- a/docs/components/alerts.md +++ b/docs/components/alerts.md @@ -73,12 +73,12 @@ Using the alert JavaScript plugin, it's possible to dismiss any alert inline. He - Be sure you've loaded the alert plugin, or the compiled Bootstrap JavaScript. - Add a dismiss button and the `.alert-dismissible` class, which adds extra padding to the right of the alert and positions the `.close` button. - On the dismiss button, add the `data-dismiss="alert"` attribute, which triggers the JavaScript functionality. Be sure to use the ` diff --git a/docs/components/collapse.md b/docs/components/collapse.md index e98fae276919..0ece9e453dd1 100644 --- a/docs/components/collapse.md +++ b/docs/components/collapse.md @@ -18,7 +18,7 @@ Click the buttons below to show and hide another element via class changes: - `.collapse` hides content - `.collapsing` is applied during transitions -- `.collapse.in` shows content +- `.collapse.active` shows content You can use a link with the `href` attribute, or a button with the `data-target` attribute. In both cases, the `data-toggle="collapse"` is required. @@ -53,7 +53,7 @@ Extend the default collapse behavior to create an accordion. -
+
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
@@ -101,14 +101,14 @@ Additionally, if your control element is targeting a single collapsible element The collapse plugin utilizes a few classes to handle the heavy lifting: - `.collapse` hides the content -- `.collapse.in` shows the content +- `.collapse.active` shows the content - `.collapsing` is added when the transition starts, and removed when it finishes These classes can be found in `_animation.scss`. ### Via data attributes -Just add `data-toggle="collapse"` and a `data-target` to the element to automatically assign control of a collapsible element. The `data-target` attribute accepts a CSS selector to apply the collapse to. Be sure to add the class `collapse` to the collapsible element. If you'd like it to default open, add the additional class `in`. +Just add `data-toggle="collapse"` and a `data-target` to the element to automatically assign control of a collapsible element. The `data-target` attribute accepts a CSS selector to apply the collapse to. Be sure to add the class `collapse` to the collapsible element. If you'd like it to default open, add the additional class `active`. To add accordion-like group management to a collapsible control, add the data attribute `data-parent="#selector"`. Refer to the demo to see this in action. diff --git a/docs/components/dropdowns.md b/docs/components/dropdowns.md index 68c388f21ff8..621b666f1511 100644 --- a/docs/components/dropdowns.md +++ b/docs/components/dropdowns.md @@ -21,7 +21,7 @@ Wrap the dropdown's toggle (your button or link) and the dropdown menu within `. Any single `.btn` can be turned into a dropdown toggle with some markup changes. Here's how you can put them to work with either ` @@ -36,7 +36,7 @@ Any single `.btn` can be turned into a dropdown toggle with some markup changes. And with `` elements: {% example html %} -