-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
feature:markdownRelated to Markdown renderingRelated to Markdown renderingfeature:st.captionRelated to the `st.caption` elementRelated to the `st.caption` elementtype:enhancementRequests for feature enhancements or new featuresRequests for feature enhancements or new features
Description
Checklist
- I have searched the existing issues for similar feature requests.
- I added a descriptive title and summary to this issue.
Summary
We already support several Markdown extensions, e.g. to write colored text via st.markdown(":red[foo]"). What if we did the same thing for small text, e.g. via st.markdown(":small[foo]")?
Why?
This can be used for several cool things:
- Replicate the same styling as widget labels outside of a widget. This is especially helpful if you put a widget and another element next to each other. Today, you can't get the same style as a widget label because
st.markdownis too big andst.captionis gray. - Making small badges via
:small[:orange-background[:orange[tag]]]. - Using big and small text in the same element, e.g. for the badges in our roadmap app.
How?
Just add a new Markdown extension, similar to the one for colored text. We should make sure all these extensions also work together properly.
Potentially, we could also make st.caption simply be st.markdown(":small[:gray[foo]]") then! Even though today st.caption uses a slightly different gray than colored text.
Additional Context
No response
github-actions, arnaudmiribel, aumisb, informatica92 and redfave
Metadata
Metadata
Assignees
Labels
feature:markdownRelated to Markdown renderingRelated to Markdown renderingfeature:st.captionRelated to the `st.caption` elementRelated to the `st.caption` elementtype:enhancementRequests for feature enhancements or new featuresRequests for feature enhancements or new features