Skip to content

Commit 0036ca3

Browse files
committed
More nested CSS
1 parent 83707ad commit 0036ca3

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

src/textual/widgets/_tabs.py

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -205,22 +205,27 @@ class Tabs(Widget, can_focus=True):
205205
Tabs {
206206
width: 100%;
207207
height: 3;
208-
}
209-
Tabs > #tabs-scroll {
210-
overflow: hidden;
211-
}
212-
Tabs #tabs-list {
213-
width: auto;
214-
min-height: 2;
215-
}
216-
Tabs #tabs-list-bar, Tabs #tabs-list {
217-
width: auto;
218-
height: auto;
219-
min-width: 100%;
220-
overflow: hidden hidden;
221-
}
222-
Tabs:focus .underline--bar {
223-
background: $foreground 20%;
208+
209+
&:focus {
210+
.underline--bar {
211+
background: $foreground 20%;
212+
}
213+
}
214+
215+
& > #tabs-scroll {
216+
overflow: hidden;
217+
}
218+
219+
#tabs-list {
220+
width: auto;
221+
min-height: 2;
222+
}
223+
#tabs-list-bar, #tabs-list {
224+
width: auto;
225+
height: auto;
226+
min-width: 100%;
227+
overflow: hidden hidden;
228+
}
224229
}
225230
"""
226231

0 commit comments

Comments
 (0)