• About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us
AimactGrow
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing
No Result
View All Result
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing
No Result
View All Result
AimactGrow
No Result
View All Result

Match width textual content in 1 line of CSS

Admin by Admin
December 10, 2025
Home Coding
Share on FacebookShare on Twitter


From Adam, prototyped in Chrome Canary 145:

h1 {
  text-grow: per-line scale;
}

Danny mentioned this some time again when totally different approaches for becoming textual content to a container, spelling out the syntax (text-shrink included) that yow will discover in Roma Komarov’s explainer:

text-grow:  ? ?;
text-shrink:  ? ?;
    • per-line: For text-grow, strains of textual content shorter than the container will develop to suit it. For text-shrink, strains of textual content longer than the container will shrink to suit it.
    • constant: For text-grow, the shortest line will develop to suit the container whereas all different strains develop by the identical scaling issue. For text-shrink, the longest line will shrink to suit the container whereas all different strains shrink by the identical scaling issue.
  •  (non-compulsory)
    • scale: Scale the glyphs as an alternative of adjusting the font-size.
    • scale-inline: Scale the glyphs as an alternative of adjusting the font-size, however solely horizontally.
    • font-size: Develop or shrink the font dimension accordingly.
    • letter-spacing: The letter spacing will develop/shrink as an alternative of the font-size.
  •  (non-compulsory): The utmost font dimension for text-grow or minimal font dimension for text-shrink.

Discover the totally different match strategies — they both scale the glyphs or regulate the textual content’s precise font-size. So, naturally, the explainer notes that accessibility issues are nonetheless being labored out. Like:

If an end-user tries to enlarge font dimension, UAs shouldn’t match enlarged strains to the container width. Is minimum-font setting sufficient?

Talking of open questions, Una Kravets highlights a number of on Bluesky:

  • Ought to the final line of a paragraph be scaled?
  • Is the present line-height habits as anticipated?
  • Ought to it scale non-text components resembling inline photos collectively?

You may contribute to the dialogue within the GitHub challenge, in fact.

Donnie D’Amato wonders if, maybe, this concept is healthier fitted to print types somewhat than screens. That’s a superb use case I hadn’t considered.

We positive have come a great distance from the times of magic numbers and FitText.js!


Direct Hyperlink →

Tags: CSSfitLinetextwidth
Admin

Admin

Next Post
Gemini 3 Professional Picture mannequin from Google DeepMind

Gemini 3 Professional Picture mannequin from Google DeepMind

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended.

Path of Radiance involves the Nintendo Change 2

Path of Radiance involves the Nintendo Change 2

January 9, 2026
I Reviewed Greatest Operational Threat Administration Software program: Prime 8 Picks

I Reviewed Greatest Operational Threat Administration Software program: Prime 8 Picks

April 16, 2025

Trending.

The right way to Defeat Imagawa Tomeji

The right way to Defeat Imagawa Tomeji

September 28, 2025
Introducing Sophos Endpoint for Legacy Platforms – Sophos Information

Introducing Sophos Endpoint for Legacy Platforms – Sophos Information

August 28, 2025
Satellite tv for pc Navigation Methods Going through Rising Jamming and Spoofing Assaults

Satellite tv for pc Navigation Methods Going through Rising Jamming and Spoofing Assaults

March 26, 2025
How Voice-Enabled NSFW AI Video Turbines Are Altering Roleplay Endlessly

How Voice-Enabled NSFW AI Video Turbines Are Altering Roleplay Endlessly

June 10, 2025
Learn how to Set Up the New Google Auth in a React and Specific App — SitePoint

Learn how to Set Up the New Google Auth in a React and Specific App — SitePoint

June 2, 2025

AimactGrow

Welcome to AimactGrow, your ultimate source for all things technology! Our mission is to provide insightful, up-to-date content on the latest advancements in technology, coding, gaming, digital marketing, SEO, cybersecurity, and artificial intelligence (AI).

Categories

  • AI
  • Coding
  • Cybersecurity
  • Digital marketing
  • Gaming
  • SEO
  • Technology

Recent News

Pharma Digital Advertising Company within the USA

Pharma Digital Advertising Company within the USA

February 12, 2026
xAI lays out interplanetary ambitions in public all-hands

xAI lays out interplanetary ambitions in public all-hands

February 12, 2026
  • About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us

© 2025 https://blog.aimactgrow.com/ - All Rights Reserved

No Result
View All Result
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing

© 2025 https://blog.aimactgrow.com/ - All Rights Reserved