Skip to content

Instantly share code, notes, and snippets.

@wookiehangover
Created January 4, 2024 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wookiehangover/6c089b29bc6809c94b661e93bc84a235 to your computer and use it in GitHub Desktop.
Save wookiehangover/6c089b29bc6809c94b661e93bc84a235 to your computer and use it in GitHub Desktop.
css = """
.gradio-container {
--block-radius: 4px;
--block-label-radius: 4px;
--font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
--layout-gap: 2rem 1rem;
--text-xxl: 1.75rem;
--text-xl: 1.5rem;
--text-lg: 1.25rem;
--text-md: 1rem;
--text-sm: .875rem;
--text-xs: .75rem;
--text-xxs: .625rem;
}
body.dark p {
--body-text-color: rgb(187 194 207);
}
body .upload-container .wrap {
font-size: var(--text-md) !important;
}
"""
import gradio as gr
text = """
# Gradio More Better CSS
- Less border radius
- More vertical space in layouts
- System Fonts
- Better text sizing (16px body font)
"""
with gr.Blocks(css=css) as demo:
gr.Markdown(text)
gr.Image()
demo.queue().launch(server_name="0.0.0.0")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment