Add font-stretch utilities#12171
Closed
Gregory-Gerard wants to merge 1 commit intotailwindlabs:archive/master-2024-02-23from
Gregory-Gerard:font-stretch
Closed
Add font-stretch utilities#12171Gregory-Gerard wants to merge 1 commit intotailwindlabs:archive/master-2024-02-23from Gregory-Gerard:font-stretch
font-stretch utilities#12171Gregory-Gerard wants to merge 1 commit intotailwindlabs:archive/master-2024-02-23from
Gregory-Gerard:font-stretch
Conversation
KrisBraun
added a commit
that referenced
this pull request
Mar 8, 2024
Based on #12171. Add [`font-stretch`](https://developer.mozilla.org/en-US/docs/Web/CSS/font-stretch) utilities. Naming with `font-stretch` rather than `stretch` since the latter isn't clearly associated with fonts. Named values (e.g. `font-stretch-ulta-expanded`) and percentages (e.g. `font-stretch-50`) are supported. --- Co-authored-by: Gregory Gerard <contact@gregory-gerard.dev>
Contributor
|
Hey @Gregory-Gerard, Thanks for contributing! These utilities will be helpful. With Tailwind CSS v4 coming, we'll add new feature there. I've opened #13153 to add Thanks again for contributing! |
KrisBraun
added a commit
that referenced
this pull request
Mar 8, 2024
* [v4] Add `font-stretch` utilities Based on #12171 y @Gregory-Gerard. Add [`font-stretch`](https://developer.mozilla.org/en-US/docs/Web/CSS/font-stretch) utilities. Naming with `font-stretch` rather than `stretch` since the latter isn't clearly associated with fonts. Named values (e.g. `font-stretch-ulta-expanded`) and percentages (e.g. `font-stretch-50`) are supported.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey there!
First-time contributor to Tailwind CSS, if there's anything specific you'd like me to adjust or if you have any questions, please don't hesitate to let me know.
Goal
I've added the
.stretch-*classes to manage thefont-stretchproperty. This addition is approximately 96% compatible overall, as per the information available on caniuse.com.Stretch should allow percentage value or any config value. I've relied on the
fontWeightproperty for this new feature. I hesitated between adding statics utilities or the version I sent, but I think that being able to use arbitrary values and extend configurations is interesting because this property accepts percentage values in addition to global values.I found myself deliberating between using
font-stretchand simplystretch. I would appreciate your guidance on which option is more suitable for this.Documentation
Additional documentation of
font-stretchproperty on MDNIf this feature is accepted, I could also take care of creating the corresponding documentation in https://github.com/tailwindlabs/tailwindcss.com.
Related discussions
#10156
#5686
#8324