Skip to content
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

Set dir auto on all p tags in applications so browser automatically set directionality correctly #4265

Closed
frjo opened this issue Dec 9, 2024 · 0 comments · Fixed by #4266
Labels
Type: Enhancement This is an improvement of an existing thing (not a new thing, which would be a feature).

Comments

@frjo
Copy link
Member

frjo commented Dec 9, 2024

By setting dir="auto" on all paragraphs (p-tags) browsers will set the directionality according to the first characters with strong directionality.

This attribute does not inherit and cannot be set via css "direction". It must be set via javascript since the p tags are user generated.

This attribute should only be used on user generated text where directionality is not known beforehand.

@frjo frjo added the Type: Enhancement This is an improvement of an existing thing (not a new thing, which would be a feature). label Dec 9, 2024
@frjo frjo closed this as completed in 534dd44 Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement This is an improvement of an existing thing (not a new thing, which would be a feature).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant