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

The Nice Decoupling (or Why Your Clicks Are Down and Impressions Up)

The Nice Decoupling (or Why Your Clicks Are Down and Impressions Up)

June 18, 2025
Advancing Gemini’s safety safeguards – Google DeepMind

Advancing Gemini’s safety safeguards – Google DeepMind

May 25, 2025

Trending.

How you can open the Antechamber and all lever places in Blue Prince

How you can open the Antechamber and all lever places in Blue Prince

April 14, 2025
The most effective methods to take notes for Blue Prince, from Blue Prince followers

The most effective methods to take notes for Blue Prince, from Blue Prince followers

April 20, 2025
Exporting a Material Simulation from Blender to an Interactive Three.js Scene

Exporting a Material Simulation from Blender to an Interactive Three.js Scene

August 20, 2025
AI Girlfriend Chatbots With No Filter: 9 Unfiltered Digital Companions

AI Girlfriend Chatbots With No Filter: 9 Unfiltered Digital Companions

May 18, 2025
Constructing a Actual-Time Dithering Shader

Constructing a Actual-Time Dithering Shader

June 4, 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

Google Volatility, Customized Google AI Solutions, Microsoft Copilot Checkout & Extra web optimization & PPC Information

Google Volatility, Customized Google AI Solutions, Microsoft Copilot Checkout & Extra web optimization & PPC Information

January 11, 2026
Forest Frolic Problem Information And Walkthrough

Forest Frolic Problem Information And Walkthrough

January 11, 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