cferdinandi / tabby

Lightweight, accessible vanilla JS toggle tabs.
MIT License
599 stars 73 forks source link

CSS class for active tab missing #42

Closed leolux closed 9 years ago

leolux commented 9 years ago

I would like to style the active tab different from other tabs. How to do this?

cferdinandi commented 9 years ago

Not missing, just deliberately omitted. Tabby is "ugly on purpose" so that you can style it to your liking.

You could target .tabs .active, .tabs button.active, .tabs li.active or .tabs a.active depending on your setup and desired appearance. There's a million different ways you could configure the appearance, so I don't want to get too prescriptive.

leolux commented 9 years ago

Ok, thanks!

In the meanwhile I found out that the CSS class "active" gets already added to the corresponding tab by your javascript code. This means I have full flexibility in styling my tabs. That is awesome ;-)

cferdinandi commented 9 years ago

Oh sorry, yes. I should have mentioned that!