Does this block of code works for you?

Hi,
from the docs:

https://gradio.app/custom_CSS_and_JS/

Did anyone tried the below code and manage to get it to work?

with gr.Blocks(css="#warning {color: red}") as demo:
    box1 = gr.Textbox(value="Good Job")
    box2 = gr.Textbox(value="Failure", elem_id="warning")

It didn’t work for me, there is no red color on box2

Thank you!

The issue might be the css property color. Depending on what you want to target, a different property might be more appropriate.

For example, this works for me:

with gr.Blocks(css="#warning {background-color: red}") as demo:
    box1 = gr.Textbox(value="Good Job")
    box2 = gr.Textbox(value="Failure", elem_id="warning")
    
demo.launch()

Thank you! @abidlabs