How to style the options in a Select widget? #4329
Replies: 2 comments 1 reply
-
Does this answer in a similar discussion help? #4061 (comment) |
Beta Was this translation helpful? Give feedback.
-
Thank's to GomjGooding, the discussion #4061 solves the question. As a beginner I am proud (😉) to found how to restrict these settings to a specific Select. That could be done by CSS using child combinators. Let's assume we have a Select with #onelineselect > SelectCurrent, #onelineselect > SelectCurrent:focus {
border: none;
} Then as the python code snippet we could have: choices = (('A', 'a'), ('B', 'b'))
yield Select(choices, id='onelineselect', allow_blank=True, prompt='make your Choice') Of course the |
Beta Was this translation helpful? Give feedback.
-
As I asked in #4304 for Buttons I want to build single line Select widgets. It seems that the options themselves has
border
,padding
or even other properties, but I don't find a way to configure them.My little code snipped inside a
compose
:That makes a three-line widget, even if I set the
border
to none, and so on. Even an additional border is shown if I setborder: red
for the Select widget. That's why I suppose that the options themselve haveborder
ormargin
or something else.A detail could be: how to style the
promt
in case of no selection?Any help is very welcome.
Beta Was this translation helpful? Give feedback.
All reactions