diff options
| author | Patrick H. Lauke <[email protected]> | 2021-05-04 12:46:06 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-04 12:46:06 +0100 |
| commit | 8865a8ab1c7157ab81bf49afa62b75f36daee46d (patch) | |
| tree | 97ef78f2ea8e07aab50014176d061fe3c1d49134 /scss/_accordion.scss | |
| parent | 018ee6a3b50b958ddb49657086cd9168abf5a485 (diff) | |
| parent | 7ea6578773cb1b7f5cfb8fb41321b3fa10349daf (diff) | |
| download | bootstrap-jo-docs-thanks-page.tar.xz bootstrap-jo-docs-thanks-page.zip | |
Merge branch 'main' into jo-docs-thanks-pagejo-docs-thanks-page
Diffstat (limited to 'scss/_accordion.scss')
| -rw-r--r-- | scss/_accordion.scss | 57 |
1 files changed, 25 insertions, 32 deletions
diff --git a/scss/_accordion.scss b/scss/_accordion.scss index a68aaa70e..fc62ceb88 100644 --- a/scss/_accordion.scss +++ b/scss/_accordion.scss @@ -10,19 +10,17 @@ padding: $accordion-button-padding-y $accordion-button-padding-x; @include font-size($font-size-base); color: $accordion-button-color; + text-align: left; // Reset button style background-color: $accordion-button-bg; - border: $accordion-border-width solid $accordion-border-color; + border: 0; @include border-radius(0); overflow-anchor: none; @include transition($accordion-transition); - &.collapsed { - border-bottom-width: 0; - } - &:not(.collapsed) { color: $accordion-button-active-color; background-color: $accordion-button-active-bg; + box-shadow: inset 0 ($accordion-border-width * -1) 0 $accordion-border-color; &::after { background-image: escape-svg($accordion-button-active-icon); @@ -60,33 +58,37 @@ } .accordion-item { + background-color: $accordion-bg; + border: $accordion-border-width solid $accordion-border-color; + &:first-of-type { + @include border-top-radius($accordion-border-radius); + .accordion-button { - @include border-top-radius($accordion-border-radius); + @include border-top-radius($accordion-inner-border-radius); } } + &:not(:first-of-type) { + border-top: 0; + } + + // Only set a border-radius on the last item if the accordion is collapsed &:last-of-type { + @include border-bottom-radius($accordion-border-radius); + .accordion-button { - // 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); + @include border-bottom-radius($accordion-inner-border-radius); } } .accordion-collapse { - border-bottom-width: $accordion-border-width; @include border-bottom-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; } @@ -97,29 +99,20 @@ // Remove borders and border-radius to keep accordion items edge-to-edge. .accordion-flush { - .accordion-button { - border-right: 0; - border-left: 0; - @include border-radius(0); - } - .accordion-collapse { border-width: 0; } .accordion-item { - &:first-of-type { - .accordion-button { - border-top-width: 0; - @include border-top-radius(0); - } - } + border-right: 0; + border-left: 0; + @include border-radius(0); - &:last-of-type { - .accordion-button.collapsed { - border-bottom-width: 0; - @include border-bottom-radius(0); - } + &:first-child { border-top: 0; } + &:last-child { border-bottom: 0; } + + .accordion-button { + @include border-radius(0); } } } |
