• 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.

SquidLoader Malware Marketing campaign Hits Hong Kong Monetary Corporations

SquidLoader Malware Marketing campaign Hits Hong Kong Monetary Corporations

July 20, 2025
“Be your self” | Seth’s Weblog

Tasks left undone | Seth’s Weblog

May 31, 2025

Trending.

Researchers Uncover Crucial GitHub CVE-2026-3854 RCE Flaw Exploitable by way of Single Git Push

Researchers Uncover Crucial GitHub CVE-2026-3854 RCE Flaw Exploitable by way of Single Git Push

April 29, 2026
The Obtain: the tech reshaping IVF and the rise of balcony photo voltaic

The Obtain: the tech reshaping IVF and the rise of balcony photo voltaic

May 7, 2026
Undertaking possession (fairness and fairness)

Your work diary | Seth’s Weblog

May 6, 2026
From Shader Uniforms to Clip-Path Wipes: How GSAP Drives My Portfolio

From Shader Uniforms to Clip-Path Wipes: How GSAP Drives My Portfolio

May 7, 2026
Nsfw Chatgpt Options – Examples I’ve Used

Nsfw Chatgpt Options – Examples I’ve Used

October 13, 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

Microsoft SharePoint Server Flaw Allows Distant Code Execution Assaults

Microsoft SharePoint Server Flaw Allows Distant Code Execution Assaults

May 27, 2026
Google unveils Gemini 3.5 Flash and a redesigned ‘clever Search field’

Google unveils Gemini 3.5 Flash and a redesigned ‘clever Search field’

May 27, 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