Skip to content

Provide a standalone accordion component#30042

Closed
gijsroge wants to merge 16 commits intotwbs:mainfrom
gijsroge:standalone-accordion
Closed

Provide a standalone accordion component#30042
gijsroge wants to merge 16 commits intotwbs:mainfrom
gijsroge:standalone-accordion

Conversation

@gijsroge
Copy link
Copy Markdown
Contributor

@gijsroge gijsroge commented Jan 17, 2020

This adds a standalone accordion component with its own settings and markup.

Preview: https://deploy-preview-30042--twbs-bootstrap.netlify.com/docs/4.3/components/accordion/

Also added a flush and striped variation.

Fixes #30015

Fixes #28134 by moving the border bottom from the header to a border top on the body we fix the overlapping issue where the border would be invisible if the body had a background color. This also allowed me to also remove the overflow: hidden; on the .accordion-item which fixes #28873

Also fixes #25811

Currently this is still a work in progress.

@gijsroge gijsroge marked this pull request as ready for review January 17, 2020 11:47
@gijsroge gijsroge requested a review from a team as a code owner January 17, 2020 11:47
Comment thread scss/_accordion.scss Outdated
@MartijnCuppens
Copy link
Copy Markdown
Member

image
Because the box-shadow overlaps the border, it looks like the bottom shadow is a bit smaller

@gijsroge gijsroge force-pushed the standalone-accordion branch from 7f14580 to 47ae0b2 Compare January 21, 2020 16:24
Comment thread scss/_accordion.scss Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why these !importants where added? Seems to work fine without?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, probably because of the zebra stripes? Maybe then just use the :not() construction there too? This way, people will still be able to override the behaviour with utilities.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this was one of the things I was planning on refactoring, will look at it hopefully this weekend :D

Comment thread scss/_accordion.scss Outdated
Comment thread scss/_accordion.scss Outdated
Comment thread scss/_accordion.scss Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make the whole transform value variable, so that flips can also be used?

@mdo mdo self-assigned this Feb 3, 2020
@mdo
Copy link
Copy Markdown
Member

mdo commented Feb 3, 2020

Assigning myself here to review the design after we get our first v5 alpha out, then this is in for alpha 2. Thanks!

Comment thread scss/_variables.scss Outdated
Comment thread site/content/docs/4.3/components/accordion.md Outdated
@gijsroge gijsroge force-pushed the standalone-accordion branch from 3d6542d to cb601aa Compare February 11, 2020 15:22
gijsroge and others added 3 commits February 11, 2020 16:25
* Striped / Flushed variations now have a separate bg/text color active states that are configurable.
* Used breaks to give list of accordion variables more readability
* Added inline explanations where needed.
@mdo mdo changed the base branch from master to main June 16, 2020 20:12
@mdo
Copy link
Copy Markdown
Member

mdo commented Oct 23, 2020

@gijsroge Would you be willing to resolve conflicts here and help bring this back?

mdo added a commit that referenced this pull request Oct 30, 2020
- Simplified the CSS and reduced number of variables
- Fixed flashing background animation
@mdo mdo mentioned this pull request Oct 30, 2020
2 tasks
@mdo
Copy link
Copy Markdown
Member

mdo commented Oct 30, 2020

Picking this up in #32013.

@mdo mdo closed this Oct 30, 2020
@gijsroge
Copy link
Copy Markdown
Contributor Author

gijsroge commented Nov 5, 2020

@mdo thanks for picking this up, I did not have the time due to personal stuff. I hope my PR was still somewhat useful :D

@mdo
Copy link
Copy Markdown
Member

mdo commented Nov 5, 2020

It most assuredly was!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

4 participants