How can I remove default padding of ScrollArea? #4309
-
QuestionI tried making a scrollable listarea containing multiple widgets. what I've tried:
minimal reproducible code: with ui.scroll_area().classes("w-full").style("gap:0; margin:0; padding:0; border:1px solid red;"):
with ui.column().style("width:100%; gap:0; padding:0; margin:0;"):
for i in range(0, 100):
with ui.row().style("width: 100%; background-color: lightblue; border: 1px solid black;"):
ui.label(i).style("width:100%; margin:4px;")
ui.run() result of said code: I want to change/remove the padding b/w the border of ScrollArea and the elements. Is there any way to achieve this? |
Beta Was this translation helpful? Give feedback.
Answered by
balex89
Feb 5, 2025
Replies: 1 comment 1 reply
-
Hi, @ParkingLot0326! Try adding property with ui.scroll_area().classes("w-full").style("gap:0; margin:0; padding:0; border:1px solid red;") as area:
area.props.update({
'content-style': {'padding': 0},
'content-active-style': {'padding': 0}
})
with ui.column().style("width:100%; gap:0; padding:0; margin:0;"):
for i in range(0, 100):
with ui.row().style("width: 100%; background-color: lightblue; border: 1px solid black;"):
ui.label(i).style("width:100%; margin:4px;")
ui.run() For more info and other Quasar |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ParkingLot0326
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, @ParkingLot0326! Try adding property
content-style
(alsocontent-active-style
):For more info and other Quasar
ScrollArea
properties that might be useful: https://quasar.dev/vue-components/s…