|
from gradio.themes.base import Base |
|
from gradio.themes.utils import colors, fonts, sizes |
|
from typing import Iterable |
|
|
|
class Style(Base): |
|
def __init__( |
|
self, |
|
*, |
|
primary_hue: colors.Color | str = colors.neutral, |
|
secondary_hue: colors.Color | str = colors.neutral, |
|
neutral_hue: colors.Color | str = colors.neutral, |
|
spacing_size: sizes.Size | str = sizes.spacing_md, |
|
radius_size: sizes.Size | str = sizes.radius_md, |
|
text_size: sizes.Size | str = sizes.text_md, |
|
font: fonts.Font |
|
| str |
|
| Iterable[fonts.Font | str] = (fonts.GoogleFont("Sora")), |
|
font_mono: fonts.Font |
|
| str |
|
| Iterable[fonts.Font | str] = (fonts.GoogleFont("Sora")), |
|
): |
|
super().__init__( |
|
primary_hue=primary_hue, |
|
secondary_hue=secondary_hue, |
|
neutral_hue=neutral_hue, |
|
spacing_size=spacing_size, |
|
radius_size=radius_size, |
|
text_size=text_size, |
|
font=font, |
|
font_mono=font_mono, |
|
) |
|
super().set( |
|
background_fill_primary="#f8f9fa", |
|
background_fill_primary_dark="#f8f9fa", |
|
background_fill_secondary="#e9ecef", |
|
background_fill_secondary_dark="#e9ecef", |
|
block_background_fill="#f8f9fa", |
|
block_background_fill_dark="#f8f9fa", |
|
|
|
border_color_primary="#ced4da", |
|
border_color_primary_dark="#ced4da", |
|
|
|
link_text_color="#6c757d", |
|
link_text_color_dark="#6c757d", |
|
|
|
block_info_text_color="#212529", |
|
block_info_text_color_dark="#ffffff", |
|
|
|
block_border_color="#ced4da", |
|
block_border_color_dark="#ced4da", |
|
block_shadow="*shadow_drop_lg", |
|
|
|
input_background_fill="#ffffff", |
|
input_background_fill_dark="#ffffff", |
|
input_border_color="#ced4da", |
|
input_border_color_dark="#ced4da", |
|
input_border_width="2px", |
|
|
|
block_label_background_fill="#f8f9fa", |
|
block_label_background_fill_dark="#f8f9fa", |
|
block_label_text_color="#212529", |
|
block_label_text_color_dark="#212529", |
|
|
|
button_primary_background_fill="#343a40", |
|
button_primary_border_color="#343a40", |
|
button_primary_text_color="#ffffff", |
|
button_shadow="*shadow_drop_lg", |
|
|
|
block_title_background_fill="#f8f9fa", |
|
block_title_background_fill_dark="#f8f9fa", |
|
block_title_radius="*radius_sm", |
|
block_title_text_color="#212529", |
|
block_title_text_color_dark="#212529", |
|
block_title_text_size="*text_lg", |
|
block_title_border_width="0px", |
|
block_title_border_width_dark="0px", |
|
block_title_border_color="#ced4da", |
|
block_title_border_color_dark="#ced4da", |
|
block_title_text_weight="600", |
|
|
|
body_background_fill="#f8f9fa", |
|
body_background_fill_dark="#f8f9fa", |
|
body_text_color="#212529", |
|
body_text_color_dark="#212529", |
|
body_text_color_subdued="#6c757d", |
|
body_text_color_subdued_dark="#6c757d", |
|
|
|
slider_color="#6c757d", |
|
slider_color_dark="#6c757d", |
|
) |