Skip to content

Commit

Permalink
Use nested CSS in Tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Oct 14, 2024
1 parent 79e42fa commit 83707ad
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions src/textual/widgets/_tabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,26 @@ class Tab(Static):
padding: 1 1 0 2;
text-align: center;
color: $text-disabled;
}
Tab.-active {
text-style: bold;
color: $text;
}
Tab:hover {
text-style: bold;
}
Tab.-active:hover {
color: $text;
}
Tab:disabled {
color: $text-disabled;
text-opacity: 50%;
}
Tab.-hidden {
display: none;
&:hover {
text-style: bold;
}
&:disabled {
color: $text-disabled;
text-opacity: 50%;
}
&.-active {
color: $text;
text-style: bold;
&:hover {
color: $text;
}
}
&.-hidden {
display: none;
}
}
"""

Expand Down

0 comments on commit 83707ad

Please sign in to comment.