@include font-size($font-size-base);
color: $accordion-button-color;
background-color: $accordion-button-bg;
- border: solid $accordion-border-color;
- border-width: $accordion-border-width $accordion-border-width 0;
+ border: $accordion-border-width solid $accordion-border-color;
@include border-radius(0);
overflow-anchor: none;
+ @include transition($accordion-transition);
+
+ &.collapsed {
+ border-bottom-width: 0;
+ }
&:not(.collapsed) {
color: $accordion-button-active-color;
&:focus {
z-index: 3;
+ border-color: $accordion-button-focus-border-color;
outline: 0;
- box-shadow: $btn-focus-box-shadow;
+ box-shadow: $accordion-button-focus-box-shadow;
}
}
}
.accordion-item {
- @include border-radius($accordion-border-radius);
+ &:first-of-type {
+ .accordion-button {
+ @include border-top-radius($accordion-border-radius);
+ }
+ }
&:last-of-type {
.accordion-button {
- border-bottom-width: $accordion-border-width;
-
// Only set a border-radius on the last item if the accordion is collapsed
&.collapsed {
+ border-bottom-width: $accordion-border-width;
@include border-bottom-radius($accordion-border-radius);
}
}
- .accordion-body {
- border-width: 0 $accordion-border-width $accordion-border-width;
+ .accordion-collapse {
+ border-bottom-width: $accordion-border-width;
@include border-bottom-radius($accordion-border-radius);
}
}
+}
- &:first-of-type {
- .accordion-button {
- @include border-top-radius($accordion-border-radius);
- }
- }
+.accordion-collapse {
+ border: solid $accordion-border-color;
+ border-width: 0 $accordion-border-width;
}
.accordion-body {
padding: $accordion-body-padding-y $accordion-body-padding-x;
- border: solid $accordion-border-color;
- border-width: $accordion-border-width $accordion-border-width 0;
}
@include border-radius(0);
}
- .accordion-body {
+ .accordion-collapse {
border-width: 0;
}
.accordion-item {
- border-right-width: 0;
- border-left-width: 0;
- @include border-radius(0);
-
&:first-of-type {
.accordion-button {
border-top-width: 0;
}
&:last-of-type {
- .accordion-button {
+ .accordion-button.collapsed {
border-bottom-width: 0;
@include border-bottom-radius(0);
}
-
- .accordion-body {
- border-width: 0;
- }
}
}
}
$accordion-button-padding-x: $accordion-padding-x !default;
$accordion-button-color: $accordion-color !default;
$accordion-button-bg: $accordion-bg !default;
+$accordion-transition: $btn-transition, border-radius .15s ease !default;
$accordion-button-active-bg: tint-color($component-active-bg, 90%) !default;
$accordion-button-active-color: $primary !default;
+$accordion-button-focus-border-color: $input-focus-border-color !default;
+$accordion-button-focus-box-shadow: $btn-focus-box-shadow !default;
+
$accordion-icon-width: 1.25rem !default;
$accordion-icon-color: $accordion-color !default;
$accordion-icon-active-color: $accordion-button-active-color !default;
Accordion Item #1
</button>
</h2>
- <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordionExample">
+ <div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-parent="#accordionExample">
<div class="accordion-body">
<strong>This is the first item's accordion body.</strong> It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the <code>.accordion-body</code>, though the transition does limit overflow.
</div>
Accordion Item #2
</button>
</h2>
- <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample">
+ <div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo" data-parent="#accordionExample">
<div class="accordion-body">
<strong>This is the second item's accordion body.</strong> It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the <code>.accordion-body</code>, though the transition does limit overflow.
</div>
Accordion Item #3
</button>
</h2>
- <div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
+ <div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="headingThree" data-parent="#accordionExample">
<div class="accordion-body">
<strong>This is the third item's accordion body.</strong> It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the <code>.accordion-body</code>, though the transition does limit overflow.
</div>
Accordion Item #1
</button>
</h2>
- <div id="flush-collapseOne" class="collapse" aria-labelledby="flush-headingOne" data-parent="#accordionFlushExample">
+ <div id="flush-collapseOne" class="accordion-collapse collapse" aria-labelledby="flush-headingOne" data-parent="#accordionFlushExample">
<div class="accordion-body">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.</div>
</div>
</div>
Accordion Item #2
</button>
</h2>
- <div id="flush-collapseTwo" class="collapse" aria-labelledby="flush-headingTwo" data-parent="#accordionFlushExample">
+ <div id="flush-collapseTwo" class="accordion-collapse collapse" aria-labelledby="flush-headingTwo" data-parent="#accordionFlushExample">
<div class="accordion-body">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.</div>
</div>
</div>
Accordion Item #3
</button>
</h2>
- <div id="flush-collapseThree" class="collapse" aria-labelledby="flush-headingThree" data-parent="#accordionFlushExample">
+ <div id="flush-collapseThree" class="accordion-collapse collapse" aria-labelledby="flush-headingThree" data-parent="#accordionFlushExample">
<div class="accordion-body">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.</div>
</div>
</div>