Give the header scrolled colours and equal card heights in 1.11.1
CMS quality / php (8.2) (push) Canceled after 0s
CMS quality / php (8.4) (push) Canceled after 0s
CMS quality / browser (push) Canceled after 0s
CMS quality / mysql (push) Canceled after 0s

Cards, quotes and call-to-action bands side by side in a row are equal in
height again: the stacking margin meant for a column no longer applies inside
a row. The header can carry a second set of colours for the scrolled page,
the Flatsome transparent header: a "scrolled" state next to "hover", limited
to colours, shadow and opacity, marked by a small script only where it is
used, plus a setting that lets the header float over the first section.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Fable 5.1 committed 2026-09-14 17:44:53 +02:00
1 parent b634f486e5
commit 3785d3dfef
18 files changed
+181 -14

No files matched your search

+8 -2
View File
@@ -507,7 +507,11 @@ function prune(block) {
* Sets one style value. An empty value removes it, which makes the block fall back to the wider
* device and finally to the theme. Called inside a history transaction like every other change.
*/
export function setStyle(document, id, device, key, value, { side = null, hover = false } = {}) {
export function scrolledStyle(block, device, key) {
return block?.style?.[device]?.scrolled?.[key];
}
export function setStyle(document, id, device, key, value, { side = null, hover = false, scrolled = false } = {}) {
if (!Object.hasOwn(devices, device)) throw new Error('Unbekannte Vorschaugröße.');
const block = locate(document.blocks, id)?.block;
if (!block) return;
@@ -519,6 +523,8 @@ export function setStyle(document, id, device, key, value, { side = null, hover
block.style[device] ??= {};
let target = block.style[device];
if (hover) { target.hover ??= {}; target = target.hover; }
// The scrolled state of the header: same shape as hover, applied once the page has moved.
if (scrolled) { target.scrolled ??= {}; target = target.scrolled; }
if (side !== null) {
if (empty) { if (target[key]) delete target[key][side]; }
@@ -559,7 +565,7 @@ export function copyStyle(document, fromId, toId) {
/** UI relevance only. Existing values remain editable, including on older documents. */
export function relevantProperty(block, key, property) {
if (Object.values(block.style ?? {}).some(values => values[key] !== undefined || values.hover?.[key] !== undefined)) return true;
if (Object.values(block.style ?? {}).some(values => values[key] !== undefined || values.hover?.[key] !== undefined || values.scrolled?.[key] !== undefined)) return true;
const container = isContainer(block);
if (property.group === 'image') return ['image', 'gallery', 'logos', 'postlist'].includes(block.type);
if (property.group === 'text' || key === 'textShadow') return !['image', 'gallery', 'logos', 'spacer', 'divider', 'embed'].includes(block.type);