diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-03-27 03:45:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-27 03:45:39 +0000 |
commit | 3b5a3fab91ff797b28239cda5b449aac1f85ad00 (patch) | |
tree | e96421f23966a87a021e1465a5f8799d92045cbc | |
parent | a89af2325d2a213f3792888f706a64c9ba6dcd09 (diff) | |
parent | d3b188c82d10e8af45357f258c1f65a04cfa4a18 (diff) | |
download | stable-diffusion-webui-gfx803-3b5a3fab91ff797b28239cda5b449aac1f85ad00.tar.gz stable-diffusion-webui-gfx803-3b5a3fab91ff797b28239cda5b449aac1f85ad00.tar.bz2 stable-diffusion-webui-gfx803-3b5a3fab91ff797b28239cda5b449aac1f85ad00.zip |
Merge pull request #8943 from space-nuko/fix-accordion-padding
Fix padding on accordion/dropdown list elements
-rw-r--r-- | modules/scripts.py | 12 | ||||
-rw-r--r-- | style.css | 15 |
2 files changed, 26 insertions, 1 deletions
diff --git a/modules/scripts.py b/modules/scripts.py index d661be4f..4d0bbd66 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -553,3 +553,15 @@ def IOComponent_init(self, *args, **kwargs): original_IOComponent_init = gr.components.IOComponent.__init__
gr.components.IOComponent.__init__ = IOComponent_init
+
+
+def BlockContext_init(self, *args, **kwargs):
+ res = original_BlockContext_init(self, *args, **kwargs)
+
+ add_classes_to_gradio_component(self)
+
+ return res
+
+
+original_BlockContext_init = gr.blocks.BlockContext.__init__
+gr.blocks.BlockContext.__init__ = BlockContext_init
@@ -7,7 +7,7 @@ --block-background-fill: transparent;
}
-.block.padded{
+.block.padded:not(.gradio-accordion) {
padding: 0 !important;
}
@@ -65,6 +65,19 @@ div.compact{ margin-bottom: 0;
}
+.gradio-dropdown ul.options {
+ max-height: 35em;
+ z-index: 3000;
+}
+
+.gradio-dropdown ul.options li.item {
+ padding: 0.05em 0;
+}
+
+.gradio-dropdown ul.options li.item.selected {
+ background-color: var(--secondary-500);
+}
+
.gradio-dropdown div.wrap.wrap.wrap.wrap{
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
|