Skip to content

Add CSS to unseelected Content Tabs? #7940

Answered by kamilkrzyskow
YozoraXCII asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @YozoraXCII,
nice work, to be honest I'm surprised that ChatGPT managed to generate all these child selectors, instead of something more generic 😁
The magic for the "active tab" is in the :checked part, so you have to make a copy of that list of child selectors and omit the :checked part to select every possible tab. You can move the "shared" parts, like the rounding etc, into the non-:checked group, and active tab parts like the color into the :checked group.

EDIT: Since it concerns all tabs, not just the active one, then all of these child selectors could be simplified to

.tabbed-set .tabbed-labels > label {
    color: yellow;
    background-color: blue;
    border-color: 0 -.05rem 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@YozoraXCII
Comment options

Answer selected by YozoraXCII
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants