🔥 Black Friday Sale: Get 65% OFF Any PageForge Pro Plan! Use code BF65 Claim Offer →
Konto Get it free
Responsive Containers icon
Möglicherweise aufgegeben Tested up to 5.2.31 #1 in container queries

Responsive Containers

CSS media queries let us style elements based on the size of the screen. What if we wanted to style them based on the size of their container? A widget or block should often look different if it’s full-width or…

Aktive Installationen10+10+ Stufe
Downloads · 30d180▲ +10.4% vs prev. 30d
Wertung—0 Bewertungen
Gesundheits-Score23/100In Gefahr
Downloads aller Zeiten3.6KSince Jul 2019
Unterstützung gelöst—Keine aktuellen Threads
erfordertWP 5.2.0PHP 5.6.20+
Downloads · 7d37▼ -14% week over week
Unser Urteil

Betrachten Sie eine Alternative

Responsive Containers shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites and was last updated 7 years ago, and scores 23/100 on our health check.

  • Kleine Benutzerbasis (10+ aktive Installationen)
  • Bisher sehr wenige Bewertungen
  • Kein Update in 7 Jahren
  • Nur getestet bis WordPress 5.2 (letzt ist 7.1)

Tägliche Downloads

3710Sep 1Oct 15Nov 29
Gestern5
Täglicher Durchschnitt (1 Jahr)4
Spitzentag1410.09.2026
Letzte 12 Monate1.5K

Download-Spitzen folgen normalerweise einer neuen Version - jede Website, die automatisch aktualisiert wird, gilt als Download.

Ranglisten

Where Responsive Containers stands today

WordPress.org Ranglisten suchen

Live-Position in der Plugin-Suche, Top 100
StichwortPositionKonkurrierende PluginsKategorie
container queries >100 1,138 Best container queries plugins →
responsive containers >100 1,374 Best responsive containers plugins →
responsive design >100 5,364 Best responsive design plugins →

Versionsübernahme

Anteil aktiver Sites pro Release.

  • 1.1100.0%

About Responsive Containers

Aus der offiziellen Readme · V1.1.0

Beschreibung

CSS media queries let us style elements based on the size of the screen. What if we wanted to style them based on the size of their container? A widget or block should often look different if it’s full-width or constrained within a column or sidebar, but we didn’t have any way to write container queries to style those elements based on their on-screen width… until now!

This plugin loads a small JavaScript file that conditionally applies classes to elements based on how wide those elements are in the browser. This can be used by other themes and plugins to write container-specific styles for editor blocks or widgets, so that they will display correctly wherever they are placed in the page.

The script works on the frontend and in the block editor — see your responsive styles live while you’re composing your post, and trust that your widgets and blocks will look their best whether they’re full-width or in the narrowest sidebar.

Verwendung

If you have a block or widget in your site that you wish to use as a responsive container, add the data-responsive-container attribute to that block’s container element. For example, the parent <div> for a calendar block might look like this:

<div class="calendar-block" data-responsive-container>

By adding that data-attribute and nothing more, your container will now be tagged with additional classes based on how big they appear:
– No special class if the container is below 420px (style for this narrow context as your default).
– container-sm if the container is 420px wide or more,
– container-md if it is wider than 600px,
– container-lg if it is wider than 720px, and
– container-xl for any element 960px or wider.

These are default values and therefore somewhat arbitrary, so you may also provide your own custom theme- or plugin-specific breakpoint values using the data-responsive-container attribute. When rendering your element or block in PHP, pass an array of class names and the minimum width at which each class should be applied. These class names can be generic like the default .container-* classes, or they may be specific to the element being styled:

echo sprintf(
  '<div class="myblock" data-responsive-container="%s">',
  esc_attr( wp_json_encode( [
    'myblock--2-column' => 600,
    'myblock--3-column' => 900,
  ] )
);

In this example your container would receive the .myblock--2-column class from 600px up, and .myblock--3-column at or above 900px.

Note that in this case the .myblock element receives no custom class below 600px. We don’t apply any class names below your specified minimum because we assume styles are written narrow-context-first, but you may ensure your smallest class is always applied by providing a minimum width of 0:

echo sprintf(
  '<div class="myblock" data-responsive-container="%s">',
  esc_attr( wp_json_encode( [
    'myblock--1-column' => 0, // Will apply in all circumstances.
    'myblock--2-column' => 600,
    'myblock--3-column' => 900,
  ] )
);

From within WordPress

  1. Visit ‘Plugins > Add New’
  2. Search for ‘Responsive Containers’
  3. Activate the Responsive Containers plugin from your Plugins page.
  4. Start using data-responsive-container attributes within your theme or plugin.

Manually

  1. Laden Sie den Ordner responsive-containers in das /wp-content/plugins/-Verzeichnis hoch
  2. Activate the Responsive Containers plugin from your Plugins page.
  3. Start using data-responsive-container attributes within your theme or plugin.

License & Attribution

This plugin is licensed under the terms of the GNU General Public License (or “GPL”). It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

It was created by K. Adam White at Human Made, based on a concept popularized by Philip Walton.

This plugin utilizes the resize-observer-polyfill library by Denis Rul, released under the MIT license and © 2016 Denis Rul.

Änderungsprotokoll

1.1

  • Alter class application logic to always apply classes once their minimum threshold width has been met or exceeded.
  • Adjust default breakpoint cutoffs.
  • Adjust README formatting to fix code block rendering issues.
  • Begin work to support usage within the block editor.
  • Un-document the responsive_container_breakpoints() method until it is confirmed to be a useful helper.

1.0

  • Loads responsive-containers.js to observe and decorate data-responsive-container elements.
  • Introduces responsive_container_breakpoints() method to render a stringified & attribute-escaped custom breakpoints array.

Vollständiges Änderungsprotokoll auf WordPress.org →

Für Entwickler

Ist das dein Plugin? Zeigen Sie die Zahlen.

Fügen Sie Ihrer Website, Docs oder GitHub Readme ein Live-Badge hinzu. Es wird von selbst aktualisiert - kein Konto erforderlich.

Aktiv installiert Badge Bewertungsabzeichen Gesundheits-Score-Abzeichen

Fragen und Antworten

Responsive Containers: quick answers

Gerade Antworten, gezogen von Live WordPress.org Daten.

Quelle: WordPress.org

Is Responsive Containers free?

Yes. Responsive Containers is free to download and use from the official WordPress.org plugin directory.

Is Responsive Containers safe to use in 2026?

Responsive Containers shows warning signs in 2026 — compare the alternatives below before installing. It runs on 10+ sites and was last updated 7 years ago, and scores 23/100 on our health check.

How many websites use Responsive Containers?

Responsive Containers is active on 10+ WordPress websites and has been downloaded 3,607 times since it launched in July 2019. It was downloaded 180 times in the last 30 days.

Does Responsive Containers work with WordPress 7.1?

Responsive Containers is officially tested up to WordPress 5.2.31, while the latest release is 7.1.5. It may still work, but try it on a staging site first.

What PHP version does Responsive Containers need?

Responsive Containers requires PHP 5.6.20 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.

When was Responsive Containers last updated?

The latest version, 1.1.0, was released on July 20, 2019 (7 years ago).

Who makes Responsive Containers?

Responsive Containers is developed and maintained by K. Adam White.

Angetrieben von PageForge

Eine Vorlage und eine Tabelle. Eine echte Seite für jede Suche.

PageForge Verwandelt jede Zeile eines CSV in eine WordPress-Seite mit eigenem Titel, URL, SEO Felder und Schema entworfen. Kostenlos auf WordPress.org.

  • CSV und XLSX, plus Google Sheets auf Beruf und Unternehmen
  • seinen eigenen Titel, URL, SEO Felder und Schema für jede Seite
  • Arbeitet mit dem Blockeditor, Elementor, Divi und Avada
  • Kostenlos auf WordPress.org, keine Kreditkarte

↑↓ bewegen↵ öffnen