PFT – Widget Spacing Control
·
Set per-widget top and bottom margins separately for desktop and mobile. Supports negative values.
PFT – Widget Spacing Control adds margin-top / margin-bottom inputs (desktop and mobile, separately) to every widget’s settings form. Negative values are supported, so you can both expand and tighten the space between widgets without adding empty spacer widgets.
機能
- Per-widget top and bottom margin (px) for desktop and mobile
- Negative values supported (e.g.
-10to tighten the gap) - 空欄ならテーマの初期値を使用
- 専用設定ページなし — 各ウィジェットのフォーム内に直接入力欄が表示されます。
- Works with any theme (sidebar / widget area)
- 外部 CSS ファイルなし。JavaScript なし。PHP 単一ファイル。
- トラッキングなし。外部リクエストなし。
優先度が保証される仕組み
余白設定が常にテーマや他プラグインの CSS に勝つように、以下の仕組みを採用しています:
- A triple-ID selector (
#id#id#id) raises specificity to 0-3-0-0, beating typical theme selectors. - 保険として、すべての宣言に
!importantを付加しています。 - スタイルは
wp_footerの優先度 9999 で出力されるため、他のすべてのスタイルの後に読み込まれます。
Media queries are used to switch between desktop and mobile values cleanly (inline styles are intentionally avoided because inline !important would override @media rules).
レスポンシブブレークポイント
- PC: 769px 以上
- スマホ: 768px 以下
プライバシー
本プラグインは個人情報を収集・保存・送信しません。各ウィジェットの設定内に数値の余白値のみを保存します。
