-
First Check
Example Code@ui.page('/testbuttoncss')
async def testbuttoncss_page():
ui.add_css("""
.mytestbutton {
background-color: red !important;
}
""")
ui.button('Test Button').classes('mytestbutton') DescriptionThis has been referenced in this issue which has been closed as not planned. But can someone please tell me what to do with the hundreds of css classes I've painstakingly defined for various components across my app? Does Quasar expect us not to use CSS and only use the color prop? What about properties other than the color? No reusability or inheritance?? The issue is not just with buttons. I used to disable inputs using I'm guessing there are other affected components as well. Since all my tests check for functionality and not styles, it may be weeks or months before I catch some styling issue in some corner of my app. Can someone guide me? What's the logic here? NiceGUI Version3.0.3 Python Version3.13.7 BrowserChrome Operating SystemWindows Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hello @amks1 thanks for the report. Sorry for the trouble of 3.0. Although #4415 closed as unplanned, in 3.0 we do CSS layers and we actually managed to "nerf Quasar's But to leverage that, you will need to move your CSS into layers. As to which layer, I can't think of which off the top of my head. But it has to be one of these, though. nicegui/nicegui/templates/index.html Line 8 in c5c9dfe |
Beta Was this translation helpful? Give feedback.
-
Sorry, @amks1! We spent a lot of effort to keep supporting things like ui.button().style('background-color: #123456 !important') But we didn't really think about the use case of custom CSS in user code. We should add a hint to the release notes. Have a look into #5211 (comment) for a similar example. There I suggested to use |
Beta Was this translation helpful? Give feedback.
Hello @amks1 thanks for the report. Sorry for the trouble of 3.0.
Although #4415 closed as unplanned, in 3.0 we do CSS layers and we actually managed to "nerf Quasar's
!important
s" in #5171 instead. I wrote it so I know it.But to leverage that, you will need to move your CSS into layers. As to which layer, I can't think of which off the top of my head. But it has to be one of these, though.
nicegui/nicegui/templates/index.html
Line 8 in c5c9dfe