Fix accordion border colors when an item is opened#42092
Open
julien-deramond wants to merge 1 commit intov6-devfrom
Open
Fix accordion border colors when an item is opened#42092julien-deramond wants to merge 1 commit intov6-devfrom
julien-deramond wants to merge 1 commit intov6-devfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the accordion border colors when an item is opened, especially when a theme color is applied.
On https://v6-dev--twbs-bootstrap.netlify.app/docs/6.0/components/accordion/#variants, you can see that the top border of the open blue accordion is gray:
The issue is actually caused by the previous accordion item keeping a gray bottom border, while the opened item has no top border. This results in the visible gray line.
I’ve updated the Sass logic to better handle these different scenarios. There may be a cleaner or more elegant approach, but I didn’t find one after a quick investigation.
When reviewing, please double-check all variants and edge cases (e.g. flush, always-open, etc.) with
.theme-primaryapplied as well. Everything looked correct on my side, but an extra pair of eyes would be appreciated 🙂Preview URL
https://deploy-preview-42092--twbs-bootstrap.netlify.app/docs/6.0/components/accordion/#variants