Title: Fit To Width &#8211; CSS-only stretchy text
Author: Kevin Batdorf
Published: <strong>ئاب 25, 2025</strong>
Last modified: نیسان 12, 2026

---

گەڕان لە پێوەکراوەکان

![](https://ps.w.org/fit-to-width/assets/icon-256x256.png?rev=3349427)

# Fit To Width – CSS-only stretchy text

 لەلایەن [Kevin Batdorf](https://profiles.wordpress.org/kbat82/)

[داگرتن](https://downloads.wordpress.org/plugin/fit-to-width.0.2.0.zip)

 * [وردەکارییەکان](https://ku.wordpress.org/plugins/fit-to-width/#description)
 * [پێداچوونەوەکان](https://ku.wordpress.org/plugins/fit-to-width/#reviews)
 *  [دامەزراندن](https://ku.wordpress.org/plugins/fit-to-width/#installation)
 * [گەشەپێدان](https://ku.wordpress.org/plugins/fit-to-width/#developers)

 [پشتیوانی](https://wordpress.org/support/plugin/fit-to-width/)

## وەسف

A simple, lightweight block for displaying each line of text at full width, no matter
the length of the text. No JavaScript.

Star the project on GitHub: [https://github.com/kevinbatdorf/fit-to-width](https://github.com/kevinbatdorf/fit-to-width)

_Note_: if you are installing it for the first time from the Block Inserter, WordPress
has a bug where it doesn’t load block styles into the iFrame, so you will need to
refresh.

## سکرین شۆتەکان

 * [[
 * An example of the text next to a cool dog

## بڵۆکەکان

ئەم پێوەکراوە 1 بڵۆک دابین دەکات.

 *   Fit To Width A text block where each line is automatically full width.

## دامەزراندن

 1. Upload the plugin files to the `/wp-content/plugins/fit-to-width` directory, or
    install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress

## پهد

### What about browser support?

See here [https://caniuse.com/mdn-css_at-rules_property](https://caniuse.com/mdn-css_at-rules_property)

### How did you do it?

For a detailed explanation of how this works, see [https://kizu.dev/fit-to-width](https://kizu.dev/fit-to-width).

### Is it accessible?

I guess that depends on your perspective and legal requirements. First thing I’ll
say is that this technique outshines the alternatives, and those alternatives also
suffer from the same caveat:

It won’t pass [Success Criterion 1.4.4 Resize Text](https://w3c.github.io/wcag/guidelines/#resize-text)
when the zoom is dependent on the viewport.

I’m by no means an expert on this, so if you’re interested in the topic, there’s
a good discussion on this GitHub issue: [Feature for making text always fit the width of its parent](https://github.com/w3c/csswg-drafts/issues/2528)
that I recommend reading.

There are arguments that if you maintain a width legible enough then zooming may
not be an issue. My advice, however, is that you make sure that your text is able
to zoom in up to 2em in size for all screen widths (press cmd/ctrl +/- to test).

## پێداچوونەوەکان

هیچ پێداچوونەوەیەک نەنووسراوە بۆ ئەم پێوەکراوە.

## بەشداربووان و گەشەپێدەران

“Fit To Width – CSS-only stretchy text” نەرمەواڵەیەکی سەرچاوە کراوەیە. ئەم کەسانەی
خوارەوە بەشدارییان تێدا کردووە.

بەشداربووان

 *   [ Kevin Batdorf ](https://profiles.wordpress.org/kbat82/)

[“Fit To Width – CSS-only stretchy text” وەربگێڕە بۆ زمانەکەی خۆت.](https://translate.wordpress.org/projects/wp-plugins/fit-to-width)

### دەتەوێت بەشداربیت لە گەشەپێدان؟

[گەڕان لە کۆدەکەدا بکە](https://plugins.trac.wordpress.org/browser/fit-to-width/)،
سەیری [تەمارگەی (SVN)](https://plugins.svn.wordpress.org/fit-to-width/) بکە، یان
بەشداربە لە [ڕووداوتۆماری گەشەپێدان](https://plugins.trac.wordpress.org/log/fit-to-width/)
لە ڕێگەی [(RSS)](https://plugins.trac.wordpress.org/log/fit-to-width/?limit=100&mode=stop_on_copy&format=rss).

## ڕووداوتۆمارگەریی گۆڕین

#### 0.2.0 – 2026-04-12

 * Modernize tooling: Biome, Playwright + WP Playground, updated deps.
 * Update CI workflows to use node lts/*.
 * Tested up to WordPress 7.0.

#### 0.1.0

 * Initial Release

## مێتا

 *  وەشان **0.2.0**
 *  دوایین بەڕۆژکردنەوە **1 حەفتە لەمەوبەر**
 *  دامەزراندنی چالاک **30+**
 *  وەشانی وۆردپرێس ** 6.7 یان بەرزتر **
 *  تاقیکراوەتەوە تا **7.0**
 *  وەشانی PHP ** 7.4 یان بەرزتر **
 *  زمان
 * [English (US)](https://wordpress.org/plugins/fit-to-width/)
 * تاگەکان
 * [block](https://ku.wordpress.org/plugins/tags/block/)[creative](https://ku.wordpress.org/plugins/tags/creative/)
   [responsive text](https://ku.wordpress.org/plugins/tags/responsive-text/)[typography](https://ku.wordpress.org/plugins/tags/typography/)
 *  [بینینی پێشکەوتوو](https://ku.wordpress.org/plugins/fit-to-width/advanced/)

## هەڵسەنگاندنەکان

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/fit-to-width/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/fit-to-width/reviews/)

## بەشداربووان

 *   [ Kevin Batdorf ](https://profiles.wordpress.org/kbat82/)

## پشتیوانی

هیچت هەیە بۆ وتن؟ پێویستت بە یارمەتییە؟

 [بینینی مەکۆی پاڵپشتی](https://wordpress.org/support/plugin/fit-to-width/)