ralfhortt/wp-content-width

Setting the global WordPress variable `$content_width` in a single place for php and css

1.4 2020-01-16 13:36 UTC

This package is auto-updated.

Last update: 2024-11-16 23:59:18 UTC


README

Setting the global WordPress variable $content_width in a single place for php and css

Installation

$ composer require ralfhortt/wp-content-width

Usage

<?php
use RalfHortt\ContentWidth\ContentWidth;

(new ContentWidth(980))->register();
.container {
	margin-left: auto;
	margin-right: auto;
	max-width: var(--content-width);
	width: 100%;
}