Is there a way to provide a global CSS stylesheet?
I want to override underlying elements or configure all elements at once by my own css classes.
I know this style (ui.label('label ').style('color: rgb(..) syntax, but such configuration has to be repeated for every element.
You can style the whole HTML
bodyby using theui.queryto provide a global CSS stylesheet.You can find more about it on official documentation here.
Update 1:
If the CSS doesnt need to be assigned to the whole body, but selective elements only, we can append the elements to a common list while creating and assign the style together later on.
Update 2:
As per niceGUI's creator's response here, to provide custom CSS, you can just add it as Head html using
ui.add_head_htmlmethod.OR
You can reference using a CSS file as well.