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
[Prototype] Add key
parameter to st.container
#8569
base: develop
Are you sure you want to change the base?
Conversation
key
parameter to st.container
key
parameter to st.container
key
parameter to st.container
key
parameter to st.container
def current_container_key(this_dg: DeltaGenerator) -> str | None: | ||
"""Find the container key for the given DeltaGenerator.""" | ||
# Avoid circular imports. | ||
from streamlit.delta_generator import dg_stack |
Check notice
Code scanning / CodeQL
Cyclic import Note
streamlit.delta_generator
Great, it will simplify a lot CSS interface customisation, Any plan for that ? Thanks |
@@ -29,11 +31,18 @@ | |||
|
|||
SpecType: TypeAlias = Union[int, Sequence[Union[int, float]]] | |||
|
|||
# Pattern to validate a container key (to be compatible with css class names): | |||
_KEY_PATTERN: Final = re.compile(r"^[a-zA-Z_][a-zA-Z0-9\-_]*$") |
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.
The check here that it starts with a letter is not needed since we prefix the key anyways with some letters (e.g. st-
)
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Describe your changes
GitHub Issue Link (if applicable)
Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.