BG fixes for COntainer

This commit is contained in:
2026-08-14 11:07:55 +02:00
parent 58990ebe8d
commit b08ea7a55f
3 changed files with 15 additions and 5 deletions

View File

@@ -125,15 +125,16 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
foreach (['top', 'bottom', 'left', 'right'] as $edge) {
$positionOffsets['tx_vitec_bg_pos_' . $edge] = [
'label' => $l . 'bg_pos.' . $edge,
'description' => $l . 'bg_pos.description',
'displayCond' => 'FIELD:tx_vitec_bg_position:=:custom',
'config' => [
'type' => 'number',
'size' => 5,
'nullable' => true,
'range' => [
'lower' => 0,
'upper' => 100,
],
// No range on purpose: background-position accepts values below
// 0 and above 100, which is how you push an image partly out of
// its container. Capping at 0..100 would forbid exactly the
// layouts these free offsets exist for.
],
];
}

View File

@@ -258,6 +258,9 @@
<trans-unit id="bg_pos.right" resname="bg_pos.right">
<source>Right %</source>
</trans-unit>
<trans-unit id="bg_pos.description" resname="bg_pos.description">
<source>Distance from that edge, in percent. Leave empty to centre on this axis. Values below 0 and above 100 are allowed and push the image beyond the edge. Filling both ends of an axis is contradictory - the near edge wins (left over right, top over bottom).</source>
</trans-unit>
</body>
</file>