-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes component info font size #9651
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/fcce787cfa7dafb0f8acd39bd28e2cc30185bd5a/gradio-5.3.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@fcce787cfa7dafb0f8acd39bd28e2cc30185bd5a#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/fcce787cfa7dafb0f8acd39bd28e2cc30185bd5a/gradio-client-1.7.0.tgz Use Lite from this PR <script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/fcce787cfa7dafb0f8acd39bd28e2cc30185bd5a/dist/lite.js""></script> |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
Font size looks good @dawoodkhan82 but previously, we would also use a subdued color for the info text. Compare 4 (top) vs. 5 (bottom), which would be nice to bring back: I also think there should be slightly more padding underneath the info text |
Use this instead: div > :global(.md.prose) {
color: var(--block-info-text-color);
font-weight: var(--block-info-text-weight);
font-size: var(--block-info-text-size);
line-height: var(--line-sm);
}
div {
margin-bottom: var(--spacing-md);
} Avoids the use of !important, scopes the :global, and the margin bottom wasn't being applied to a span since it's display: inline, so apply it to the div. |
Honestly passing in the style configuration as parameters to the Markdown svelte component is also a fine approach, and is less likely to break in case we change class names in Markdown.svelte. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I think in the future it'd be great to have a SimpleMarkdown svelte component, that maybe only accepts bold, italics, and url links. We don't want all the complexity of markdown in BlockInfo, which is what's causing this issue, and I'm sure there are other places too we only want limited markdown.
Description
info
.Closes: #9642
🎯 PRs Should Target Issues
Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.
Not adhering to this guideline will result in the PR being closed.
Tests
PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests:
bash scripts/run_all_tests.sh
You may need to run the linters:
bash scripts/format_backend.sh
andbash scripts/format_frontend.sh