-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Allow a Stylekit "card" to be side-by-side with width=fit-content #1780
Comments
@dinhlongviolin1 Opened a new feature request per #1725. Thanks for taking a look! |
@arcanaxion @jrobinAV I am interested in this issue. Can you please assign this to me? |
Hello @HatimZ , Yep, sure. Let me assign it to you. |
ok great. |
New Quest!A new Quest has been launched in @Avaiga’s repo. Some loot has been stashed in this issue to reward the solver! 🗡 Comment ⚔️ When you submit a PR, comment Questions? Check out the docs. |
@arcanaxion could please assign the above issue to me, if @HatimZ is not working on it. |
@arcanaxion Will work on this issue. Just caught up with some work. Updates soon |
@quest-bot embark |
@HatimZ has embarked on their Quest. 🗡
This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR. Questions? Check out the docs. |
This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines. |
Congrats @HatimZ |
This should be enough for your case @arcanaxion from taipy.gui import Gui
page = """
<|layout|columns=max-content max-content|
<|card|part|
Metric 1
|>
<|card|part|
Metric 2
|>
|>
"""
if __name__ == "__main__":
Gui(page).run(title="layout - fit content") What do you think ? |
@FredLL-Avaiga Yes that's perfect. Time for me to do some reading on CSS... Thanks Fred! |
:+1 can you close the issue then? |
* layout fit example resolves #1780 * Fab's comment Co-authored-by: Fabien Lelaquais <[email protected]> * Fab's comment Co-authored-by: Fabien Lelaquais <[email protected]> * Fab's comment --------- Co-authored-by: Fred Lefévère-Laoide <[email protected]> Co-authored-by: Fabien Lelaquais <[email protected]>
Description
Cards can have their width match the size of its content with #468, which is great for displaying metrics (among other things).
I'd like to position cards side-by-side, without needing to use a layout and explicitly defining the width of each element there.
Currently, I can use a layout and define the width:
Which produces:
I want to create this without defining a width anywhere.
Solution Proposed
Maybe allowing a layout column to "fit-content" ("fc") is a possible solution? I don't like the extra nesting especially if I'm only showing 2 cards, but it makes sense and I can also use layout.gap to add space between the cards.
Impact of Solution
Needs to work with taipy.gui.builder / tgb also.
Additional Context
No response
Acceptance Criteria
Code of Conduct
The text was updated successfully, but these errors were encountered: