Theme guide fixes (#3561)

* fixes

* changelog

* changelog

* changelog

* fix
This commit is contained in:
Abubakar Abid 2023-03-21 10:44:25 -07:00 committed by GitHub
parent 88afd684be
commit 6c8aeed58f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ No changes to highlight.
## Documentation Changes:
No changes to highlight.
- Makes some fixes to the Theme Guide related to naming of variables, by [@abidlabs](https://github.com/abidlabs) in [PR 3561](https://github.com/gradio-app/gradio/pull/3561)
## Testing and Infrastructure Changes:

View File

@ -93,9 +93,9 @@ You could also create your own custom `Color` objects and pass them in.
The next 3 constructor arguments set the sizing of the theme and are `gradio.themes.Size` objects. Internally, these Size objects hold pixel size values that range from `xxs` to `xxl`. Other CSS variables are derived from these 3 sizes.
- `spacing_size`: This sets the padding within and spacing between elements. In the default theme, this is set to `gradio.themes.spacing_md`.
- `radius_size`: This sets the roundedness of corners of elements. In the default theme, this is set to `gradio.themes.radius_md`.
- `text_size`: This sets the font size of text. In the default theme, this is set to `gradio.themes.font_md`.
- `spacing_size`: This sets the padding within and spacing between elements. In the default theme, this is set to `gradio.themes.sizes.spacing_md`.
- `radius_size`: This sets the roundedness of corners of elements. In the default theme, this is set to `gradio.themes.sizes.radius_md`.
- `text_size`: This sets the font size of text. In the default theme, this is set to `gradio.themes.sizes.text_md`.
You could modify these values using their string shortcuts, such as
@ -246,7 +246,7 @@ theme = gr.themes.Default().set(
button_primary_background_fill="#FF0000",
button_primary_background_fill_dark="#AAAAAA",
button_primary_border="*button_primary_background_fill",
button_primary_border_dark="*button_primary_background_fill",
button_primary_border_dark="*button_primary_background_fill_dark",
)
```