themesberg / flowbite

Open-source UI component library and front-end development framework based on Tailwind CSS
https://flowbite.com
MIT License
7.55k stars 715 forks source link

Customizing active tab with aria-selected:{class} is not working properly #670

Closed yurivis closed 6 months ago

yurivis commented 11 months ago

Describe the bug

In the Components documentation, Tabs section Customize active tab subsection you describe how to apply styling to an active button with aria-selected:{class}. There is no explanation on how exactly it is applied nor what is the expected behavior. Is the class added to the button's classlist? Should the class be already declared in my CSS on compilation? I've tried different combinations of aria-selected:{class} including aria-selected:{text-primary-200}, aria-selected:text-primary-200, aria-selected:{class}="text-primary-200", but there is no reason trying, since I don't know what to expect.

GeorgeKryptonian commented 7 months ago

@yurivis Have you solved your problem? I have the same question.

yurivis commented 7 months ago

@GeorgeKryptonian Unfortunately, no. In my case I have rewritten the default color to suit my theme and went on from there. Not sure if this was fixed.

zoltanszogyenyi commented 6 months ago

Hey everyone! The next release for v2.3 will include two new data attributes that will allow you to update the active and inactive classes using Tailwind CSS classes (https://github.com/themesberg/flowbite/commit/55f568773a1bfc7a5ba189556f84b56cd1db9f8e):

Screenshot 2024-02-07 at 12 52 11

Cheers, Zoltan