Skip to content

Need help with background color in ui.splitter #3061

Closed Answered by falkoschindler
happybeginning1 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @happybeginning1,

This is a tricky question which took me a while to figure out. It looks like the "after" slot has a height of 100% per default, which - strangely - causes it to not fill the vertical space. At least I could get the dark background to grow by setting the prop after-class="!h-[unset]" and adding h-full to the ui.tab_panels' classes:

ui.add_css(':root { --q-dark-page: #222222 }')
ui.dark_mode(True)

with ui.splitter(value=7.5, limits=(7.5, 7.5)).classes('w-full').props('after-class="!h-[unset]"') as splitter:
    with splitter.before:
        with ui.tabs().props('vertical').classes('w-full') as tabs:
            exam = ui.tab('exam')
            head = ui.tab('head')
  …

Replies: 1 comment 1 reply

Comment options

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

Answer selected by happybeginning1
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