Skip to content

[css-text-4] Let text-wrap-style apply to more than just block containers #9524

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

Closed
SebastianZ opened this issue Oct 25, 2023 · 3 comments
Closed

Comments

@SebastianZ
Copy link
Contributor

A quick test shows that implementations for text-wrap actually allow flex and block containers as well as tables, generally speaking all non-inline blocks.

Though the spec. currently restricts text-wrap-style to block containers.

Therefore, I suggest to change that to say that it applies to all containers but inline-level boxes.

Sebastian

@nt1m nt1m changed the title [css-text-4] Let tex-wrap-style apply to more than just block containers [css-text-4] Let text-wrap-style apply to more than just block containers Oct 25, 2023
@nt1m
Copy link
Member

nt1m commented Oct 25, 2023

Should it be the text-wrap shorthand in general? Not sure about just changing a single longhand

@Loirooriol
Copy link
Contributor

The 3 cases have an anonymous block container. It just works because it's an inherited property.

Applying to a flex container would imply affecting how flex items are distributed among flex lines, that's not what's happening here. (That would be reasonable, and I recall some existing issue about this, but probably shouldn't be named text-)

@frivoal
Copy link
Collaborator

frivoal commented Oct 26, 2023

I agree with @Loirooriol .

As for

Should it be the text-wrap shorthand in general?

No, because text-wrap-mode needs to apply to inlines/text, rather than block containers.

Not sure about just changing a single longhand

I don't think that's an issue. shorthand / longhand relationships are about parsing / cascading, while the "applies to" part describes the effects. Property having a value but no effect is common, and I'm pretty sure there's precedent for shorthands having longhands with different "applies to".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants