Move image corners into the design area

Umut on the DEEG hero image: "It should be rounded, but it was done from
somewhere, and the corners look odd. And the editor has no image corner
rounding at all, does it?"

It did have one - per block, under Design > Bild > Bildecken. What it did not
have was the 12px that enhancements.css set on .block-image for every
installation: rounded on screen, present in no field, and only removable by
overriding it on each block. On a template that is square throughout it shows,
because the elements above the image - the gradient, the sign, the blue call
to action - are square and stick out of the rounded corner.

The radius is now theme.base.imageRadius, validated like the container width,
emitted as --k-image-radius and used by the stylesheet. The default stays 12px
so existing sites look the same; 0px makes every image square. The per-block
setting still wins.

DEEG is set to 0px, in the seed script and in the installation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5 committed 2026-09-16 09:18:27 +02:00
1 parent a8368068aa
commit 23fdca4edb
7 files changed
+57 -3

No files matched your search

+6 -1
View File
@@ -68,6 +68,10 @@ final class Theme
'linkColor' => '@link',
'containerWidth' => '1240px',
'headingScale' => 1.25,
// Die Ecken jedes Bildes auf der Website. Stand bis 1.20.2 fest im Stylesheet -
// sichtbar gerundet, aber in keinem Feld zu finden. 12px bleibt die Vorgabe,
// damit bestehende Websites gleich aussehen; 0px macht Bilder eckig.
'imageRadius' => '12px',
// Unterstrichene Links im Fließtext. An, weil ein Link, den nur die Farbe verrät,
// für Menschen mit Farbsehschwäche kein Link ist. Wer eine ruhigere Seite will,
// schaltet es hier ab - dann bleibt der Unterstrich beim Überfahren.
@@ -229,7 +233,7 @@ final class Theme
}
$base[$field] = $value;
}
foreach (['fontSize', 'containerWidth'] as $field) {
foreach (['fontSize', 'containerWidth', 'imageRadius'] as $field) {
$value = trim((string) ($input[$field] ?? $base[$field]));
if (1 !== preg_match(StyleSchema::LENGTH, $value)) {
throw new InvalidPage(sprintf('„%s“ ist keine Größenangabe wie 18px oder 70rem.', $value));
@@ -338,6 +342,7 @@ final class Theme
}
$base = $theme['base'];
$variables[] = sprintf('--k-container:%s', $base['containerWidth']);
$variables[] = sprintf('--k-image-radius:%s', $base['imageRadius']);
$colour = static fn (string $v): string => str_starts_with($v, '@') ? sprintf('var(--k-%s)', substr($v, 1)) : $v;