This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[✨] Enable the attribute q:slot on Fragment #70
Labels
[STAGE-2] incomplete implementation
Remove this label when implementation is complete
[STAGE-2] not fully covered by tests yet
Remove this label when tests are verified to cover the implementation
[STAGE-2] unresolved discussions left
Remove this label when all critical discussions are resolved on the issue
[STAGE-3] docs changes not added yet
Remove this label when the necessary documentation for the feature / change is added
[STAGE-3] missing 2 reviews for RFC PRs
Remove this label when at least 2 core team members reviewed and approved the RFC implementation
Is your feature request related to a problem?
Yes, so to say.
When you use the default slot, it is possible to pass only text. And this is very useful if you want to ensure such copy should aways look the same. Like in:
However, it is not possible to do so when using named slots because you need an HTML Element onto which the attribute
q:slot
is attached.The consumer of
Post
, when passing content to the named slottitle
, needs to do it with an element. Possibly aspan
, but an inconvenience nonetheless.Describe the solution you'd like
I would like that the
Fragment
component could accept theq:slot
attribute. That way, considering the componentPost
, from above, it would be possible to pass only text to the title.Describe alternatives you've considered
I have been using "harmless" elements, like
span
, to pass text to named slots. But it is not a perfect solution.Additional context
I created a discussion about it on Discord.
https://discord.com/channels/842438759945601056/1134954295897358417
The text was updated successfully, but these errors were encountered: