-
Notifications
You must be signed in to change notification settings - Fork 127
Conversation
Preview changesYou can preview these changes by following the link below: I will update this comment with the latest preview links as you push more changes to this PR. |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Any reason to not include the !important? It makes the margin-inline still apply, which should not change, but in fact add to, the existing margins. I'm happy to land this as a more solid alternative to the inline-flex that was applied before. I'd love a quick gut-check by @beafialho if she has time. |
Thanks for the ping! Testing the behaviour, it seems to work nicely. I'm able to align it wherever I want to (left, right, inside columns, etc), even though the default alignment is centered. |
@jasmussen the reason is that adding the important was pretty much affecting some layouts we already have in place, as I shared here Screen.Recording.2024-10-16.at.11.49.16.movRecording the screencast, I realized that if we're ok with inheriting the margin rules, then we could remove the |
Oh, gotcha. Then this PR is probably best to land as is! What do you think? |
I believe we could also remove the |
Isn't that one what makes Bea's alignments here work? If not, and if it works without it, yes we can remove. |
I believe the alignment will be coming from parent elements as things are, and the margin wouldn't have an effect. I pushed a commit removing the @beafialho can you please try it again with the most recent changes? Thank you both 🙌 |
Hey there! 👋 Another test case is that with the current With |
Thanks for sharing Martijn. That's another good reason to get this one merged. |
Indeed! I'd suggest merging, so we can get some experience with it. Thanks for the work. |
Perfect, merging then. Thank you all! |
The text alignment still is not working. |
The text alignment works if I enable width: "fit", but I am not sure users will understand how these work together. |
The text alignment is visible if you a full paragraph. The fact that it's centered is a bit of a tradeoff, that I think is acceptable in keeping the style as it is. It allows patterns to work, it's ergonomic, and arguably centering the pill-shape can also be an aspect of how it works. I would recommend keeping as-is. |
I don't understand. I think a word is missing? |
Ack, my apologies, chaotic morning. I meant to say: "The text alignment is visible if you write a full paragraph", by which I mean this: I know that's not the intent of the text style. But it matters to me that on a technical level, the text alignment isn't actually broken, it's just not visible when the item is centered. It's similar to any paragraph you put inside a Row block: Because of this, it still feels reasonable to offer this text style. You can try it out when you're authoring your docs, see if it fits. And it provides better ergonomics once you edit some of the TT5 patterns, which may be the more prevalent use case of the pill shape. |
OK, thank you. |
Description
Fixes #555
Changing the display so that it shows in context in the editor, and using a width to adjust to its content.
The alignment of the annotation will depend of its parent element (stack, for example).
Screenshots
Screen.Recording.2024-10-16.at.10.52.07.mov
Testing Instructions