themesberg / themesberg/flowbite
Incorrect toggling of custom classes in accordions
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 9.4k
- Forks
- 862
- PR merge metrics
- No merged PRs in 30d
Description
When an accordion item is expanded, classes in data-active-classes are removed if they are also present in data-inactive-classes. This is a problem when you want the same classes applied for both when the accordion is open & and when it's closed.
Steps to reproduce:
- Add an accordion component from the docs
- Set
data-active-classes="foo bar foobar"anddata-inactive-classes="foo bar barfoo"on the accordion container element - Toggle the accordion
- Classes
fooandbarare removed from the accordion toggle
Expected behavior
All classes in data-active-classes should be present when the accordion is open and all classes in data-inactive-classes should be present when the accordion is closed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the accordion component referenced in the docs as the entry point, and reproduce the case where data-active-classes and data-inactive-classes overlap. Trace the class toggling for the accordion toggle; done means shared classes remain present in both open and closed states while each state’s other classes are applied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, tailwindcss
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100