From 0fa632198ee84380ef29f3112f90f3cf9de28ab4 Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Tue, 14 May 2024 16:19:28 +0900 Subject: [PATCH] use class for css remove unused rules CSS --- scripts/detail_daemon.py | 8 ++++---- style.css | 28 +++++++--------------------- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/scripts/detail_daemon.py b/scripts/detail_daemon.py index dda5fb4..ed750ed 100644 --- a/scripts/detail_daemon.py +++ b/scripts/detail_daemon.py @@ -30,8 +30,8 @@ class Script(scripts.Script): gr_bias = gr.Slider(minimum=0.0, maximum=1.0, step=.01, value=0.5, label="Bias ") with gr.Column(scale=1, min_width=275): preview = self.visualize(False, 0, 1, 0.5, 0.5, 1, 0, 0, 0, True) - z_vis = gr.Plot(value=preview, elem_id='detail-daemon-vis', show_label=False) - with gr.Accordion("More Knobs:", elem_id="detail-daemon-more-accordion", open=False): + z_vis = gr.Plot(value=preview, elem_classes=['detail-daemon-vis'], show_label=False) + with gr.Accordion("More Knobs:", elem_classes=['detail-daemon-more-accordion'], open=False): with gr.Row(): with gr.Column(scale=2): with gr.Row(): @@ -41,8 +41,8 @@ class Script(scripts.Script): gr_exponent = gr.Slider(minimum=0.0, maximum=10.0, step=.05, value=1.0, label="Exponent", min_width=0) gr_fade = gr.Slider(minimum=0.0, maximum=1.0, step=.05, value=0.0, label="Fade") with gr.Column(scale=1, min_width=275): - gr_smooth = gr.Checkbox(label="Smooth", value=True, min_width=0) - gr_help = gr.Markdown("## [Ⓗ Help](https://github.com/muerrilla/sd-webui-detail-daemon)", elem_id="detail-daemon-help") + gr_smooth = gr.Checkbox(label="Smooth", value=True, min_width=0, elem_classes=['detail-daemon-smooth']) + gr.Markdown("## [Ⓗ Help](https://github.com/muerrilla/sd-webui-detail-daemon)", elem_classes=['detail-daemon-help']) vis_args = [gr_enabled, gr_start, gr_end, gr_bias, gr_amount, gr_exponent, gr_start_offset, gr_end_offset, gr_fade, gr_smooth] for vis_arg in vis_args: diff --git a/style.css b/style.css index 75c8daa..93cf03d 100644 --- a/style.css +++ b/style.css @@ -1,30 +1,16 @@ -#detail-daemon-more-accordion { +.detail-daemon-more-accordion { box-shadow: 0px 1px 6px 2px #00000024 !important; - margin-top: 1em; + margin-top: 1em !important; } -#detail-daemon-more-accordion input[type="checkbox"]{ - margin-left: 3em; +.detail-daemon-smooth { + margin-left: 3em !important; } -#detail-daemon-vis { - margin: auto; +.detail-daemon-vis { + margin: auto !important; } -#detail-daemon-enabled { - margin-bottom: 0.75em; -} - -#detail-daemon-help { +.detail-daemon-help { margin: auto 1.5em !important; } - -#detail-daemon.dd-inactive > div > span { - color: unset; -} - -#detail-daemon.dd-active > div > span { - /*color: #79c700;*/ - /*color: #ffba00;*/ - color: #ff5500; -} \ No newline at end of file