-
Notifications
You must be signed in to change notification settings - Fork 29
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
[Suggestion] Enhance the Heading
component to support new text-wrap
values
#522
Comments
@sergioalvz - thanks for filing this request. We discussed it at Primer Brand office hours today. In principle, we'd be happy to add this feature via a dedicated prop. The current browser support for We'll review browser support over the next few quarters, and add this feature when support meets our GitHub policies (GitHub staff only). |
The Also, I see this more as a "progressive enhancement" instead an "all or nothing". Specifically for Contentful where responsively breaking titles to new lines is probably not easily done manually by a copy editor. So having it done by the browsers that already support it, can't hurt. But before adding it directly to Primer Brand, we could also test it first a bit in specific places to see if the new |
I agree, but this is also our browser support commitment to users. AFAIK, this applies to all Primer libraries.
We explored that avenue too. Current thinking is that it could pose accessibility problems due to lack of cross-browser support, and -for example - could give the false impression that fg/bg contrast ration is fine on some browsers, while it's a violation in others. We're primarily concerned about enabling support for a feature that isn't consistently applied just yet.
👍 Sounds reasonable. I think it's a great feature, so we'd be keen to follow along with your experimentation. In the meantime, I'll check in with some other folks at GitHub to see where we draw the line on these new features and their adoption 🤞 cc. @danielguillan |
Hello everyone!
A few weeks ago, @simurai shared some insights regarding the
text-wrap
CSS property and its potential to simplify the adoption of Contentful for specific marketing pages. Currently, we manually break certain heading texts using<br>
tags, which poses challenges for migration to Contentful and may introduce localization issues.The good news is that
text-wrap
now offers native functionality to address this. You can read more about it here: https://developer.chrome.com/blog/css-wrapped-2023#textwrap.Would it be possible to consider integrating this property with the
Heading
component? My suggestion is to introduce a new prop, similar to others likesize
orweight
, which would allow us to pass specifictext-wrap
values to the component.Let me know what you think!
The text was updated successfully, but these errors were encountered: